| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794 |
-
- Imports System.Threading
- Public Class frmPIN
- Dim oPropuestaInversionCE As CEPropuestaInversion = New CEPropuestaInversion
- Dim oDAOGeneral As DAOGeneral = New DAOGeneral
- Dim oDAOLETES As LETESDAO = New LETESDAO
- Dim oDAOPropuestasDeInversion As DAOPropuestaInversion = New DAOPropuestaInversion
- Dim oCEAcciones As AccionesCE
- Dim oCEBonos As BonosCE
- Dim oCEDAP As DepositosAPlazoCE
- Dim oCELetes As LETESCE
- Dim oCEReportos As ReportosCE
- Dim TipoTransaccion As String = "B"
- Dim InstrumentoFinanciero As Object
- Dim ResultadoMsgBox As Integer
- Dim IdPIN As Integer
- Dim IdIF As String
- Dim Modo As String = "NM"
- Dim oInversionCE As New InversionesCE
- Dim frmBuscar As frmBuscarDeLista
- Dim FormAcciones As frmAcciones
- Dim FormFuturos As frmFuturos
- Dim FormPrestamoEmpresarial As frmPrestamoEmpresariales
- Dim FormPrestamoPersonal As frmPrestamoPersonal
- Dim FormRepo As frmReporto
- Dim FormLete As frmLetes
- Dim FormCINV As frmCertificadosDeInversion
- Dim FormDAP As frmDepositosAPlazo
- Dim FormNEST As frmNotaEstructurada
- Dim FormFINV As frmFOIN
- Dim Operaciones As New Operaciones
- Dim oInversionDAO As New InversionDAO
- Dim TieneDetalleInstrumento As Boolean = False
- Dim ActivarSuspen As Boolean = True
- Dim LlamadaDesdeBusqueda As Boolean = False
- Dim Col_Empresas As New Collection
- Dim Col_Emisor As New Collection
- Dim Col_EstDocumento As New Collection
- Dim Col_Instrumento As New Collection
- Dim Col_CalRiesgo As New Collection
- Dim Col_TipOperacion As New Collection
- Dim Col_OriFond As New Collection
- Dim Col_CalERiesgo As New Collection
- Dim Col_Aut As New Collection
- Dim Col_Plazo As New Collection
- Dim Col_Pais As New Collection
- Dim Col_TipMercado As New Collection
- Dim CodigoInversionPrincipal As String = String.Empty
- Dim CodigoInversionSecundario As String = String.Empty
- Private isCrear As Boolean = False
- Private IsInstrumentoReporto As Boolean = False
- Private HabilitarCreacionTitulos As Boolean = False
- Private DicDatos As New Dictionary(Of String, String)
- Private CodigoAsociado As String = String.Empty
- Private EstadoReporto As String = "PRIMARIO"
- Private CodigoReporto As String = String.Empty
- Private IdFlujo As Integer = 0
- Private IdECT As Integer = 0
- Private CodigoInversionCMVTA As String = String.Empty
- Private TipoProcesoCMVTA As String = String.Empty
- Public TrasladarDatos As TrasladarDatosCMVTA
- Sub New()
- ' Esta llamada es exigida por el diseñador.
- InitializeComponent()
- ' Agregue cualquier inicialización después de la llamada a InitializeComponent().
- Variables.TrasladarCMVTA = Nothing
- End Sub
- Sub New(TipoProcesoCMVTA As String, CodigoInversionCMVTA As String, TrasladarDatos As TrasladarDatosCMVTA)
- Me.New
- Me.TipoProcesoCMVTA = TipoProcesoCMVTA
- Me.CodigoInversionCMVTA = CodigoInversionCMVTA
- Me.TrasladarDatos = TrasladarDatos
- Variables.TrasladarCMVTA = Me.TrasladarDatos
- End Sub
- Sub ConfiguracionCMVTA()
- If Me.TipoProcesoCMVTA = "V" Then
- lblCodigoInversionCM.Visible = True
- txtCodigoInversionCM.Visible = True
- ActivarSuspen = True
- Modo = "NM"
- TipoTransaccion = "N"
- grbInversión.Visible = False
- LimpiarControles()
- DeshabilitarControles()
- HabilitarControlesCMVTA()
- ConfiguracionCamposCMVTA()
- PIN0BindingSource4.SuspendBinding()
- Navegador.Enabled = False
- TipoTransaccion = "N"
- End If
- End Sub
- Sub HabilitarControlesCMVTA()
- cboCalificacionDeRiesgo.Enabled = True
- End Sub
- Sub ConfiguracionCamposCMVTA()
- Dim Id As Integer = oDAOPropuestasDeInversion.IdRegistroInversion(Me.CodigoInversionCMVTA)
- oInversionCE = oInversionDAO.CargarRegistro(Id)
- cboTipoOperacion.SelectedValue = "V"
- cboOrigenDeFondos.SelectedValue = "NA"
- cboEstadoDocumento.SelectedValue = "A"
- cboAutorizacion.SelectedValue = "P"
- txtCodigoInversionCM.Text = oInversionCE.CodigoIversion
- txtNombre.Text = oInversionCE.NombreManual
- cboEmpresas.SelectedValue = oInversionCE.CodigoEmpresa
- cboEmisores.SelectedValue = oInversionCE.CodigoEmisor
- cboInstrumentosFinancieros.SelectedValue = oInversionCE.CodigoInstrumentoFinanciero
- cboCalificacionDeRiesgo.SelectedValue = oInversionCE.CodigoCalificacionDeRiesgo
- cboPeriodicidad.SelectedValue = oInversionCE.Periodicidad
- cboCalificadoraDeRiesgo.SelectedValue = oInversionCE.CodigoEmpresaCalificadora
- cboTipoMercado.SelectedValue = oInversionCE.TipoMercado
- cboPaises.SelectedValue = oInversionCE.Pais
- cboRenta.SelectedValue = oInversionCE.TipoRenta
- cboTasa.SelectedValue = oInversionCE.TipoTasa
- End Sub
- Sub New(DicDatos As Dictionary(Of String, String))
- Me.New
- HabilitarCreacionTitulos = True
- EstadoReporto = "SECUNDARIO"
- Me.DicDatos = DicDatos
- If DicDatos.ContainsKey("CodigoAsociado") Then
- CodigoAsociado = DicDatos.Item("CodigoAsociado").ToString
- End If
- If DicDatos.ContainsKey("CodigoReporto") Then
- CodigoReporto = DicDatos.Item("CodigoReporto").ToString
- End If
- If DicDatos.ContainsKey("IdFlujo") Then
- IdFlujo = DicDatos.Item("IdFlujo").ToString
- End If
- If DicDatos.ContainsKey("IdECT") Then
- IdECT = DicDatos.Item("IdECT").ToString
- End If
- End Sub
- Private _PlazosFactor As String
- Function AgregarCheckbox(ByRef P_cboObjeto As ComboBox, ByRef P_flpObjeto As FlowLayoutPanel)
- Dim Datos As New Dictionary(Of String, String)
- Dim Col_Generica As New Collection
- Dim i As Integer = 0
- While i < P_cboObjeto.Items.Count
- P_cboObjeto.SelectedIndex = i
- Dim Valor As String = P_cboObjeto.SelectedValue
- If P_cboObjeto.SelectedValue Is Nothing Then
- Return Col_Generica
- End If
- Dim Texto As String = P_cboObjeto.Text
- Datos.Add(Valor, Texto)
- i += 1
- End While
- Dim Existe As Boolean = False
- For Each item As CheckBox In P_flpObjeto.Controls
- If item.Text.ToString = "Todos" Then
- Existe = True
- End If
- Next
- Dim O_ChequeTodos As New CheckBox
- O_ChequeTodos.Name = "Todos" + P_flpObjeto.Name.ToString
- O_ChequeTodos.Checked = True
- O_ChequeTodos.Width = 250
- O_ChequeTodos.BackColor = ColorTranslator.FromHtml("#EAEAE8")
- O_ChequeTodos.Text = "Todos"
- O_ChequeTodos.Height = 20
- O_ChequeTodos.Margin = New Padding(25, 5, 25, 5)
- Col_Generica.Add(O_ChequeTodos.Name)
- If Not Existe Then
- P_flpObjeto.Controls.Add(O_ChequeTodos)
- AddHandler O_ChequeTodos.Click, AddressOf evento
- AddHandler O_ChequeTodos.CheckedChanged, AddressOf Colorevento
- End If
- For Each RecorrerDatos In Datos
- Col_Generica.Add(RecorrerDatos.Key)
- Dim O_Check As New CheckBox
- Existe = False
- Dim Nombre = RecorrerDatos.Value
- For Each item As CheckBox In P_flpObjeto.Controls
- If item.Text.ToString = Nombre.ToString Then
- Existe = True
- End If
- Next
- If Not Existe Then
- O_Check.Name = RecorrerDatos.Key
- O_Check.Checked = True
- O_Check.Width = 250
- O_Check.BackColor = ColorTranslator.FromHtml("#EAEAE8")
- O_Check.Text = Nombre
- O_Check.Height = 20
- O_Check.Margin = New Padding(25, 5, 25, 5)
- P_flpObjeto.Controls.Add(O_Check)
- AddHandler O_Check.Click, AddressOf evento
- AddHandler O_Check.CheckedChanged, AddressOf Colorevento
- End If
- Existe = False
- Next
- Return Col_Generica
- End Function
- Sub eventoCargar()
- For Each Item In pnlMenu.Controls
- If TypeOf Item Is Panel Then
- If Item.backcolor = Color.White Then
- For Each Items In Item.controls
- Items.backcolor = Color.WhiteSmoke
- Next
- Item.backcolor = Color.WhiteSmoke
- End If
- End If
- Next
- pnlContenedor.Visible = False
- CargarTabla()
- End Sub
- Sub eventoCancelar()
- For Each Item In pnlMenu.Controls
- If TypeOf Item Is Panel Then
- If Item.backcolor = Color.White Then
- For Each Items In Item.controls
- Items.backcolor = Color.WhiteSmoke
- Next
- Item.backcolor = Color.WhiteSmoke
- End If
- End If
- Next
- pnlContenedor.Visible = False
- End Sub
- Sub evento(sender As Object, e As EventArgs)
- Dim P_flpObjeto As New FlowLayoutPanel
- P_flpObjeto = sender.parent
- If sender.Name.ToString.IndexOf("Todos") > -1 Then
- CambioCheckTodos(P_flpObjeto, sender)
- Else
- TodosCheck(P_flpObjeto, sender, e)
- End If
- End Sub
- Sub Colorevento(sender As Object, e As EventArgs)
- If (sender.checked) Then
- sender.BackColor = ColorTranslator.FromHtml("#EAEAE8")
- Else
- sender.BackColor = ColorTranslator.FromHtml("Transparent")
- End If
- ActualizarColecciones(sender)
- End Sub
- Sub ActualizarColecciones(sender As Object)
- Dim Flpnombre As String = sender.parent.name
- If TypeOf sender.parent Is FlowLayoutPanel Then
- Dim FlpObjeto As New FlowLayoutPanel
- FlpObjeto = sender.parent
- If Flpnombre = "flpEmpresas" Then
- Col_Empresas.Clear()
- For Each Nombre In FlpObjeto.Controls
- If TypeOf Nombre Is CheckBox Then
- If Nombre.checked Then
- Col_Empresas.Add(Nombre.name)
- End If
- End If
- Next
- ElseIf Flpnombre = "flpEmisor" Then
- Col_Emisor.Clear()
- For Each Nombre In FlpObjeto.Controls
- If TypeOf Nombre Is CheckBox Then
- If Nombre.checked Then
- Col_Emisor.Add(Nombre.name)
- End If
- End If
- Next
- ElseIf Flpnombre = "flpEstadoDocumento" Then
- Col_EstDocumento.Clear()
- For Each Nombre In FlpObjeto.Controls
- If TypeOf Nombre Is CheckBox Then
- If Nombre.checked Then
- Col_EstDocumento.Add(Nombre.name)
- End If
- End If
- Next
- ElseIf Flpnombre = "flpInstrumentos" Then
- Col_Instrumento.Clear()
- For Each Nombre In FlpObjeto.Controls
- If TypeOf Nombre Is CheckBox Then
- If Nombre.checked Then
- Col_Instrumento.Add(Nombre.name)
- End If
- End If
- Next
- ElseIf Flpnombre = "flpCalificacionRiesgo" Then
- Col_CalRiesgo.Clear()
- For Each Nombre In FlpObjeto.Controls
- If TypeOf Nombre Is CheckBox Then
- If Nombre.checked Then
- Col_CalRiesgo.Add(Nombre.name)
- End If
- End If
- Next
- ElseIf Flpnombre = "flpTipoOperacion" Then
- Col_TipOperacion.Clear()
- For Each Nombre In FlpObjeto.Controls
- If TypeOf Nombre Is CheckBox Then
- If Nombre.checked Then
- Col_TipOperacion.Add(Nombre.name)
- End If
- End If
- Next
- ElseIf Flpnombre = "flpOrigenFondos" Then
- Col_OriFond.Clear()
- For Each Nombre In FlpObjeto.Controls
- If TypeOf Nombre Is CheckBox Then
- If Nombre.checked Then
- Col_OriFond.Add(Nombre.name)
- End If
- End If
- Next
- ElseIf Flpnombre = "flpCalificadoraRiesgo" Then
- Col_CalERiesgo.Clear()
- For Each Nombre In FlpObjeto.Controls
- If TypeOf Nombre Is CheckBox Then
- If Nombre.checked Then
- Col_CalERiesgo.Add(Nombre.name)
- End If
- End If
- Next
- ElseIf Flpnombre = "flpAutorizacion" Then
- Col_Aut.Clear()
- For Each Nombre In FlpObjeto.Controls
- If TypeOf Nombre Is CheckBox Then
- If Nombre.checked Then
- Col_Aut.Add(Nombre.name)
- End If
- End If
- Next
- ElseIf Flpnombre = "flpPlazo" Then
- Col_Plazo.Clear()
- For Each Nombre In FlpObjeto.Controls
- If TypeOf Nombre Is CheckBox Then
- If Nombre.checked Then
- Col_Plazo.Add(Nombre.name)
- End If
- End If
- Next
- ElseIf Flpnombre = "flpPais" Then
- Col_Pais.Clear()
- For Each Nombre In FlpObjeto.Controls
- If TypeOf Nombre Is CheckBox Then
- If Nombre.checked Then
- Col_Pais.Add(Nombre.name)
- End If
- End If
- Next
- ElseIf Flpnombre = "flpTipoMercado" Then
- Col_TipMercado.Clear()
- For Each Nombre In FlpObjeto.Controls
- If TypeOf Nombre Is CheckBox Then
- If Nombre.checked Then
- Col_TipMercado.Add(Nombre.name)
- End If
- End If
- Next
- End If
- End If
- End Sub
- Sub CambioCheckTodos(ByRef P_flpObjeto As FlowLayoutPanel, ByVal sender As Object)
- Dim ContadorPrimario As Integer = P_flpObjeto.Controls.Count - 1
- Dim PrimerCheck As Boolean = True
- For Each xCheckBox In P_flpObjeto.Controls
- If TypeOf xCheckBox Is CheckBox Then
- Dim yCheckBox As New CheckBox
- yCheckBox = xCheckBox
- If xCheckBox.TabIndex = 0 Then
- If Not yCheckBox.Checked Then
- PrimerCheck = False
- End If
- End If
- End If
- Next
- If PrimerCheck Then
- For Each xCheckBox In P_flpObjeto.Controls
- If TypeOf xCheckBox Is CheckBox Then
- Dim yCheckBox As New CheckBox
- yCheckBox = xCheckBox
- yCheckBox.Checked = True
- End If
- Next
- ElseIf Not PrimerCheck Then
- For Each xCheckBox In P_flpObjeto.Controls
- If TypeOf xCheckBox Is CheckBox Then
- Dim yCheckBox As New CheckBox
- yCheckBox = xCheckBox
- yCheckBox.Checked = False
- End If
- Next
- End If
- End Sub
- Sub TodosCheck(ByRef P_flpObjeto As FlowLayoutPanel, sender As Object, e As EventArgs)
- Dim ChequeTodos As Boolean = True
- If Not sender.Name.ToString.IndexOf("Todos") > -1 Then
- For Each xCheckBox In P_flpObjeto.Controls
- If Not xCheckBox.Name.ToString.IndexOf("Todos") > -1 Then
- If Not xCheckBox.checked Then
- ChequeTodos = False
- End If
- End If
- Next
- End If
- For Each xCheckBox In P_flpObjeto.Controls
- If xCheckBox.Name.ToString.IndexOf("Todos") > -1 Then
- xCheckBox.checked = ChequeTodos
- End If
- Next
- End Sub
- Private Sub frmPIN_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- 'TODO: esta línea de código carga datos en la tabla 'InversionesDEVDataSet5.PIN0' Puede moverla o quitarla según sea necesario.
- Me.PIN0TableAdapter3.Fill(Me.InversionesDEVDataSet5.PIN0)
- 'TODO: esta línea de código carga datos en la tabla 'InversionesDEVDataSet5.PIN0' Puede moverla o quitarla según sea necesario.
- TipoTransaccion = "N"
- txtCodigoInversion.Text = String.Empty
- frmProgreso.PgbProgreso.Value = 1
- CargarEstadosDocumento()
- frmProgreso.PgbProgreso.Value = 5
- CargarEstadosAutorizacion()
- frmProgreso.PgbProgreso.Value = 10
- CargarEmpresas()
- frmProgreso.PgbProgreso.Value = 15
- CargarInstrumentosFinancieros()
- frmProgreso.PgbProgreso.Value = 20
- CargarEmisores()
- frmProgreso.PgbProgreso.Value = 25
- Call CargarCalificacionDeRiesgo()
- frmProgreso.PgbProgreso.Value = 30
- Call CargarCalificadoraDeRiesgo()
- frmProgreso.PgbProgreso.Value = 35
- Call CargarOrigenDeFondos()
- frmProgreso.PgbProgreso.Value = 40
- Call CargarTipoOperacion()
- frmProgreso.PgbProgreso.Value = 45
- Call CargarPaises()
- frmProgreso.PgbProgreso.Value = 50
- Call CargarTiposMercado()
- frmProgreso.PgbProgreso.Value = 55
- Call CargarTipoRenta()
- frmProgreso.PgbProgreso.Value = 60
- Call CargarTipoTasa()
- frmProgreso.PgbProgreso.Value = 65
- Call CargarPlazos()
- frmProgreso.PgbProgreso.Value = 70
- Call CargarPeriodicidades()
- frmProgreso.PgbProgreso.Value = 75
- HabilitarBusqueda()
- ControlCambio()
- frmProgreso.PgbProgreso.Value = 85
- ConfiguracionInicial()
- frmProgreso.PgbProgreso.Value = 90
- PIN0BindingSource4.SuspendBinding()
- Nuevo()
- BindingNavigatorPositionItem.Enabled = False
- frmProgreso.PgbProgreso.Value = 95
- HabilitarControles()
- frmProgreso.PgbProgreso.Value = 100
- frmProgreso.Visible = False
- AdaptarTituloNuevoRepo()
- ConfiguracionCMVTA()
- TipoTransaccion = "N"
- End Sub
- Sub AdaptarTituloNuevoRepo()
- If HabilitarCreacionTitulos Then
- TipoTransaccion = "N"
- Dim NombreInstrumento As String = String.Empty
- Dim NombreEmpresa As String = String.Empty
- Dim SaldoAplicadoTitulo As Double = 0
- If DicDatos.ContainsKey("NombreInstrumento") Then
- NombreInstrumento = DicDatos.Item("NombreInstrumento").ToString
- End If
- If DicDatos.ContainsKey("NombreEmpresa") Then
- NombreEmpresa = DicDatos.Item("NombreEmpresa").ToString
- End If
- If DicDatos.ContainsKey("SaldoAplicadoTitulo") Then
- SaldoAplicadoTitulo = Operaciones.ConvertirDecimal(DicDatos.Item("SaldoAplicadoTitulo").ToString)
- End If
- Navegador.Enabled = False
- cboEmpresas.Enabled = False
- cboInstrumentosFinancieros.Enabled = False
- cboOrigenDeFondos.Enabled = False
- cboTipoOperacion.SelectedValue = "C"
- cboOrigenDeFondos.SelectedValue = "REPOVENTA"
- cboEmpresas.SelectedValue = NombreEmpresa
- cboInstrumentosFinancieros.SelectedValue = NombreInstrumento
- End If
- End Sub
- Sub Nuevo()
- Modo = "NM"
- Operaciones.TipoOperacion = "N"
- grbInversión.Visible = False
- Refrescar()
- PreNuevoModificar()
- ModoPropuesta()
- LimpiarControles()
- NuevaPropuesta()
- End Sub
- Private Sub UsuarioPrivilegio(ByVal TipoTransaccion As String, sender As Object)
- Dim UsuarioPri As Boolean = sender.checked
- If (TipoTransaccion = "A" Or TipoTransaccion = "B") And UsuarioPri Then
- Dim codigo As String = txtCodigoInversion.Text
- Dim Comprobar As New DAOGeneral
- Dim Estado As String = Comprobar.EstadoAutorizacionPro(codigo)
- Dim Existe As Boolean = ExisteInstrumentoReal("INV0")
- If Existe Then
- grbInversión.Visible = False
- MsgBox("La Inversion ya existe")
- sender.checked = False
- Else
- If Estado = "A" Then
- grbInversión.Visible = True
- Else
- grbInversión.Visible = False
- sender.checked = False
- End If
- End If
- Else
- sender.checked = False
- grbInversión.Visible = False
- End If
- End Sub
- Private Sub CargarEstadosDocumento()
- Dim vTipoTransaccion As String = TipoTransaccion
- TipoTransaccion = "X"
- Me.cboEstadoDocumento.DataSource = oDAOPropuestasDeInversion.ListaEstadoDocumento.Tables("EstadosDocumento")
- Me.cboEstadoDocumento.DisplayMember = "Descripcion"
- Me.cboEstadoDocumento.ValueMember = "Codigo"
- Col_EstDocumento = AgregarCheckbox(cboEstadoDocumento, flpEstadoDocumento)
- Me.cboEstadoDocumento.SelectedIndex = -1
- TipoTransaccion = vTipoTransaccion
- End Sub
- Private Sub CargarEstadosAutorizacion()
- Dim vTipoTransaccion As String = TipoTransaccion
- TipoTransaccion = "X"
- Me.cboAutorizacion.DataSource = oDAOGeneral.ListaEstadoAutorizacion
- Me.cboAutorizacion.DisplayMember = "Descripcion"
- Me.cboAutorizacion.ValueMember = "Codigo"
- Col_Aut = AgregarCheckbox(cboAutorizacion, flpAutorizacion)
- Me.cboAutorizacion.SelectedIndex = -1
- TipoTransaccion = vTipoTransaccion
- End Sub
- Private Sub CargarEmpresas()
- Dim vTipoTransaccion As String = TipoTransaccion
- TipoTransaccion = "X"
- Me.cboEmpresas.DataSource = oDAOGeneral.ListaEmpresas
- Me.cboEmpresas.DisplayMember = "Descripcion"
- Me.cboEmpresas.ValueMember = "Codigo"
- Col_Empresas = AgregarCheckbox(cboEmpresas, flpEmpresas)
- Me.cboEmpresas.SelectedIndex = -1
- TipoTransaccion = vTipoTransaccion
- End Sub
- Private Sub CargarInstrumentosFinancieros()
- Dim vTipoTransaccion As String = TipoTransaccion
- TipoTransaccion = "X"
- Me.cboInstrumentosFinancieros.DataSource = oDAOGeneral.ListaInstrumentos("Propuesta")
- Me.cboInstrumentosFinancieros.DisplayMember = "Descripcion"
- Me.cboInstrumentosFinancieros.ValueMember = "Codigo"
- AgregarCheckbox(cboInstrumentosFinancieros, flpInstrumentos)
- Me.cboInstrumentosFinancieros.SelectedIndex = -1
- TipoTransaccion = vTipoTransaccion
- End Sub
- Private Sub CargarEmisores()
- Dim vTipoTransaccion As String = TipoTransaccion
- TipoTransaccion = "X"
- Me.cboEmisores.DataSource = oDAOGeneral.ListaEmisores
- Me.cboEmisores.DisplayMember = "Descripcion"
- Me.cboEmisores.ValueMember = "Codigo"
- Col_Emisor = AgregarCheckbox(cboEmisores, flpEmisor)
- Me.cboEmisores.SelectedIndex = -1
- TipoTransaccion = vTipoTransaccion
- End Sub
- Private Sub CargarCalificacionDeRiesgo()
- Dim vTipoTransaccion As String = TipoTransaccion
- TipoTransaccion = "X"
- Me.cboCalificacionDeRiesgo.DataSource = oDAOGeneral.ListaCalificacionesDeRiesgo
- Me.cboCalificacionDeRiesgo.DisplayMember = "Descripcion"
- Me.cboCalificacionDeRiesgo.ValueMember = "Codigo"
- Col_CalRiesgo = AgregarCheckbox(cboCalificacionDeRiesgo, flpCalificacionRiesgo)
- Me.cboCalificacionDeRiesgo.SelectedIndex = -1
- TipoTransaccion = vTipoTransaccion
- End Sub
- Private Sub CargarCalificadoraDeRiesgo()
- Dim vTipoTransaccion As String = TipoTransaccion
- TipoTransaccion = "X"
- Me.cboCalificadoraDeRiesgo.DataSource = oDAOGeneral.ListaEmpresasCalificadoras
- Me.cboCalificadoraDeRiesgo.DisplayMember = "Descripcion"
- Me.cboCalificadoraDeRiesgo.ValueMember = "Codigo"
- Col_CalERiesgo = AgregarCheckbox(cboCalificadoraDeRiesgo, flpCalificadoraRiesgo)
- Me.cboCalificadoraDeRiesgo.SelectedIndex = -1
- TipoTransaccion = vTipoTransaccion
- End Sub
- Private Sub CargarOrigenDeFondos()
- Dim vTipoTransaccion As String = TipoTransaccion
- TipoTransaccion = "X"
- Me.cboOrigenDeFondos.DataSource = oDAOGeneral.ListaOrigenDeFondos
- Me.cboOrigenDeFondos.DisplayMember = "Descripcion"
- Me.cboOrigenDeFondos.ValueMember = "Codigo"
- Col_OriFond = AgregarCheckbox(cboOrigenDeFondos, flpOrigenFondos)
- Me.cboOrigenDeFondos.SelectedIndex = -1
- TipoTransaccion = vTipoTransaccion
- End Sub
- Private Sub CargarPlazos()
- Dim vTipoTransaccion As String = TipoTransaccion
- TipoTransaccion = "X"
- Me.cboPlazosFactor.DataSource = oDAOGeneral.ListaPlazosFactor
- Me.cboPlazosFactor.DisplayMember = "Descripcion"
- Me.cboPlazosFactor.ValueMember = "Codigo"
- Col_Plazo = AgregarCheckbox(cboPlazosFactor, flpPlazo)
- Me.cboPlazosFactor.SelectedIndex = -1
- TipoTransaccion = vTipoTransaccion
- End Sub
- Private Sub CargarTipoOperacion()
- Dim vTipoTransaccion As String = TipoTransaccion
- TipoTransaccion = "X"
- Me.cboTipoOperacion.DataSource = oDAOGeneral.ListaTipoOperacion
- Me.cboTipoOperacion.DisplayMember = "Descripcion"
- Me.cboTipoOperacion.ValueMember = "Codigo"
- Col_TipOperacion = AgregarCheckbox(cboTipoOperacion, flpTipoOperacion)
- Me.cboTipoOperacion.SelectedIndex = -1
- TipoTransaccion = vTipoTransaccion
- End Sub
- Private Sub CargarPaises()
- Dim vTipoTransaccion As String = TipoTransaccion
- TipoTransaccion = "X"
- Me.cboPaises.DataSource = oDAOGeneral.ListaPaisesRelevanteInversion
- Me.cboPaises.DisplayMember = "Descripcion"
- Me.cboPaises.ValueMember = "Codigo"
- Col_Pais = AgregarCheckbox(cboPaises, flpPais)
- Me.cboPaises.SelectedIndex = -1
- TipoTransaccion = vTipoTransaccion
- End Sub
- Private Sub CargarTiposMercado()
- Dim vTipoTransaccion As String = TipoTransaccion
- TipoTransaccion = "X"
- Me.cboTipoMercado.DataSource = oDAOGeneral.ListaTiposMercado
- Me.cboTipoMercado.DisplayMember = "Descripcion"
- Me.cboTipoMercado.ValueMember = "Codigo"
- Col_TipMercado = AgregarCheckbox(cboTipoMercado, flpTipoMercado)
- Me.cboTipoMercado.SelectedIndex = -1
- TipoTransaccion = vTipoTransaccion
- End Sub
- Private Sub NuevaPropuesta()
- If oPropuestaInversionCE Is Nothing Then
- oPropuestaInversionCE = New CEPropuestaInversion
- End If
- LimpiarControles()
- Me.cboEstadoDocumento.SelectedValue = "A"
- Me.cboAutorizacion.SelectedValue = "P"
- Me.cboTipoOperacion.SelectedValue = "C"
- Me.cboOrigenDeFondos.SelectedValue = "D"
- Me.btnAccion.Text = "Guardar"
- Me.txtCodigoInversion.ReadOnly = True
- End Sub
- Private Function GuardarPropuesta()
- Dim ValidacionCorrecta As Boolean = ValoresValidos()
- Dim Guardado As Boolean = False
- Dim Estado As String = "Correcto"
- If ValidacionCorrecta Then
- If TieneDetalleInstrumento Then
- ResultadoMsgBox = DialogResult.Yes
- Else
- ResultadoMsgBox = MessageBox.Show("No se ha ingresado detalles del Instrumento." & vbCrLf & "Desea continuar sin detalles?", "Sin Detalles", MessageBoxButtons.YesNo)
- End If
- If ValidacionCorrecta Then
- If ResultadoMsgBox = DialogResult.Yes Then
- If EstadoReporto = "PRIMARIO" Then
- Guardado = oDAOPropuestasDeInversion.NuevaPropuesta(oPropuestaInversionCE, TipoProcesoCMVTA, CodigoInversionCMVTA)
- ElseIf EstadoReporto = "SECUNDARIO" Then
- Guardado = oDAOPropuestasDeInversion.NuevaPropuesta(oPropuestaInversionCE, CodigoAsociado, EstadoReporto, CodigoReporto, IdFlujo, IdECT)
- Else
- Estado = "Error"
- End If
- Else
- Estado = "Omitir"
- End If
- End If
- Else
- Estado = "ValidacionIncorrecta"
- End If
- Return Estado
- End Function
- Private Sub ActualizarPropuesta(ByVal parametro As String)
- Dim retorno As Integer
- RefrescarValoresControles()
- retorno = oDAOPropuestasDeInversion.Actualizar(oPropuestaInversionCE, parametro, EstadoReporto)
- If retorno = 0 Then
- MsgBox("Registro Actualizado", MsgBoxStyle.Information)
- CargarPropuesta(IdPIN)
- End If
- End Sub
- Private Sub cboEmpresas_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboEmpresas.SelectedIndexChanged
- ControlEmpresa()
- End Sub
- Private Sub txtAsunto_TextChanged(sender As Object, e As EventArgs) Handles txtAsunto.TextChanged
- End Sub
- Private Sub txtAsunto_LostFocus(sender As Object, e As EventArgs) Handles txtAsunto.LostFocus
- ControlAsunto()
- End Sub
- Private Sub cboInstrumentosFinancieros_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboInstrumentosFinancieros.SelectedIndexChanged
- ControlInstrumento()
- TieneDetalleInstrumento = False
- End Sub
- Private Sub txtMontoInversion_TextChanged(sender As Object, e As EventArgs)
- End Sub
- Private Sub txtMontoInversion_LostFocus(sender As Object, e As EventArgs)
- End Sub
- Private Sub txtPrecio_TextChanged(sender As Object, e As EventArgs)
- End Sub
- Private Sub txtPrecio_LostFocus(sender As Object, e As EventArgs)
- End Sub
- Private Sub txtRendimiento_TextChanged(sender As Object, e As EventArgs)
- End Sub
- Private Sub txtRendimiento_LostFocus(sender As Object, e As EventArgs)
- End Sub
- Private Sub cboPlazos_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboPlazosFactor.SelectedIndexChanged
- ControlPlazoFactor()
- ControlPlazoFact()
- End Sub
- Private Sub txtPlazoNumero_TextChanged(sender As Object, e As EventArgs)
- End Sub
- Private Sub txtPlazoNumero_LostFocus(sender As Object, e As EventArgs)
- End Sub
- Private Sub txtIngresos_TextChanged(sender As Object, e As EventArgs)
- End Sub
- Private Sub cboOrigenDeFodos_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboOrigenDeFondos.SelectedIndexChanged
- ControlOrigenDeFondos()
- ControlOFon()
- End Sub
- Private Sub cboEmisores_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboEmisores.SelectedIndexChanged
- ControlEmisores()
- End Sub
- Private Sub cboCalificacionDeRiesgo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboCalificacionDeRiesgo.SelectedIndexChanged
- ControlCalificacionesDeRiesgo()
- End Sub
- Private Sub cboCalificadoraDeRiesgo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboCalificadoraDeRiesgo.SelectedIndexChanged
- ControlCalificadoraDeRiesgo()
- End Sub
- Private Sub txtJustificacion_TextChanged(sender As Object, e As EventArgs) Handles txtJustificacion.TextChanged
- End Sub
- Private Sub txtJustificacion_LostFocus(sender As Object, e As EventArgs) Handles txtJustificacion.LostFocus
- ControlJustificacion()
- End Sub
- Private Sub txtComentarios_TextChanged(sender As Object, e As EventArgs) Handles txtComentarios.TextChanged
- End Sub
- Private Sub txtComentarios_LostFocus(sender As Object, e As EventArgs) Handles txtComentarios.LostFocus
- ControlComentarios()
- End Sub
- Private Sub cboEstadoDocumento_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboEstadoDocumento.SelectedIndexChanged
- ControlEstadoDocumento()
- End Sub
- Private Sub dtpFechaDocumento_ValueChanged(sender As Object, e As EventArgs) Handles dtpFechaDocumento.ValueChanged
- ControlFechaDocumento()
- End Sub
- Private Sub txtIngresos_LostFocus(sender As Object, e As EventArgs)
- End Sub
- Private Sub PrepararBusqueda()
- TipoTransaccion = "B"
- oPropuestaInversionCE = Nothing
- oPropuestaInversionCE = New CEPropuestaInversion
- LimpiarControles()
- End Sub
- Private Sub CargarPropuesta(Id As Integer)
- oPropuestaInversionCE = Nothing
- oPropuestaInversionCE = oDAOPropuestasDeInversion.CargarPropuesta(Id)
- IdPIN = Id
- Dim vCodigoEmpresa As String = oPropuestaInversionCE.CodigoEmpresa.ToString
- If vCodigoEmpresa.Length = 0 Then
- Me.cboEmpresas.SelectedIndex = -1
- Else
- Me.cboEmpresas.SelectedValue = vCodigoEmpresa
- End If
- Me.txtAsunto.Text = oPropuestaInversionCE.Asunto.ToString
- Dim vCodigoInstrumentoFinanciero As String = oPropuestaInversionCE.CodigoInstrumentoFinanciero.ToString
- If vCodigoInstrumentoFinanciero.Length = 0 Then
- Me.cboInstrumentosFinancieros.SelectedIndex = -1
- Else
- Me.cboInstrumentosFinancieros.SelectedValue = vCodigoInstrumentoFinanciero.ToString
- End If
- Dim vPlazoFactor As String = oPropuestaInversionCE.PlazoFactor.ToString
- If vPlazoFactor.Length = 0 Then
- Me.cboPlazosFactor.SelectedIndex = -1
- Else
- Me.cboPlazosFactor.SelectedValue = vPlazoFactor.ToString
- End If
- Dim vOrigenDeFondos As String = oPropuestaInversionCE.OrigenDeFondos.ToString
- If vOrigenDeFondos.Length = 0 Then
- Me.cboOrigenDeFondos.SelectedIndex = -1
- Else
- Me.cboOrigenDeFondos.SelectedValue = vOrigenDeFondos.ToString
- End If
- Dim vCodigoEmisor As String = oPropuestaInversionCE.CodigoEmisor.ToString
- If vCodigoEmisor = 0 Then
- Me.cboEmisores.SelectedIndex = -1
- Else
- Me.cboEmisores.SelectedValue = vCodigoEmisor.ToString
- End If
- Dim vCodigoCalificacionDeRiesgo As String = oPropuestaInversionCE.CodigoCalificacionDeRiesgo.ToString
- If vCodigoCalificacionDeRiesgo.Length = 0 Then
- Me.cboCalificacionDeRiesgo.SelectedIndex = -1
- Else
- Me.cboCalificacionDeRiesgo.SelectedValue = vCodigoCalificacionDeRiesgo.ToString
- End If
- Dim vCodigoEmpresaCalificadora As String = oPropuestaInversionCE.CodigoEmpresaCalificadora.ToString
- If vCodigoEmpresaCalificadora.Length = 0 Then
- Me.cboCalificadoraDeRiesgo.SelectedIndex = -1
- Else
- Me.cboCalificadoraDeRiesgo.SelectedValue = vCodigoEmpresaCalificadora.ToString
- End If
- Me.txtJustificacion.Text = oPropuestaInversionCE.Justificacion.ToString
- Me.txtComentarios.Text = oPropuestaInversionCE.Comentarios.ToString
- Me.txtCodigoInversion.Text = oPropuestaInversionCE.CodigoInversion.ToString
- Me.txtCodigoInversion.ReadOnly = True
- Dim vEstadoDocumento As String = oPropuestaInversionCE.EstadoDocumento.ToString
- If vEstadoDocumento.Length = 0 Then
- Me.cboEstadoDocumento.SelectedIndex = -1
- Else
- Me.cboEstadoDocumento.SelectedValue = vEstadoDocumento.ToString
- End If
- Dim vFechaDocumento As Date = Date.Today.Date
- If Not Date.TryParse(oPropuestaInversionCE.FechaDocumento.ToString, vFechaDocumento.ToString) Then
- vFechaDocumento = Date.Today.Date
- End If
- Me.dtpFechaDocumento.Value = vFechaDocumento.ToString
- Dim vTipoOperacion As String = oPropuestaInversionCE.TipoOperacion.ToString
- If String.IsNullOrEmpty(vTipoOperacion) Then
- Me.cboTipoOperacion.SelectedIndex = -1
- Else
- Me.cboTipoOperacion.SelectedValue = vTipoOperacion.ToString
- End If
- Dim vEstadoAut As String = oPropuestaInversionCE.EstadoAutorizacion.ToString
- If vEstadoAut.Length = 0 Then
- Me.cboAutorizacion.SelectedIndex = 0
- Else
- Me.cboAutorizacion.SelectedValue = vEstadoAut.ToString
- End If
- Dim vTipoMercado As String = oPropuestaInversionCE.TipoMercado.ToString
- If String.IsNullOrEmpty(vTipoMercado) Then
- cboTipoMercado.SelectedIndex = -1
- Else
- Me.cboTipoMercado.SelectedValue = vTipoMercado.ToString
- End If
- Dim vPais As String = oPropuestaInversionCE.Pais.ToString
- If String.IsNullOrEmpty(vPais) Then
- cboPaises.SelectedIndex = -1
- Else
- cboPaises.SelectedValue = vPais
- End If
- Dim vTipoRenta As String = oPropuestaInversionCE.TipoRenta.ToString
- If String.IsNullOrEmpty(vTipoRenta) Then
- cboRenta.SelectedIndex = -1
- Else
- cboRenta.SelectedValue = vTipoRenta
- End If
- Dim vTipoTasa As String = oPropuestaInversionCE.TipoTasa.ToString
- If String.IsNullOrEmpty(vTipoTasa) Then
- cboTasa.SelectedIndex = -1
- Else
- cboTasa.SelectedValue = vTipoTasa
- End If
- Dim vPeriodicidad As String = oPropuestaInversionCE.Periodicidad.ToString
- If String.IsNullOrEmpty(vPeriodicidad) Then
- cboPeriodicidad.SelectedIndex = -1
- Else
- cboPeriodicidad.SelectedValue = vPeriodicidad
- End If
- Dim vNombre As String = oPropuestaInversionCE.NombreManual.ToString
- txtNombre.Text = vNombre
- TipoTransaccion = "C"
- IdPIN = Id
- IdIF = vCodigoInstrumentoFinanciero
- Me.btnAccion.Text = "Aceptar"
- End Sub
- 'NAVEGACION
- '***FIN NAVEGACION
- Private Sub btnAccion_Click(sender As Object, e As EventArgs) Handles btnAccion.Click
- If TipoTransaccion = "N" Then
- Dim CrearInstrumento As String = String.Empty
- If Not TrasladarDatos Is Nothing Then
- If TrasladarDatos.AgregarCMVTA Then
- CrearInstrumento = "Correcto"
- Else
- CrearInstrumento = GuardarPropuesta()
- End If
- Else
- CrearInstrumento = GuardarPropuesta()
- End If
- If CrearInstrumento = "Correcto" Then
- GuardarFamilia(txtCodigoInversion.Text)
- txtCodigoInversion.ReadOnly = True
- Refrescar()
- LimpiarControles()
- Me.PIN0TableAdapter3.Fill(Me.InversionesDEVDataSet5.PIN0)
- If BindingNavigatorPositionItem.Enabled Then
- BindingNavigatorPositionItem.Enabled = False
- End If
- Nuevo()
- ElseIf CrearInstrumento = "Omitir" Then
- MsgBox("No se creo los detalles del instrumento")
- If BindingNavigatorPositionItem.Enabled Then
- BindingNavigatorPositionItem.Enabled = False
- End If
- ElseIf CrearInstrumento = "Error" Then
- MsgBox("Error al crear instrumento")
- If BindingNavigatorPositionItem.Enabled Then
- BindingNavigatorPositionItem.Enabled = False
- End If
- End If
- ElseIf TipoTransaccion = "A" Then
- Dim posicion = PIN0BindingSource4.Position
- ActualizarPropuesta(txtCodigoInversion.Text)
- Refrescar()
- If Not LlamadaDesdeBusqueda Then
- Me.PIN0TableAdapter3.Fill(Me.InversionesDEVDataSet5.PIN0)
- PIN0BindingSource4.Position = posicion
- End If
- ControlCambio()
- End If
- End Sub
- Sub GuardarFamilia(ByVal Instrumento As String)
- If Not TrasladarDatos Is Nothing Then
- If TrasladarDatos.AgregarCMVTA Then
- Dim ValidacionCorrecta As Boolean = ValoresValidos()
- If ValidacionCorrecta Then
- Dim CodigoCompra As String = txtCodigoInversionCM.Text
- Dim CodigoVenta As String = txtCodigoInversion.Text
- Dim NombreTabla As String = String.Empty
- Dim Coleccion As New Collection
- If Instrumento.IndexOf("OPC") > -1 Then
- NombreTabla = "OPC0"
- Coleccion = Variables.ColeccionFUTU
- ElseIf Instrumento.IndexOf("FUTU") > -1 Then
- NombreTabla = "FUT0"
- Coleccion = Variables.ColeccionFUTU
- ElseIf Instrumento.IndexOf("ACC") > -1 Then
- NombreTabla = "ACC0"
- Coleccion = Variables.ColeccionACC
- ElseIf Instrumento.IndexOf("CINV") > -1 Then
- NombreTabla = "CIN0"
- Coleccion = Variables.ColeccionCINV
- ElseIf Instrumento.IndexOf("BONO") > -1 Then
- NombreTabla = "BON0"
- Coleccion = Variables.ColeccionCINV
- ElseIf Instrumento.IndexOf("EURB") > -1 Then
- NombreTabla = "EURB0"
- Coleccion = Variables.ColeccionCINV
- ElseIf Instrumento.IndexOf("TIT") > -1 Then
- NombreTabla = "TIT"
- Coleccion = Variables.ColeccionCINV
- Else
- MsgBox("Error al crear Titulo")
- NombreTabla = "Error"
- End If
- If Not Coleccion Is Nothing Then
- If Coleccion.Count > 0 Then
- oDAOGeneral.GenerarCMVTA(CodigoCompra, CodigoVenta, NombreTabla, Coleccion, oPropuestaInversionCE)
- Else
- MsgBox("Error al crear Titulo")
- End If
- Else
- MsgBox("Error al crear Titulo")
- End If
- Else
- MsgBox("Error al crear Titulo")
- End If
- End If
- Else
- If Instrumento.IndexOf("LETE") > -1 Then
- Dim oDAOLetes As New LETESDAO
- Dim ColeccionLETE As Collection = Variables.ColeccionLETE
- If ColeccionLETE.Count > 0 Then
- oDAOLetes.NuevoIngreso(ColeccionLETE, "LETE")
- ColeccionLETE.Clear()
- End If
- End If
- If Instrumento.IndexOf("PBUR") > -1 Then
- Dim oDAOLetes As New LETESDAO
- Dim ColeccionLETE As Collection = Variables.ColeccionLETE
- If ColeccionLETE.Count > 0 Then
- oDAOLetes.NuevoIngreso(ColeccionLETE, "PBUR")
- ColeccionLETE.Clear()
- End If
- End If
- If Instrumento.IndexOf("VCN") > -1 Then
- Dim oDAOLetes As New LETESDAO
- Dim ColeccionLETE As Collection = Variables.ColeccionLETE
- If ColeccionLETE.Count > 0 Then
- oDAOLetes.NuevoIngreso(ColeccionLETE, "VCN")
- ColeccionLETE.Clear()
- End If
- End If
- If Instrumento.IndexOf("CETE") > -1 Then
- Dim oDAOLetes As New LETESDAO
- Dim ColeccionLETE As Collection = Variables.ColeccionLETE
- If ColeccionLETE.Count > 0 Then
- oDAOLetes.NuevoIngreso(ColeccionLETE, "CETE")
- ColeccionLETE.Clear()
- End If
- End If
- If Instrumento.IndexOf("ACC") > -1 Then
- Dim oDAOACC As New AccionesDAO
- Dim ColeccionACC As Collection = Variables.ColeccionACC
- If ColeccionACC.Count > 0 Then
- oDAOACC.NuevaAccion(Variables.Codigo, ColeccionACC)
- ColeccionACC.Clear()
- FormAcciones.Dispose()
- End If
- End If
- If Instrumento.IndexOf("CINV") > -1 Then
- Dim oDAOCINV As New CertificadosDeInversionDAO
- Dim ColeccionCINV As Collection = Variables.ColeccionCINV
- If ColeccionCINV.Count > 0 Then
- oDAOCINV.Nuevo(ColeccionCINV, "CINV")
- ColeccionCINV.Clear()
- End If
- End If
- If Instrumento.IndexOf("BONO") > -1 Then
- Dim oDAOCINV As New CertificadosDeInversionDAO
- Dim ColeccionCINV As Collection = Variables.ColeccionCINV
- If ColeccionCINV.Count > 0 Then
- oDAOCINV.Nuevo(ColeccionCINV, "BONO")
- ColeccionCINV.Clear()
- End If
- End If
- If Instrumento.IndexOf("EURB0") > -1 Then
- Dim oDAOCINV As New CertificadosDeInversionDAO
- Dim ColeccionCINV As Collection = Variables.ColeccionCINV
- If ColeccionCINV.Count > 0 Then
- oDAOCINV.Nuevo(ColeccionCINV, "EURB")
- ColeccionCINV.Clear()
- End If
- End If
- If Instrumento.IndexOf("TIT") > -1 Then
- Dim oDAOCINV As New CertificadosDeInversionDAO
- Dim ColeccionCINV As Collection = Variables.ColeccionCINV
- If ColeccionCINV.Count > 0 Then
- oDAOCINV.Nuevo(ColeccionCINV, "TIT")
- ColeccionCINV.Clear()
- End If
- End If
- If Instrumento.IndexOf("DAP") > -1 Then
- Dim oDAODAP As New DepositosAPlazoDAO
- Dim ColeccionDAP As Collection = Variables.ColeccionDAP
- Dim diccionario = Variables.ColeccionDAPDi
- If ColeccionDAP.Count > 0 And Not diccionario Is Nothing Then
- oDAODAP.NuevoDato(ColeccionDAP, diccionario, Variables.Codigo)
- ColeccionDAP.Clear()
- diccionario = Nothing
- End If
- End If
- If Instrumento.IndexOf("NEST") > -1 Then
- Dim oDAONEST As New DAONotaEstructurada
- Dim ColeccionDAP As Collection = Variables.ColeccionNEST
- Dim diccionario = Variables.ColeccionNESTDi
- If ColeccionNEST.Count > 0 And Not diccionario Is Nothing Then
- oDAONEST.NuevoDato(ColeccionNEST, diccionario, Variables.Codigo)
- ColeccionNEST.Clear()
- diccionario = Nothing
- End If
- End If
- If Instrumento.IndexOf("FINV") > -1 Then
- Dim oDAOFINV As New FondoInversionDAO
- Dim ColeccionFINV As Collection = Variables.ColeccionFINV
- Dim diccionario = Variables.ColeccionFINVDi
- If ColeccionFINV.Count > 0 And Not diccionario Is Nothing Then
- oDAOFINV.ProcesoDatos(ColeccionFINV, Variables.Codigo, diccionario, "Nuevo")
- ColeccionFINV.Clear()
- diccionario = Nothing
- End If
- End If
- If Instrumento.IndexOf("FUTU") > -1 Then
- Dim oDAOFUTU As New FuturosDAO
- Dim ColeccionFUTU As Collection = Variables.ColeccionFUTU
- If ColeccionFUTU.Count > 0 Then
- oDAOFUTU.Nuevo(Variables.Codigo, ColeccionFUTU)
- ColeccionFUTU.Clear()
- End If
- End If
- If Instrumento.IndexOf("OPC") > -1 Then
- Dim oDAOOPC As New FuturosDAO
- Dim ColeccionOPC As Collection = Variables.ColeccionFUTU
- If ColeccionOPC.Count > 0 Then
- oDAOOPC.NuevoOpciones(Variables.Codigo, ColeccionOPC)
- ColeccionOPC.Clear()
- End If
- End If
- If Instrumento.IndexOf("PEMP") > -1 Then
- Dim oDAOPEMP As New PrestamoEmpresarialDAO
- Dim ColeccionPEMP As Collection = Variables.ColeccionPEMP
- Dim diccionario = Variables.ColeccionPEMPDi
- If ColeccionPEMP.Count > 0 And Not diccionario Is Nothing Then
- oDAOPEMP.ProcesoDatos(ColeccionPEMP, Variables.Codigo, diccionario, "Nuevo")
- ColeccionPEMP.Clear()
- diccionario = Nothing
- End If
- End If
- If Instrumento.IndexOf("PPER") > -1 Then
- Dim oDAOPPER As New PrestamoPersonalDAO
- Dim ColeccionPPERDEUDOR As Collection = Variables.ColeccionPPERDEUDOR
- Dim ColeccionPPERDETALLE As Collection = Variables.ColeccionPPERDETALLE
- Dim diccionario = Variables.ColeccionPPERAMORTDi
- If ColeccionPPERDEUDOR.Count > 0 And ColeccionPPERDETALLE.Count > 0 And Not diccionario Is Nothing Then
- oDAOPPER.ProcesoDatos(ColeccionPPERDEUDOR, ColeccionPPERDETALLE, Variables.Codigo, diccionario, "Nuevo", "Nuevo")
- ColeccionPPERDEUDOR.Clear()
- ColeccionPPERDETALLE.Clear()
- diccionario = Nothing
- End If
- End If
- If Instrumento.IndexOf("REPOVENTA") > -1 Then
- Dim oDAOREPO As New ReportosDAO
- Dim diccionario = Variables.ColeccionREPO
- If Not diccionario Is Nothing Then
- oDAOREPO.ProcesoDatos(diccionario, Variables.Codigo, "REP0VENTA")
- diccionario = Nothing
- End If
- ElseIf Instrumento.IndexOf("REPO") > -1 And Not Instrumento.IndexOf("REPOVENTA") > -1 Then
- Dim oDAOREPO As New ReportosDAO
- Dim diccionario = Variables.ColeccionREPO
- If Not diccionario Is Nothing Then
- oDAOREPO.ProcesoDatos(diccionario, Variables.Codigo, "REP0")
- diccionario = Nothing
- End If
- End If
- End If
- End Sub
- Function GuardarColecciones()
- Dim DiccionarioColecciones As New Dictionary(Of String, Collection)
- DiccionarioColecciones.Add("Empresa", Col_Empresas)
- DiccionarioColecciones.Add("Emisor", Col_Emisor)
- DiccionarioColecciones.Add("EstDocumento", Col_EstDocumento)
- DiccionarioColecciones.Add("Instrumento", Col_Instrumento)
- DiccionarioColecciones.Add("CalRiesgo", Col_CalRiesgo)
- DiccionarioColecciones.Add("TipOperacion", Col_TipOperacion)
- DiccionarioColecciones.Add("OriFond", Col_OriFond)
- DiccionarioColecciones.Add("CalERiesgo", Col_CalERiesgo)
- DiccionarioColecciones.Add("Aut", Col_Aut)
- DiccionarioColecciones.Add("Plazo", Col_Plazo)
- DiccionarioColecciones.Add("Pais", Col_Pais)
- DiccionarioColecciones.Add("TipMercado", Col_TipMercado)
- Return DiccionarioColecciones
- End Function
- Private Sub LanzarBusqueda()
- Dim DiccionarioColecciones As New Dictionary(Of String, Collection)
- DiccionarioColecciones = GuardarColecciones()
- frmBuscarDeLista.dgvBuscarDeLista.DataSource = oDAOPropuestasDeInversion.BuscarPropuestasCodigo(DiccionarioColecciones).Tables("Resultado")
- If frmBuscarDeLista.ShowDialog = DialogResult.OK Then
- If Not frmBuscarDeLista.CodigoPrincipal = Nothing Then
- CargarPropuesta(frmBuscarDeLista.CodigoPrincipal)
- End If
- End If
- End Sub
- Private Sub navPrimerRegistro_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub navRegistroAnterior_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub navSiguienteRegistro_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub navUltimoRegistro_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub navNuevoRegistro_Click(sender As Object, e As EventArgs)
- NuevaPropuesta()
- End Sub
- Private Sub navEliminarRegistro_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub navBuscar_Click(sender As Object, e As EventArgs)
- PrepararBusqueda()
- End Sub
- Private Sub cboEmpresas_LostFocus(sender As Object, e As EventArgs) Handles cboEmpresas.LostFocus
- End Sub
- Sub GenerarCodigoDeInversion()
- Dim vEmpresa As String
- Dim vCodigoIF As String
- Dim oCodigo As String
- vEmpresa = oPropuestaInversionCE.CodigoEmpresa
- vCodigoIF = oPropuestaInversionCE.CodigoInstrumentoFinanciero
- oCodigo = SeriesDAO.SiguienteCodigoInversion(vEmpresa, vCodigoIF)
- Me.txtCodigoInversion.Text = oCodigo
- End Sub
- Private Sub txtCodigoInversion_TextChanged(sender As Object, e As EventArgs) Handles txtCodigoInversion.TextChanged
- LimpiarVariablesTraspaso()
- ControlCodigoInversion()
- ControlCambio()
- Variables.CodigoComparativo = String.Empty
- End Sub
- Sub ControlCambio()
- Dim EstadoAut As String = cboAutorizacion.SelectedValue
- Dim Codigo As String = txtCodigoInversion.Text
- If Not String.IsNullOrEmpty(Codigo) Or TipoTransaccion = "N" Then
- If TipoTransaccion = "N" Then
- pnlCambiarRev.Visible = False
- pnlCambiarRec.Visible = False
- pnlCambiarApro.Visible = False
- Else
- If Not TipoTransaccion = "A" Then
- If EstadoAut = "P" Then
- pnlCambiarRev.Visible = True
- pnlCambiarRec.Visible = True
- pnlCambiarApro.Visible = False
- ElseIf EstadoAut = "V" Then
- pnlCambiarRev.Visible = False
- pnlCambiarRec.Visible = True
- pnlCambiarApro.Visible = True
- ElseIf EstadoAut = "A" Or EstadoAut = "R" Then
- pnlCambiarRev.Visible = False
- pnlCambiarRec.Visible = False
- pnlCambiarApro.Visible = False
- TipoTransaccion = "B"
- End If
- End If
- End If
- End If
- EstadoControladoresNAV()
- End Sub
- Private Sub ControlEmpresa()
- If TipoTransaccion = "N" Then
- oPropuestaInversionCE.CodigoEmpresa = Me.cboEmpresas.SelectedValue
- GenerarCodigoDeInversion()
- End If
- If TipoTransaccion = "N" Or TipoTransaccion = "B" Or TipoTransaccion = "A" Then
- oPropuestaInversionCE.CodigoEmpresa = Me.cboEmpresas.SelectedValue
- End If
- End Sub
- Private Sub ControlAsunto()
- oPropuestaInversionCE.Asunto = Me.txtAsunto.Text
- End Sub
- Private Sub ControlInstrumento()
- If TipoTransaccion = "N" Then
- oPropuestaInversionCE.CodigoInstrumentoFinanciero = Me.cboInstrumentosFinancieros.SelectedValue
- GenerarCodigoDeInversion()
- End If
- If TipoTransaccion = "N" Or TipoTransaccion = "B" Or TipoTransaccion = "A" Then
- oPropuestaInversionCE.CodigoInstrumentoFinanciero = Me.cboInstrumentosFinancieros.SelectedValue
- End If
- End Sub
- Private Sub ControlPlazoFactor()
- If TipoTransaccion = "N" Or TipoTransaccion = "A" Then
- oPropuestaInversionCE.PlazoFactor = Me.cboPlazosFactor.SelectedValue
- End If
- End Sub
- Private Sub ControlOrigenDeFondos()
- If TipoTransaccion = "N" Or TipoTransaccion = "A" Then
- oPropuestaInversionCE.OrigenDeFondos = Me.cboOrigenDeFondos.SelectedValue
- End If
- End Sub
- Private Sub ControlEmisores()
- If TipoTransaccion = "N" Or TipoTransaccion = "B" Or TipoTransaccion = "A" Then
- oPropuestaInversionCE.CodigoEmisor = Me.cboEmisores.SelectedValue
- End If
- End Sub
- Private Sub ControlCalificacionesDeRiesgo()
- If TipoTransaccion = "N" Or TipoTransaccion = "B" Or TipoTransaccion = "A" Then
- oPropuestaInversionCE.CodigoCalificacionDeRiesgo = Me.cboCalificacionDeRiesgo.SelectedValue
- End If
- End Sub
- Private Sub ControlCalificadoraDeRiesgo()
- If TipoTransaccion = "N" Or TipoTransaccion = "B" Or TipoTransaccion = "A" Then
- oPropuestaInversionCE.CodigoEmpresaCalificadora = Me.cboCalificadoraDeRiesgo.SelectedValue
- End If
- End Sub
- Private Sub ControlTipoMercado()
- If TipoTransaccion = "N" Or TipoTransaccion = "B" Or TipoTransaccion = "A" Then
- If Me.cboTipoMercado.SelectedIndex = -1 Then
- oPropuestaInversionCE.TipoMercado = ""
- Else
- oPropuestaInversionCE.TipoMercado = Me.cboTipoMercado.SelectedValue
- End If
- End If
- End Sub
- Private Sub ControlPais()
- If TipoTransaccion = "N" Or TipoTransaccion = "B" Or TipoTransaccion = "A" Then
- If Me.cboPaises.SelectedIndex = -1 Then
- oPropuestaInversionCE.Pais = ""
- Else
- oPropuestaInversionCE.Pais = Me.cboPaises.SelectedValue
- End If
- End If
- End Sub
- Private Sub ControlPlazoFact()
- If TipoTransaccion = "N" Or TipoTransaccion = "B" Or TipoTransaccion = "A" Then
- oPropuestaInversionCE.PlazoFactor = Me.cboPlazosFactor.SelectedValue
- End If
- End Sub
- Private Sub ControlJustificacion()
- If TipoTransaccion = "N" Or TipoTransaccion = "A" Then
- oPropuestaInversionCE.Justificacion = Me.txtJustificacion.Text
- End If
- End Sub
- Private Sub ControlOFon()
- If TipoTransaccion = "N" Or TipoTransaccion = "B" Or TipoTransaccion = "A" Then
- If cboOrigenDeFondos.SelectedIndex = -1 Then
- oPropuestaInversionCE.OrigenDeFondos = ""
- Else
- oPropuestaInversionCE.OrigenDeFondos = cboOrigenDeFondos.SelectedValue
- End If
- End If
- End Sub
- Private Sub ControlTipOper()
- If TipoTransaccion = "N" Or TipoTransaccion = "B" Or TipoTransaccion = "A" Then
- If cboTipoOperacion.SelectedIndex = -1 Then
- oPropuestaInversionCE.TipoOperacion = ""
- Else
- oPropuestaInversionCE.TipoOperacion = cboTipoOperacion.SelectedValue
- End If
- End If
- End Sub
- Private Sub ControlComentarios()
- If TipoTransaccion = "N" Or TipoTransaccion = "A" Then
- oPropuestaInversionCE.Comentarios = Me.txtComentarios.Text
- End If
- End Sub
- Private Sub ControlCodigoInversion()
- If TipoTransaccion = "N" Or TipoTransaccion = "B" Then
- oPropuestaInversionCE.CodigoInversion = txtCodigoInversion.Text
- End If
- End Sub
- Private Sub ControlEstadoDocumento()
- If TipoTransaccion = "N" Or TipoTransaccion = "B" Or TipoTransaccion = "A" Then
- oPropuestaInversionCE.EstadoDocumento = Me.cboEstadoDocumento.SelectedValue
- End If
- End Sub
- Private Sub ControlEstadoAutorizacion()
- If TipoTransaccion = "N" Or TipoTransaccion = "B" Or TipoTransaccion = "A" Then
- oPropuestaInversionCE.EstadoAutorizacion = Me.cboAutorizacion.SelectedValue
- End If
- End Sub
- Private Sub ControlFechaDocumento()
- If TipoTransaccion = "N" Or TipoTransaccion = "A" Then
- oPropuestaInversionCE.FechaDocumento = Me.dtpFechaDocumento.Value.Date
- End If
- End Sub
- Private Sub ControlTipoOperacion()
- If TipoTransaccion = "N" Or TipoTransaccion = "A" Then
- oPropuestaInversionCE.TipoOperacion = Me.cboTipoOperacion.SelectedValue
- End If
- End Sub
- Private Sub ControlNombre()
- If TipoTransaccion = "N" Or TipoTransaccion = "A" Then
- oPropuestaInversionCE.NombreManual = txtNombre.Text
- End If
- End Sub
- Private Sub ControlTipoRenta()
- If TipoTransaccion = "N" Or TipoTransaccion = "A" Then
- If Not TypeOf Me.cboRenta.SelectedValue Is DataRowView Then
- oPropuestaInversionCE.TipoRenta = Me.cboRenta.SelectedValue
- End If
- End If
- End Sub
- Private Sub ControlTasa()
- If Not TypeOf Me.cboTasa.SelectedValue Is DataRowView Then
- If TipoTransaccion = "N" Or TipoTransaccion = "A" Then
- oPropuestaInversionCE.TipoTasa = Me.cboTasa.SelectedValue
- End If
- End If
- End Sub
- Private Sub ControlPeriodicidad()
- If Not TypeOf Me.cboPeriodicidad.SelectedValue Is DataRowView Then
- If TipoTransaccion = "N" Or TipoTransaccion = "A" Then
- oPropuestaInversionCE.Periodicidad = Me.cboPeriodicidad.SelectedValue
- End If
- End If
- End Sub
- Private Sub LimpiarControles()
- Dim vCero As Double = 0
- Dim vCerotxt As String = vCero.ToString(Configuraciones.CodigoTXTMontos)
- Me.cboEmpresas.SelectedIndex = -1
- Me.txtAsunto.Text = String.Empty
- Me.cboInstrumentosFinancieros.SelectedIndex = -1
- Me.cboPlazosFactor.SelectedIndex = -1
- Me.cboOrigenDeFondos.SelectedIndex = 0
- Me.cboEmisores.SelectedIndex = -1
- Me.cboCalificacionDeRiesgo.SelectedIndex = -1
- Me.cboCalificadoraDeRiesgo.SelectedIndex = -1
- Me.txtJustificacion.Text = String.Empty
- Me.txtComentarios.Text = String.Empty
- Me.txtCodigoInversion.Text = String.Empty
- Me.txtCodigoInversion.ReadOnly = True
- Me.cboEstadoDocumento.SelectedValue = "A"
- Me.cboAutorizacion.SelectedValue = "P"
- Me.dtpFechaDocumento.Value = Date.Now.Date
- Me.cboTipoOperacion.SelectedValue = "C"
- Me.cboTipoMercado.SelectedIndex = -1
- Me.cboPaises.SelectedIndex = -1
- End Sub
- Private Sub RefrescarValoresControles()
- ControlEmpresa()
- ControlAsunto()
- ControlInstrumento()
- ControlPlazoFactor()
- ControlOrigenDeFondos()
- ControlEmisores()
- ControlCalificacionesDeRiesgo()
- ControlCalificadoraDeRiesgo()
- ControlJustificacion()
- ControlComentarios()
- ControlCodigoInversion()
- ControlEstadoDocumento()
- ControlEstadoAutorizacion()
- ControlFechaDocumento()
- ControlTipoOperacion()
- ControlTipoMercado()
- ControlPais()
- ControlPlazoFact()
- ControlOFon()
- ControlTipOper()
- ControlNombre()
- ControlTipoRenta()
- ControlTasa()
- ControlPeriodicidad()
- End Sub
- Private Function ValoresValidos() As Boolean
- Dim DatosValidos As Boolean = True
- If String.IsNullOrEmpty(txtNombre.Text.ToString) Then
- MsgBox("Ingrese el nombre del titulo")
- DatosValidos = False
- Return DatosValidos
- End If
- If cboEmpresas.SelectedIndex = -1 Then
- MsgBox("Seleccione una Empresa")
- DatosValidos = False
- Return DatosValidos
- End If
- If cboInstrumentosFinancieros.SelectedIndex = -1 Then
- MsgBox("Seleccione un Instrumento")
- DatosValidos = False
- Return DatosValidos
- End If
- If cboTipoMercado.SelectedIndex = -1 Then
- MsgBox("Seleccione un Tipo de Mercado")
- DatosValidos = False
- Return DatosValidos
- End If
- If cboPaises.SelectedIndex = -1 Then
- MsgBox("Seleccione un Pais")
- DatosValidos = False
- Return DatosValidos
- End If
- If cboEstadoDocumento.SelectedIndex = -1 Then
- MsgBox("Error con los campos del titulo")
- DatosValidos = False
- Return DatosValidos
- End If
- If cboTipoOperacion.SelectedIndex = -1 Then
- MsgBox("Error con los campos del titulo")
- DatosValidos = False
- Return DatosValidos
- End If
- If cboOrigenDeFondos.SelectedIndex = -1 Then
- MsgBox("Error con los campos del titulo")
- DatosValidos = False
- Return DatosValidos
- End If
- If cboAutorizacion.SelectedIndex = -1 Then
- MsgBox("Error con los campos del titulo")
- DatosValidos = False
- Return DatosValidos
- End If
- Return DatosValidos
- End Function
- Private Sub cboTipoOperacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboTipoOperacion.SelectedIndexChanged
- ControlTipoOperacion()
- ControlTipOper()
- ActualizarEstado(sender)
- End Sub
- Sub ActualizarEstado(sender As Object)
- Dim TOp As String = String.Empty
- If Not TypeOf sender.selectedvalue Is DataRowView Then
- If Not sender.selectedvalue Is Nothing Then
- TOp = sender.selectedvalue
- FormFuturos = New frmFuturos(TOp)
- FormAcciones = New frmAcciones(TOp)
- FormCINV = New frmCertificadosDeInversion(TOp)
- End If
- End If
- End Sub
- Private Sub btnDetalleIF_Click(sender As Object, e As EventArgs) Handles btnDetalleIF.Click
- Dim ProTipoTransaccionCompraVenta As String = cboTipoOperacion.SelectedValue.ToString
- Dim ProNueva As String = TipoTransaccion
- Dim CodigoExiste As String = txtCodigoInversion.Text.ToString
- Dim CodigoInstrumentoExiste As String = Operaciones.ConvertirCadena(cboInstrumentosFinancieros.SelectedValue)
- ''################################################################
- Variables.TipoOperacionCMVTA = cboTipoOperacion.SelectedValue
- Variables.InvocadorProInv = "frmPIN"
- ''################################################################
- ''################################################################
- Variables.Periodicidad = cboPeriodicidad.SelectedValue
- ''################################################################
- ''################################################################
- Dim TipOperacion As String = oPropuestaInversionCE.TipoOperacion
- ''################################################################
- TieneDetalleInstrumento = True
- ''################################################################
- Dim NuevaPosInstrumento As Boolean = False
- ''################################################################
- Variables.Codigo = txtCodigoInversion.Text.ToString
- If String.IsNullOrEmpty(Variables.CodigoComparativo) Then
- Variables.CodigoComparativo = Variables.Codigo
- NuevaPosInstrumento = True
- Else
- If Not Variables.CodigoComparativo = Variables.Codigo Then
- NuevaPosInstrumento = True
- End If
- End If
- ''################################################################
- Variables.InvPro = "P"
- ''################################################################
- Dim CodigoInstrumento As String = String.Empty
- ''################################################################
- CodigoInstrumento = txtCodigoInversion.Text.ToString
- ''################################################################
- ''################################################################
- ''################################################################
- If CodigoInstrumento.IndexOf("FINV") > -1 Then
- Operaciones.TraspasarDatos(CodigoExiste, CodigoInstrumentoExiste, ProNueva, ProTipoTransaccionCompraVenta, "FamiliaFINV")
- Dim ExistInstrumento As Boolean = ExisteInstrumento("FINV")
- Try
- If ExistInstrumento Then
- FormFINV.Dispose()
- FormFINV = New frmFOIN
- FormFINV.ShowDialog()
- Else
- If NuevaPosInstrumento Then
- FormFINV.Dispose()
- FormFINV = New frmFOIN
- FormFINV.ShowDialog()
- Else
- FormFINV.ShowDialog()
- End If
- End If
- Catch ex As Exception
- FormFINV = New frmFOIN
- FormFINV.ShowDialog()
- End Try
- End If
- ''################################################################
- ''################################################################
- ''################################################################
- ''################################################################
- If (CodigoInstrumento.IndexOf("FUTU") > -1 Or CodigoInstrumento.IndexOf("OPC") > -1) Then
- Operaciones.TraspasarDatos(CodigoExiste, CodigoInstrumentoExiste, ProNueva, ProTipoTransaccionCompraVenta, "FamiliaFuturos")
- Dim ExistInstrumento As Boolean
- If (CodigoInstrumento.IndexOf("FUTU") > -1) Then
- ExistInstrumento = ExisteInstrumento("FUT0")
- Else
- ExistInstrumento = ExisteInstrumento("OPC0")
- End If
- Try
- If ExistInstrumento Then
- CantFormAbierto = False
- FormFuturos.Dispose()
- FormFuturos = New frmFuturos(TipOperacion)
- FormFuturos.ShowDialog()
- Else
- If NuevaPosInstrumento Then
- CantFormAbierto = False
- FormFuturos.Dispose()
- FormFuturos = New frmFuturos(TipOperacion)
- FormFuturos.ShowDialog()
- Else
- CantFormAbierto = True
- FormFuturos.ShowDialog()
- End If
- End If
- Catch ex As Exception
- CantFormAbierto = False
- FormFuturos = New frmFuturos(TipOperacion)
- FormFuturos.ShowDialog()
- End Try
- End If
- ''################################################################
- ''################################################################
- ''################################################################
- ''################################################################
- If CodigoInstrumento.IndexOf("REPO") > -1 Or CodigoInstrumento.IndexOf("REPOVENTA") > -1 Then
- Operaciones.TraspasarDatos(CodigoExiste, CodigoInstrumentoExiste, ProNueva, ProTipoTransaccionCompraVenta, "FamiliaReporto")
- Dim ExistInstrumento As Boolean
- If CodigoInstrumento.IndexOf("REPOVENTA") > -1 Then
- ExistInstrumento = ExisteInstrumento("REP0VENTA")
- Else
- ExistInstrumento = ExisteInstrumento("REP0")
- End If
- Try
- If ExistInstrumento Then
- FormRepo.Dispose()
- FormRepo = New frmReporto
- FormRepo.ShowDialog()
- Else
- If NuevaPosInstrumento Then
- FormRepo.Dispose()
- FormRepo = New frmReporto
- FormRepo.ShowDialog()
- Else
- FormRepo.ShowDialog()
- End If
- End If
- Catch ex As Exception
- FormRepo = New frmReporto
- FormRepo.ShowDialog()
- End Try
- End If
- ''################################################################
- ''################################################################
- ''################################################################
- ''################################################################
- If CodigoInstrumento.IndexOf("PPER") > -1 Then
- Operaciones.TraspasarDatos(CodigoExiste, CodigoInstrumentoExiste, ProNueva, ProTipoTransaccionCompraVenta, "FamiliaPrestamoPersonal")
- Dim ExistInstrumento As Boolean = ExisteInstrumento("PPER0")
- Try
- If ExistInstrumento Then
- FormPrestamoPersonal.Dispose()
- FormPrestamoPersonal = New frmPrestamoPersonal
- FormPrestamoPersonal.ShowDialog()
- Else
- If NuevaPosInstrumento Then
- FormPrestamoPersonal.Dispose()
- FormPrestamoPersonal = New frmPrestamoPersonal
- FormPrestamoPersonal.ShowDialog()
- Else
- FormPrestamoPersonal.ShowDialog()
- End If
- End If
- Catch ex As Exception
- FormPrestamoPersonal = New frmPrestamoPersonal
- FormPrestamoPersonal.ShowDialog()
- End Try
- End If
- ''################################################################
- ''################################################################
- ''################################################################
- ''################################################################
- If CodigoInstrumento.IndexOf("PEMP") > -1 Then
- Operaciones.TraspasarDatos(CodigoExiste, CodigoInstrumentoExiste, ProNueva, ProTipoTransaccionCompraVenta, "FamiliaEmpresas")
- Dim ExistInstrumento As Boolean = ExisteInstrumento("PEMP0")
- Try
- If ExistInstrumento Then
- FormPrestamoEmpresarial.Dispose()
- FormPrestamoEmpresarial = New frmPrestamoEmpresariales
- FormPrestamoEmpresarial.ShowDialog()
- Else
- If NuevaPosInstrumento Then
- FormPrestamoEmpresarial.Dispose()
- FormPrestamoEmpresarial = New frmPrestamoEmpresariales
- FormPrestamoEmpresarial.ShowDialog()
- Else
- FormPrestamoEmpresarial.ShowDialog()
- End If
- End If
- Catch ex As Exception
- FormPrestamoEmpresarial = New frmPrestamoEmpresariales
- FormPrestamoEmpresarial.ShowDialog()
- End Try
- End If
- ''################################################################
- ''################################################################
- ''################################################################
- ''################################################################
- Dim Acciones As Integer = 0
- If CodigoInstrumento.IndexOf("ACC") > -1 Then
- Operaciones.TraspasarDatos(CodigoExiste, CodigoInstrumentoExiste, ProNueva, ProTipoTransaccionCompraVenta, "FamiliaAcciones")
- Dim ExistInstrumento As Boolean = ExisteInstrumento("ACC0")
- Try
- If ExistInstrumento Then
- CantFormAbierto = False
- FormAcciones.Dispose()
- FormAcciones = New frmAcciones(TipOperacion)
- FormAcciones.CargarRegistro(oPropuestaInversionCE.CodigoInversion)
- FormAcciones.ShowDialog()
- Else
- If NuevaPosInstrumento Then
- CantFormAbierto = False
- FormAcciones.Dispose()
- FormAcciones = New frmAcciones(TipOperacion)
- FormAcciones.ShowDialog()
- Else
- CantFormAbierto = True
- FormAcciones.ShowDialog()
- End If
- End If
- Catch ex As Exception
- CantFormAbierto = False
- FormAcciones = New frmAcciones(TipOperacion)
- FormAcciones.ShowDialog()
- End Try
- End If
- ''################################################################
- ''################################################################
- ''################################################################
- ''################################################################
- If CodigoInstrumento.IndexOf("LETE") > -1 Or CodigoInstrumento.IndexOf("PBUR") > -1 Or CodigoInstrumento.IndexOf("VCN") > -1 Or CodigoInstrumento.IndexOf("CETE") > -1 Then
- Operaciones.TraspasarDatos(CodigoExiste, CodigoInstrumentoExiste, ProNueva, ProTipoTransaccionCompraVenta, "FamiliaLetes")
- Dim ExistInstrumento As Boolean
- If CodigoInstrumento.IndexOf("LETE") > -1 Then
- ExistInstrumento = ExisteInstrumento("LET0")
- ElseIf CodigoInstrumento.IndexOf("PBUR") > -1 Then
- ExistInstrumento = ExisteInstrumento("PBUR")
- ElseIf CodigoInstrumento.IndexOf("VCN") > -1 Then
- ExistInstrumento = ExisteInstrumento("VCN")
- Else
- ExistInstrumento = ExisteInstrumento("CET0")
- End If
- Try
- If ExistInstrumento Then
- FormLete.Dispose()
- FormLete = New frmLetes
- FormLete.ShowDialog()
- Else
- If NuevaPosInstrumento Then
- FormLete.Dispose()
- FormLete = New frmLetes
- FormLete.ShowDialog()
- Else
- FormLete.ShowDialog()
- End If
- End If
- Catch ex As Exception
- FormLete = New frmLetes
- FormLete.ShowDialog()
- End Try
- End If
- ''################################################################
- ''################################################################
- ''################################################################
- ''################################################################
- If CodigoInstrumento.IndexOf("BONO") > -1 Or CodigoInstrumento.IndexOf("CINV") > -1 Or CodigoInstrumento.IndexOf("TIT") > -1 Or CodigoInstrumento.IndexOf("EURB") > -1 Then
- Operaciones.TraspasarDatos(CodigoExiste, CodigoInstrumentoExiste, ProNueva, ProTipoTransaccionCompraVenta, "FamiliaCINV")
- Dim ExistInstrumento As Boolean
- If CodigoInstrumento.IndexOf("BONO") > -1 Then
- ExistInstrumento = ExisteInstrumento("BON0")
- ElseIf CodigoInstrumento.IndexOf("CINV") > -1 Then
- ExistInstrumento = ExisteInstrumento("CIN0")
- ElseIf CodigoInstrumento.IndexOf("TIT") > -1 Then
- ExistInstrumento = ExisteInstrumento("TIT")
- Else
- ExistInstrumento = ExisteInstrumento("EURB0")
- End If
- Try
- If ExistInstrumento Then
- CantFormAbierto = False
- FormCINV.Dispose()
- FormCINV = New frmCertificadosDeInversion(TipOperacion)
- FormCINV.CargarRegistro(oPropuestaInversionCE.CodigoInversion)
- FormCINV.ShowDialog()
- Else
- If NuevaPosInstrumento Then
- CantFormAbierto = False
- FormCINV.Dispose()
- FormCINV = New frmCertificadosDeInversion(TipOperacion)
- FormCINV.ShowDialog()
- Else
- CantFormAbierto = True
- FormCINV.ShowDialog()
- End If
- End If
- Catch ex As Exception
- CantFormAbierto = False
- FormCINV = New frmCertificadosDeInversion(TipOperacion)
- FormCINV.ShowDialog()
- End Try
- End If
- ''################################################################
- ''################################################################
- ''################################################################
- ''################################################################
- If CodigoInstrumento.IndexOf("DAP") > -1 Then
- Operaciones.TraspasarDatos(CodigoExiste, CodigoInstrumentoExiste, ProNueva, ProTipoTransaccionCompraVenta, "FamiliaDAP")
- Dim ExistInstrumento As Boolean = ExisteInstrumento("DAP0")
- Try
- If ExistInstrumento Then
- FormDAP.Dispose()
- FormDAP = New frmDepositosAPlazo
- FormDAP.CargarRegistro(oPropuestaInversionCE.CodigoInversion)
- FormDAP.ShowDialog()
- Else
- If NuevaPosInstrumento Then
- FormDAP.Dispose()
- FormDAP = New frmDepositosAPlazo
- FormDAP.ShowDialog()
- Else
- FormDAP.ShowDialog()
- End If
- End If
- Catch ex As Exception
- FormDAP = New frmDepositosAPlazo
- FormDAP.ShowDialog()
- End Try
- End If
- ''################################################################
- ''################################################################
- ''################################################################
- ''################################################################
- If CodigoInstrumento.IndexOf("NEST") > -1 Then
- Operaciones.TraspasarDatos(CodigoExiste, CodigoInstrumentoExiste, ProNueva, ProTipoTransaccionCompraVenta, "FamiliaDAP")
- Dim ExistInstrumento As Boolean = ExisteInstrumento("NEST0")
- Try
- If ExistInstrumento Then
- FormNEST.Dispose()
- FormNEST = New frmNotaEstructurada
- FormNEST.CargarRegistro(oPropuestaInversionCE.CodigoInversion)
- FormNEST.ShowDialog()
- Else
- If NuevaPosInstrumento Then
- FormNEST.Dispose()
- FormNEST = New frmNotaEstructurada
- FormNEST.ShowDialog()
- Else
- FormNEST.ShowDialog()
- End If
- End If
- Catch ex As Exception
- FormNEST = New frmNotaEstructurada
- FormNEST.ShowDialog()
- End Try
- End If
- ''################################################################
- ''################################################################
- End Sub
- Function ExisteInstrumento(ByVal Tabla As String)
- Dim General As New DAOGeneral
- Variables.Codigo = txtCodigoInversion.Text.ToString
- Dim Codigo As String = Variables.Codigo
- Dim Existe As Boolean = General.ExisteTitulo(Codigo, Tabla)
- Return Existe
- End Function
- Function ExisteInstrumentoReal(ByVal Tabla As String)
- Dim General As New DAOGeneral
- Dim Codigo As String = txtCodigoInversion.Text
- Dim Existe As Boolean = General.ExisteTitulo(Codigo, Tabla)
- Return Existe
- End Function
- Private Sub navNuevo_Click(sender As Object, e As EventArgs)
- NuevaPropuesta()
- End Sub
- Private Sub DeshabilitarControles()
- cboEmpresas.Enabled = False
- txtAsunto.ReadOnly = True
- cboInstrumentosFinancieros.Enabled = False
- cboPlazosFactor.Enabled = False
- cboOrigenDeFondos.Enabled = False
- cboEmisores.Enabled = False
- cboCalificacionDeRiesgo.Enabled = False
- cboCalificadoraDeRiesgo.Enabled = False
- txtJustificacion.ReadOnly = True
- txtComentarios.ReadOnly = True
- cboTipoOperacion.Enabled = False
- cboEstadoDocumento.Enabled = False
- cboAutorizacion.Enabled = False
- dtpFechaDocumento.Enabled = False
- cboTipoMercado.Enabled = False
- cboPaises.Enabled = False
- txtCodigoInversion.ReadOnly = True
- cboRenta.Enabled = False
- cboTasa.Enabled = False
- cboPeriodicidad.Enabled = False
- End Sub
- Private Sub HabilitarControles()
- cboEmpresas.Enabled = True
- txtAsunto.ReadOnly = False
- cboInstrumentosFinancieros.Enabled = True
- cboPlazosFactor.Enabled = True
- cboOrigenDeFondos.Enabled = False
- cboEmisores.Enabled = True
- cboCalificacionDeRiesgo.Enabled = True
- cboCalificadoraDeRiesgo.Enabled = True
- txtJustificacion.ReadOnly = False
- txtComentarios.ReadOnly = False
- cboTipoOperacion.Enabled = False
- cboAutorizacion.Enabled = False
- dtpFechaDocumento.Enabled = True
- cboTipoMercado.Enabled = True
- cboPaises.Enabled = True
- cboEstadoDocumento.Enabled = False
- cboRenta.Enabled = True
- cboTasa.Enabled = True
- cboPeriodicidad.Enabled = True
- End Sub
- Private Sub PrepararModificacion()
- If oPropuestaInversionCE.EstadoDocumento = "A" Then
- HabilitarControles()
- TipoTransaccion = "A"
- RefrescarControles()
- Me.btnAccion.Text = "Actualizar"
- End If
- End Sub
- Private Sub cboAutorizacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboAutorizacion.SelectedIndexChanged
- ControlEstadoAutorizacion()
- End Sub
- Private Sub btnActivar_Click(sender As Object, e As EventArgs) Handles btnActivar.Click
- If cboTipoOperacion.SelectedValue = "C" Then
- Dim Id = oDAOPropuestasDeInversion.IdRegistro(txtCodigoInversion.Text)
- oPropuestaInversionCE = oDAOPropuestasDeInversion.CargarPropuesta(Id)
- ConvertirEnInversion(Id)
- End If
- End Sub
- Private Sub cboPaises_SelectedIndexChanged(sender As Object, e As EventArgs)
- ControlPais()
- End Sub
- Private Sub cboTipoMercado_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboTipoMercado.SelectedIndexChanged
- ControlTipoMercado()
- End Sub
- Private Sub ConvertirEnInversion(Id As Integer)
- If Not oPropuestaInversionCE Is Nothing Then
- Dim vConversion As Integer
- Dim vIdPropuesta As Integer
- If (oPropuestaInversionCE.IdDeDocumento = 0) Then
- vIdPropuesta = Id
- Else
- vIdPropuesta = oPropuestaInversionCE.IdDeDocumento
- End If
- vConversion = oDAOPropuestasDeInversion.ConvertirEnInversion(vIdPropuesta, EstadoReporto)
- If vConversion = 1 Then
- MsgBox("El proceso de activación se ha efectuado correctamente")
- CargarPropuesta(vIdPropuesta)
- grbInversión.Visible = False
- TipoTransaccion = "B"
- chkUsuario.Checked = False
- Else
- MsgBox("Error")
- End If
- End If
- End Sub
- Private Sub RefrescarControles()
- If TipoTransaccion = "C" Then
- DeshabilitarControles()
- End If
- If TipoTransaccion = "B" Then
- HabilitarControles()
- End If
- If TipoTransaccion = "A" Then
- HabilitarControles()
- cboEstadoDocumento.Enabled = False
- End If
- End Sub
- Private Sub btnCancelar_Click(sender As Object, e As EventArgs) Handles btnCancelar.Click
- Me.Close()
- End Sub
- Private Sub CargarPeriodicidades()
- If (String.IsNullOrEmpty(cboPeriodicidad.SelectedValue)) Then
- Me.cboPeriodicidad.DataSource = oDAOGeneral.ListaPeriodicidad
- Me.cboPeriodicidad.DisplayMember = "Descripcion"
- Me.cboPeriodicidad.ValueMember = "Codigo"
- Me.cboPeriodicidad.SelectedIndex = -1
- End If
- End Sub
- Private Sub CargarTipoRenta()
- Me.cboRenta.DataSource = oDAOGeneral.ListaTipoRenta
- Me.cboRenta.DisplayMember = "Descripcion"
- Me.cboRenta.ValueMember = "Codigo"
- Me.cboRenta.SelectedIndex = -1
- End Sub
- Private Sub CargarTipoTasa()
- Me.cboTasa.DataSource = oDAOGeneral.ListaTipoTasa
- Me.cboTasa.DisplayMember = "Descripcion"
- Me.cboTasa.ValueMember = "Codigo"
- Me.cboTasa.SelectedIndex = -1
- End Sub
- Private Sub cboPeriodicidad_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboPeriodicidad.SelectedIndexChanged
- ControlPeriodicidad()
- End Sub
- Private Sub cboTasa_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboTasa.SelectedIndexChanged
- ControlTasa()
- End Sub
- Private Sub navEliminar_Click(sender As Object, e As EventArgs)
- If (Borrar() = 0) Then
- LimpiarControles()
- End If
- Refrescar()
- PrepararBusqueda()
- End Sub
- Public Sub Refrescar()
- Me.Refresh()
- End Sub
- Public Function Borrar()
- Dim mensaje = MsgBox("¿Deseas Eliminar este registro?", vbOKCancel, "Eliminar")
- If (mensaje = vbOK) Then
- Dim eliminar As New InversionDAO
- Dim valor = eliminar.EliminarPropuesta(txtCodigoInversion.Text)
- If (valor = 1) Then
- MsgBox("Error al Eliminar")
- Return valor
- Else
- MsgBox("Registro Eliminado")
- Return valor
- End If
- End If
- End Function
- Private Sub Navegador_RefreshItems(sender As Object, e As EventArgs)
- End Sub
- Private Sub navSiguienteRegistro_Click_1(sender As Object, e As EventArgs)
- DeshabilitarControles()
- TipoTransaccion = "B"
- If Not BindingNavigatorPositionItem.Enabled Then
- PIN0BindingSource4.ResumeBinding()
- Me.PIN0TableAdapter3.Fill(Me.InversionesDEVDataSet5.PIN0)
- End If
- End Sub
- Private Sub navNuevo_Click_1(sender As Object, e As EventArgs) Handles navNuevo.Click
- ActivarSuspen = True
- Modo = "NM"
- TipoTransaccion = "N"
- grbInversión.Visible = False
- NuevaPropuesta()
- PIN0BindingSource4.SuspendBinding()
- Refrescar()
- PreNuevoModificar()
- ModoPropuesta()
- LimpiarControles()
- HabilitarControles()
- TipoTransaccion = "N"
- cboEmpresas.Enabled = True
- cboInstrumentosFinancieros.Enabled = True
- End Sub
- Private Sub DeshabilitarBotonesBusqueda()
- cboPlazosFactor.Enabled = False
- cboOrigenDeFondos.Enabled = False
- cboCalificacionDeRiesgo.Enabled =
- cboCalificadoraDeRiesgo.Enabled = False
- txtJustificacion.ReadOnly = True
- txtComentarios.ReadOnly = True
- cboTipoOperacion.Enabled = False
- cboAutorizacion.Enabled = False
- dtpFechaDocumento.Enabled = False
- cboTipoMercado.Enabled = False
- cboPaises.Enabled = False
- End Sub
- Sub HabilitarAut()
- cboAutorizacion.Enabled = True
- End Sub
- Sub CambiarEstadoAut(ByVal Estado As String)
- If Estado = "P" Then
- cboAutorizacion.SelectedValue = "P"
- ElseIf Estado = "I" Then
- cboAutorizacion.SelectedValue = "I"
- ElseIf Estado = "V" Then
- cboAutorizacion.SelectedValue = "V"
- ElseIf Estado = "A" Then
- cboAutorizacion.SelectedValue = "A"
- ElseIf Estado = "R" Then
- cboAutorizacion.SelectedValue = "R"
- End If
- cboAutorizacion.BackColor = Color.White
- End Sub
- Private Sub navBuscar_Click_1(sender As Object, e As EventArgs) Handles navBuscar.Click
- Modo = "B"
- ModoPropuesta()
- End Sub
- Sub HabilitarBusqueda()
- HabilitarControles()
- grbInversión.Visible = False
- PreBusqueda()
- TipoTransaccion = "B"
- End Sub
- Private Sub navModificar_Click(sender As Object, e As EventArgs) Handles navModificar.Click
- Dim posicion = PIN0BindingSource4.Position
- ActivarSuspen = True
- Modo = "NM"
- btnAccion.Text = "Actualizar"
- HabilitarControles()
- TipoTransaccion = "A"
- Operaciones.TipoOperacion = "A"
- PrepararModificacion()
- Refrescar()
- TipoTransaccion = "A"
- PreNuevoModificar()
- HabilitarAut()
- ModoPropuesta()
- If Not LlamadaDesdeBusqueda Then
- Me.PIN0TableAdapter3.Fill(Me.InversionesDEVDataSet5.PIN0)
- PIN0BindingSource4.Position = posicion
- End If
- cboEmpresas.Enabled = False
- cboInstrumentosFinancieros.Enabled = False
- End Sub
- Private Sub BindingNavigatorPositionItem_Click(sender As Object, e As EventArgs) Handles BindingNavigatorPositionItem.Click
- End Sub
- Private Sub chkUsuario_CheckedChanged(sender As Object, e As EventArgs) Handles chkUsuario.CheckedChanged
- Dim Codigo As String = txtCodigoInversion.Text.ToString
- Dim ExisteInstrumento As Boolean = oDAOPropuestasDeInversion.ExisteInstrumento(Codigo)
- If ExisteInstrumento Then
- UsuarioPrivilegio(TipoTransaccion, sender)
- Else
- MsgBox("El detalle del instrumento no ha sido ingresado o el monto de la inversión es 0")
- If chkUsuario.Checked Then
- chkUsuario.Checked = False
- End If
- End If
- End Sub
- Private Sub BindingNavigatorCountItem_Click(sender As Object, e As EventArgs) Handles BindingNavigatorCountItem.Click
- End Sub
- Friend WithEvents vBindingSource As BindingSource
- Private Sub navEliminar_Click_1(sender As Object, e As EventArgs) Handles navEliminar.Click
- Dim posicion As Integer = PIN0BindingSource4.Position
- If (BorrarPropuesta() = 0) Then
- LimpiarControles()
- End If
- PIN0BindingSource4.SuspendBinding()
- Refrescar()
- HabilitarControles()
- DeshabilitarBotonesBusqueda()
- PrepararBusqueda()
- Variables.CodigoComparativo = "NULL"
- Me.PIN0TableAdapter3.Fill(Me.InversionesDEVDataSet5.PIN0)
- If Not posicion = 0 Then
- posicion -= 1
- End If
- PIN0BindingSource4.Position = posicion
- End Sub
- Public Function BorrarPropuesta()
- Dim mensaje = MsgBox("¿Deseas Eliminar este registro?", vbOKCancel, "Eliminar")
- If (mensaje = vbOK) Then
- Dim eliminar As New InversionDAO
- Dim EliminarCascada As Boolean = ExisteInstrumento("INV0")
- Dim valor = eliminar.Eliminar(txtCodigoInversion.Text, "PIN0", EliminarCascada)
- If (valor = 1) Then
- MsgBox("Error al Eliminar")
- Return valor
- Else
- MsgBox("Registro Eliminado")
- Return valor
- End If
- Else
- Return 1
- End If
- End Function
- Private Sub Navegador_RefreshItems_1(sender As Object, e As EventArgs) Handles Navegador.RefreshItems
- End Sub
- Private Sub PIN0BindingSource_CurrentChanged(sender As Object, e As EventArgs)
- End Sub
- Private Sub navRegistroAnterior_Click_1(sender As Object, e As EventArgs) Handles navRegistroAnterior.Click
- DeshabilitarControles()
- TipoTransaccion = "B"
- If Not BindingNavigatorPositionItem.Enabled Then
- PIN0BindingSource4.ResumeBinding()
- End If
- End Sub
- Private Sub navPrimerRegistro_Click_1(sender As Object, e As EventArgs) Handles navPrimerRegistro.Click
- DeshabilitarControles()
- TipoTransaccion = "B"
- If Not BindingNavigatorPositionItem.Enabled Then
- PIN0BindingSource4.ResumeBinding()
- End If
- End Sub
- Private Sub navUltimoRegistro_Click_1(sender As Object, e As EventArgs) Handles navUltimoRegistro.Click
- DeshabilitarControles()
- TipoTransaccion = "B"
- If Not BindingNavigatorPositionItem.Enabled Then
- PIN0BindingSource4.ResumeBinding()
- Me.PIN0TableAdapter3.Fill(Me.InversionesDEVDataSet5.PIN0)
- End If
- End Sub
- Private Sub PreBusqueda()
- Me.cboEmpresas.BackColor = Configuraciones.ColorFondoPredefinido()
- Me.txtCodigoInversion.BackColor = Configuraciones.ColorFondoPredefinido()
- Me.cboInstrumentosFinancieros.BackColor = Configuraciones.ColorFondoPredefinido()
- Me.cboEmisores.BackColor = Configuraciones.ColorFondoPredefinido()
- Me.cboCalificacionDeRiesgo.BackColor = Configuraciones.ColorFondoPredefinido()
- Me.cboCalificadoraDeRiesgo.BackColor = Configuraciones.ColorFondoPredefinido()
- Me.cboPaises.BackColor = Configuraciones.ColorFondoPredefinido()
- Me.cboTipoMercado.BackColor = Configuraciones.ColorFondoPredefinido()
- Me.txtNombre.BackColor = Configuraciones.ColorFondoPredefinido()
- Me.cboPeriodicidad.BackColor = Configuraciones.ColorFondoPredefinido()
- Me.cboPlazosFactor.BackColor = Configuraciones.ColorFondoPredefinido()
- Me.cboRenta.BackColor = Configuraciones.ColorFondoPredefinido()
- Me.cboTasa.BackColor = Configuraciones.ColorFondoPredefinido()
- Me.txtCodigoInversion.BackColor = Configuraciones.ColorFondoPredefinido()
- Me.cboEstadoDocumento.BackColor = Configuraciones.ColorFondoPredefinido()
- cboOrigenDeFondos.BackColor = Configuraciones.ColorFondoPredefinido()
- cboTipoOperacion.BackColor = Configuraciones.ColorFondoPredefinido()
- cboAutorizacion.BackColor = Configuraciones.ColorFondoPredefinido()
- txtAsunto.BackColor = Configuraciones.ColorFondoPredefinido()
- dtpFechaDocumento.Enabled = False
- TipoTransaccion = "B"
- oPropuestaInversionCE = Nothing
- oPropuestaInversionCE = New CEPropuestaInversion
- LimpiarControles()
- End Sub
- Private Sub PreNuevoModificar()
- Me.cboEmpresas.BackColor = Color.White
- Me.txtCodigoInversion.BackColor = Color.White
- Me.cboInstrumentosFinancieros.BackColor = Color.White
- Me.cboEmisores.BackColor = Color.White
- Me.cboCalificacionDeRiesgo.BackColor = Color.White
- Me.cboCalificadoraDeRiesgo.BackColor = Color.White
- Me.txtCodigoInversion.BackColor = Configuraciones.ColorFondoPredefinido()
- Me.cboPaises.BackColor = Color.White
- Me.cboTipoMercado.BackColor = Color.White
- Me.txtNombre.BackColor = Color.White
- Me.cboPeriodicidad.BackColor = Color.White
- Me.cboPlazosFactor.BackColor = Color.White
- Me.cboRenta.BackColor = Color.White
- Me.cboTasa.BackColor = Color.White
- Me.cboEstadoDocumento.BackColor = Color.White()
- cboOrigenDeFondos.BackColor = Color.White
- cboTipoOperacion.BackColor = Color.White
- cboAutorizacion.BackColor = Color.White
- txtAsunto.BackColor = Color.White
- End Sub
- Private Sub txtMontoInversion_Leave(sender As Object, e As EventArgs)
- End Sub
- Private Sub txtPrecio_Leave(sender As Object, e As EventArgs)
- End Sub
- Private Sub txtRendimiento_Leave(sender As Object, e As EventArgs)
- End Sub
- Private Sub txtPlazoNumero_Leave(sender As Object, e As EventArgs)
- End Sub
- Private Sub txtIngresos_Leave(sender As Object, e As EventArgs)
- End Sub
- Private Sub txtRendimiento_TextChanged_1(sender As Object, e As EventArgs)
- End Sub
- Private Sub txtRendimiento_Leave_1(sender As Object, e As EventArgs)
- End Sub
- Private Sub Navegador_EndDrag(sender As Object, e As EventArgs) Handles Navegador.EndDrag
- End Sub
- Private Sub lblEmpresa_Click(sender As Object)
- End Sub
- Sub Acercar(sender As Object)
- If TypeOf sender Is Panel Then
- If Not sender.BackColor.Name = Color.White.Name Then
- sender.BackColor = Color.Turquoise
- End If
- Else
- If Not sender.parent.BackColor.Name = Color.White.Name Then
- sender.BackColor = Color.Turquoise
- End If
- End If
- End Sub
- Sub Alejar(sender As Object)
- If TypeOf sender Is Panel Then
- If Not sender.BackColor.Name = Color.White.Name Then
- sender.BackColor = Color.WhiteSmoke
- End If
- Else
- If Not sender.parent.BackColor.Name = Color.White.Name Then
- sender.BackColor = Color.WhiteSmoke
- End If
- End If
- End Sub
- Sub MenuSeleccionado(sender As Object)
- pnlContenedor.Visible = True
- For Each Items In pnlMenu.Controls
- If TypeOf Items Is Panel Then
- Items.BackColor = Color.WhiteSmoke
- For Each Item In Items.controls
- Item.BackColor = Color.WhiteSmoke
- Next
- End If
- Next
- If TypeOf sender Is Panel Then
- sender.BackColor = Color.White
- For Each Item In sender.controls
- Item.BackColor = Color.White
- Next
- End If
- If TypeOf sender Is Label Then
- sender.BackColor = Color.White
- sender.parent.BackColor = Color.White
- End If
- End Sub
- Private Sub lblOrigenFondos_MouseHover(sender As Object, e As EventArgs)
- EventHijoAcercar(sender)
- End Sub
- Private Sub lblOrigenFondos_MouseLeave(sender As Object, e As EventArgs)
- EventHijoAlejar(sender)
- End Sub
- Private Sub pnlOrigenFondos_MouseHover(sender As Object, e As EventArgs)
- EventPadreAcercar(sender)
- End Sub
- Private Sub pnlOrigenFondos_MouseLeave(sender As Object, e As EventArgs)
- EventPadreAlejar(sender)
- End Sub
- Sub EventPadreAcercar(ByVal sender As Object)
- Acercar(sender)
- For Each label In sender.Controls
- Acercar(label)
- Next
- End Sub
- Sub EventPadreAlejar(ByVal sender As Object)
- Alejar(sender)
- For Each label In sender.Controls
- Alejar(label)
- Next
- End Sub
- Sub EventHijoAcercar(ByVal sender As Object)
- Acercar(sender)
- Acercar(sender.parent)
- End Sub
- Sub EventHijoAlejar(ByVal sender As Object)
- Alejar(sender)
- Alejar(sender.parent)
- End Sub
- Private Sub lblEmisor_MouseHover(sender As Object, e As EventArgs)
- EventHijoAcercar(sender)
- End Sub
- Private Sub lblEmisor_MouseLeave(sender As Object, e As EventArgs)
- EventHijoAlejar(sender)
- End Sub
- Private Sub pnlEmisor_MouseHover(sender As Object, e As EventArgs)
- EventPadreAcercar(sender)
- End Sub
- Private Sub pnlEmisor_MouseLeave(sender As Object, e As EventArgs)
- EventPadreAlejar(sender)
- End Sub
- Private Sub pnlCalificacionRiesgo_MouseHover(sender As Object, e As EventArgs)
- EventPadreAcercar(sender)
- End Sub
- Private Sub pnlCalificacionRiesgo_MouseLeave(sender As Object, e As EventArgs)
- EventPadreAlejar(sender)
- End Sub
- Private Sub lblCalificadora_MouseHover(sender As Object, e As EventArgs)
- EventHijoAcercar(sender)
- End Sub
- Private Sub lblPais_MouseHover(sender As Object, e As EventArgs)
- EventHijoAcercar(sender)
- End Sub
- Private Sub lblEstado_MouseHover(sender As Object, e As EventArgs)
- EventHijoAcercar(sender)
- End Sub
- Private Sub lblAutorizacion_MouseHover(sender As Object, e As EventArgs)
- EventHijoAcercar(sender)
- End Sub
- Private Sub lblTipoOperacion_MouseHover(sender As Object, e As EventArgs)
- EventHijoAcercar(sender)
- End Sub
- Private Sub lblTipoMercado_MouseHover(sender As Object, e As EventArgs)
- EventHijoAcercar(sender)
- End Sub
- Private Sub lblCalificadora_MouseLeave(sender As Object, e As EventArgs)
- EventHijoAlejar(sender)
- End Sub
- Private Sub lblPais_MouseLeave(sender As Object, e As EventArgs)
- EventHijoAlejar(sender)
- End Sub
- Private Sub lblEstado_MouseLeave(sender As Object, e As EventArgs)
- EventHijoAlejar(sender)
- End Sub
- Private Sub lblAutorizacion_MouseLeave(sender As Object, e As EventArgs)
- EventHijoAlejar(sender)
- End Sub
- Private Sub lblTipoOperacion_MouseLeave(sender As Object, e As EventArgs)
- EventHijoAlejar(sender)
- End Sub
- Private Sub lblTipoMercado_MouseLeave(sender As Object, e As EventArgs)
- EventHijoAlejar(sender)
- End Sub
- Private Sub pnlCalificadora_MouseHover(sender As Object, e As EventArgs)
- EventPadreAcercar(sender)
- End Sub
- Private Sub pnlPais_MouseHover(sender As Object, e As EventArgs)
- EventPadreAcercar(sender)
- End Sub
- Private Sub pnlEstado_MouseHover(sender As Object, e As EventArgs)
- EventPadreAcercar(sender)
- End Sub
- Private Sub pnlAutorizacion_MouseHover(sender As Object, e As EventArgs)
- EventPadreAcercar(sender)
- End Sub
- Private Sub pnlTipOper_MouseHover(sender As Object, e As EventArgs)
- EventPadreAcercar(sender)
- End Sub
- Private Sub pnlTipMercado_MouseHover(sender As Object, e As EventArgs)
- EventPadreAcercar(sender)
- End Sub
- Private Sub pnlCalificadora_MouseLeave(sender As Object, e As EventArgs)
- EventPadreAlejar(sender)
- End Sub
- Private Sub pnlPais_MouseLeave(sender As Object, e As EventArgs)
- EventPadreAlejar(sender)
- End Sub
- Private Sub pnlEstado_MouseLeave(sender As Object, e As EventArgs)
- EventPadreAlejar(sender)
- End Sub
- Private Sub pnlAutorizacion_MouseLeave(sender As Object, e As EventArgs)
- EventPadreAlejar(sender)
- End Sub
- Private Sub pnlTipOper_MouseLeave(sender As Object, e As EventArgs)
- EventPadreAlejar(sender)
- End Sub
- Private Sub pnlTipMercado_MouseLeave(sender As Object, e As EventArgs)
- EventPadreAlejar(sender)
- End Sub
- Private Sub lblCalificacionRiesgo_MouseHover(sender As Object, e As EventArgs)
- EventHijoAcercar(sender)
- End Sub
- Private Sub lblCalificacionRiesgo_MouseLeave(sender As Object, e As EventArgs)
- EventHijoAlejar(sender)
- End Sub
- Private Sub GroupBox1_Enter(sender As Object, e As EventArgs) Handles GroupBox1.Enter
- End Sub
- Private Sub lblInstrumento_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub lblEmpresa_MouseHover(sender As Object, e As EventArgs)
- EventHijoAcercar(sender)
- End Sub
- Private Sub lblInstrumento_MouseHover(sender As Object, e As EventArgs)
- EventHijoAcercar(sender)
- End Sub
- Private Sub lblEmpresa_MouseLeave(sender As Object, e As EventArgs)
- EventHijoAlejar(sender)
- End Sub
- Private Sub lblInstrumento_MouseLeave(sender As Object, e As EventArgs)
- EventHijoAlejar(sender)
- End Sub
- Private Sub pnlEmpresa_MouseHover(sender As Object, e As EventArgs)
- EventPadreAcercar(sender)
- End Sub
- Private Sub pnlInstrumento_MouseHover(sender As Object, e As EventArgs)
- EventPadreAcercar(sender)
- End Sub
- Private Sub pnlEmpresa_MouseLeave(sender As Object, e As EventArgs)
- EventPadreAlejar(sender)
- End Sub
- Private Sub pnlInstrumento_MouseLeave(sender As Object, e As EventArgs)
- EventPadreAlejar(sender)
- End Sub
- Private Sub lblPlazo_MouseHover(sender As Object, e As EventArgs)
- EventHijoAcercar(sender)
- End Sub
- Private Sub lblPlazo_MouseLeave(sender As Object, e As EventArgs)
- EventHijoAlejar(sender)
- End Sub
- Private Sub pnlPlazo_MouseHover(sender As Object, e As EventArgs)
- EventPadreAcercar(sender)
- End Sub
- Private Sub pnlPlazo_MouseLeave(sender As Object, e As EventArgs)
- EventPadreAlejar(sender)
- End Sub
- Private Sub lblEmpresa_Click(sender As Object, e As EventArgs)
- End Sub
- Sub ProcesoVisibilidad(sender As Object)
- For Each Items In pnlContenedor.Controls
- If TypeOf Items Is GroupBox Then
- Items.visible = False
- End If
- Next
- sender.visible = True
- End Sub
- Sub ConfiguracionInicial()
- For Each Items In pnlContenedor.Controls
- If TypeOf Items Is GroupBox Then
- Dim W_Tamgrp As Double = Items.Parent.Width - 10
- Dim W_Tamflp As Double = W_Tamgrp - 10
- Dim H_Tamgrp As Double = Items.Parent.Height - 30
- Dim H_Tamflp As Double = H_Tamgrp - 30
- Items.Width = W_Tamgrp
- Items.Height = H_Tamgrp
- Items.Location = New Point(2, 20)
- For Each flItem In Items.Controls
- If TypeOf flItem Is FlowLayoutPanel Then
- flItem.Width = W_Tamflp
- flItem.Height = H_Tamflp - 10
- End If
- Next
- For Each item In Items.Controls
- If TypeOf item Is CheckBox Then
- Dim W_Tamchk As Double = item.Width + 5
- item.Width = W_Tamchk
- End If
- Next
- End If
- Next
- End Sub
- Private Sub pnlEmpresa_Paint(sender As Object, e As PaintEventArgs)
- End Sub
- Private Sub pnlInstrumento_Paint(sender As Object, e As PaintEventArgs)
- End Sub
- Private Sub lblOrigenFondos_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub pnlOrigenFondos_Paint(sender As Object, e As PaintEventArgs)
- End Sub
- Private Sub lblPlazo_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub pnlPlazo_Paint(sender As Object, e As PaintEventArgs)
- End Sub
- Private Sub lblEmisor_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub pnlEmisor_Paint(sender As Object, e As PaintEventArgs)
- End Sub
- Private Sub lblCalificacionRiesgo_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub pnlCalificacionRiesgo_Paint(sender As Object, e As PaintEventArgs)
- End Sub
- Private Sub pnlEmpresa_Click(sender As Object, e As EventArgs)
- ProcesoVisibilidad(grpEmpresas)
- End Sub
- Private Sub pnlInstrumento_Click(sender As Object, e As EventArgs)
- ProcesoVisibilidad(grpInstrumentos)
- End Sub
- Private Sub lblCalificadora_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub pnlCalificadora_Click(sender As Object, e As EventArgs)
- ProcesoVisibilidad(grpCalificadoraRiesgo)
- End Sub
- Private Sub lblPais_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub pnlPais_Click(sender As Object, e As EventArgs)
- ProcesoVisibilidad(grpPais)
- End Sub
- Private Sub lblEstado_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub pnlEstado_Click(sender As Object, e As EventArgs)
- ProcesoVisibilidad(grpEstadoDocumento)
- End Sub
- Private Sub lblAutorizacion_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub pnlAutorizacion_Click(sender As Object, e As EventArgs)
- ProcesoVisibilidad(grpAutorizacion)
- End Sub
- Private Sub lblTipoOperacion_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub pnlTipOper_Click(sender As Object, e As EventArgs)
- ProcesoVisibilidad(grpTipoOperacion)
- End Sub
- Private Sub lblTipoMercado_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub pnlTipMercado_Click(sender As Object, e As EventArgs)
- ProcesoVisibilidad(grpTipoMercado)
- End Sub
- Private Sub pnlOrigenFondos_Click(sender As Object, e As EventArgs)
- ProcesoVisibilidad(grpOrigenFondos)
- End Sub
- Private Sub pnlPlazo_Click(sender As Object, e As EventArgs)
- ProcesoVisibilidad(grpPlazo)
- End Sub
- Private Sub pnlEmisor_Click(sender As Object, e As EventArgs)
- ProcesoVisibilidad(grpEmisor)
- End Sub
- Private Sub pnlCalificacionRiesgo_Click(sender As Object, e As EventArgs)
- ProcesoVisibilidad(grpCalificacionRiesgo)
- End Sub
- Private Sub Button1_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub TbComentarios_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub pnlContenedor_Paint(sender As Object, e As PaintEventArgs) Handles pnlContenedor.Paint
- End Sub
- Private Sub mnuFilEmpresas_Click(sender As Object, e As EventArgs)
- ProcesoVisibilidad(grpEmpresas)
- End Sub
- Private Sub mnuInstrumentos_Click(sender As Object, e As EventArgs)
- CambiarPosicionPrincipal(sender)
- End Sub
- Private Sub mnuFilInstrumentos_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub mnuFilOrigenFondos_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub mnuOrigenFondos_Click(sender As Object, e As EventArgs)
- CambiarPosicionPrincipal(sender)
- End Sub
- Private Sub mnuPlazo_Click(sender As Object, e As EventArgs)
- CambiarPosicionPrincipal(sender)
- End Sub
- Private Sub mnuFilPlazo_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub mnuEmisor_Click(sender As Object, e As EventArgs)
- CambiarPosicionPrincipal(sender)
- End Sub
- Private Sub mnuFilEmisor_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub mnuFilCalRiesgo_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub mnuFilCalificadora_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub mnuFilPais_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub mnuFilEstado_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub mnuFilAut_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub mnuFilTipOper_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub mnuFilTipMercado_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub mnuVerEmpresas_Click(sender As Object, e As EventArgs)
- LanzarBusqueda()
- End Sub
- Private Sub mnuVerInstrumentos_Click(sender As Object, e As EventArgs)
- LanzarBusqueda()
- End Sub
- Private Sub mnuVerOrigenFondos_Click(sender As Object, e As EventArgs)
- LanzarBusqueda()
- End Sub
- Sub CambiarPosicionPrincipal(sender As Object)
- Dim PosicionY = sender.Location.Y
- Dim PosicionX = pnlContenedor.Location.X
- pnlContenedor.Location = New Point(PosicionX, PosicionY)
- End Sub
- Private Sub mnuEmpresas_Click(sender As Object, e As EventArgs)
- CambiarPosicionPrincipal(sender)
- End Sub
- Private Sub mnuCalRiesgo_Click(sender As Object, e As EventArgs)
- CambiarPosicionPrincipal(sender)
- End Sub
- Private Sub mnuCalificadora_Click(sender As Object, e As EventArgs)
- CambiarPosicionPrincipal(sender)
- End Sub
- Private Sub mnuPais_Click(sender As Object, e As EventArgs)
- CambiarPosicionPrincipal(sender)
- End Sub
- Private Sub mnuEstado_Click(sender As Object, e As EventArgs)
- CambiarPosicionPrincipal(sender)
- End Sub
- Private Sub mnuAut_Click(sender As Object, e As EventArgs)
- CambiarPosicionPrincipal(sender)
- End Sub
- Private Sub mnuTipOper_Click(sender As Object, e As EventArgs)
- CambiarPosicionPrincipal(sender)
- End Sub
- Private Sub mnuTipMercado_Click(sender As Object, e As EventArgs)
- CambiarPosicionPrincipal(sender)
- End Sub
- Private Sub lblEmpresa_Click_1(sender As Object, e As EventArgs) Handles lblEmpresa.Click
- ProcesoVisibilidad(grpEmpresas)
- MenuSeleccionado(sender)
- CambiarPosicionPrincipal(sender.parent)
- End Sub
- Private Sub pnlEmpresa_Paint_1(sender As Object, e As PaintEventArgs) Handles pnlEmpresa.Paint
- End Sub
- Private Sub lblEmpresa_MouseHover_1(sender As Object, e As EventArgs) Handles lblEmpresa.MouseHover
- EventHijoAcercar(sender)
- End Sub
- Private Sub lblInstrumento_Click_1(sender As Object, e As EventArgs) Handles lblInstrumento.Click
- ProcesoVisibilidad(grpInstrumentos)
- MenuSeleccionado(sender)
- CambiarPosicionPrincipal(sender.parent)
- End Sub
- Private Sub lblInstrumento_MouseHover_1(sender As Object, e As EventArgs) Handles lblInstrumento.MouseHover
- EventHijoAcercar(sender)
- End Sub
- Private Sub lblOrigenFondos_MouseHover_1(sender As Object, e As EventArgs) Handles lblOrigenFondos.MouseHover
- EventHijoAcercar(sender)
- End Sub
- Private Sub lblPlazo_MouseHover_1(sender As Object, e As EventArgs) Handles lblPlazo.MouseHover
- EventHijoAcercar(sender)
- End Sub
- Private Sub lblEmisor_MouseHover_1(sender As Object, e As EventArgs) Handles lblEmisor.MouseHover
- EventHijoAcercar(sender)
- End Sub
- Private Sub lblCalificacionRiesgo_MouseHover_1(sender As Object, e As EventArgs) Handles lblCalificacionRiesgo.MouseHover
- EventHijoAcercar(sender)
- End Sub
- Private Sub lblCalificadora_MouseHover_1(sender As Object, e As EventArgs) Handles lblCalificadora.MouseHover
- EventHijoAcercar(sender)
- End Sub
- Private Sub lblPais_MouseHover_1(sender As Object, e As EventArgs) Handles lblPais.MouseHover
- EventHijoAcercar(sender)
- End Sub
- Private Sub lblEstado_MouseHover_1(sender As Object, e As EventArgs) Handles lblEstado.MouseHover
- EventHijoAcercar(sender)
- End Sub
- Private Sub lblAutorizacion_MouseHover_1(sender As Object, e As EventArgs) Handles lblAutorizacion.MouseHover
- EventHijoAcercar(sender)
- End Sub
- Private Sub lblTipoOperacion_MouseHover_1(sender As Object, e As EventArgs) Handles lblTipoOperacion.MouseHover
- EventHijoAcercar(sender)
- End Sub
- Private Sub lblTipoMercado_MouseHover_1(sender As Object, e As EventArgs) Handles lblTipoMercado.MouseHover
- EventHijoAcercar(sender)
- End Sub
- Private Sub lblEmpresa_MouseLeave_1(sender As Object, e As EventArgs) Handles lblEmpresa.MouseLeave
- EventHijoAlejar(sender)
- End Sub
- Private Sub lblInstrumento_MouseLeave_1(sender As Object, e As EventArgs) Handles lblInstrumento.MouseLeave
- EventHijoAlejar(sender)
- End Sub
- Private Sub lblOrigenFondos_MouseLeave_1(sender As Object, e As EventArgs) Handles lblOrigenFondos.MouseLeave
- EventHijoAlejar(sender)
- End Sub
- Private Sub lblPlazo_MouseLeave_1(sender As Object, e As EventArgs) Handles lblPlazo.MouseLeave
- EventHijoAlejar(sender)
- End Sub
- Private Sub lblEmisor_MouseLeave_1(sender As Object, e As EventArgs) Handles lblEmisor.MouseLeave
- EventHijoAlejar(sender)
- End Sub
- Private Sub lblCalificacionRiesgo_MouseLeave_1(sender As Object, e As EventArgs) Handles lblCalificacionRiesgo.MouseLeave
- EventHijoAlejar(sender)
- End Sub
- Private Sub lblCalificadora_MouseLeave_1(sender As Object, e As EventArgs) Handles lblCalificadora.MouseLeave
- EventHijoAlejar(sender)
- End Sub
- Private Sub lblPais_MouseLeave_1(sender As Object, e As EventArgs) Handles lblPais.MouseLeave
- EventHijoAlejar(sender)
- End Sub
- Private Sub lblEstado_MouseLeave_1(sender As Object, e As EventArgs) Handles lblEstado.MouseLeave
- EventHijoAlejar(sender)
- End Sub
- Private Sub lblAutorizacion_MouseLeave_1(sender As Object, e As EventArgs) Handles lblAutorizacion.MouseLeave
- EventHijoAlejar(sender)
- End Sub
- Private Sub lblTipoOperacion_MouseLeave_1(sender As Object, e As EventArgs) Handles lblTipoOperacion.MouseLeave
- EventHijoAlejar(sender)
- End Sub
- Private Sub lblTipoMercado_MouseLeave_1(sender As Object, e As EventArgs) Handles lblTipoMercado.MouseLeave
- EventHijoAlejar(sender)
- End Sub
- Private Sub pnlEmpresa_MouseHover_1(sender As Object, e As EventArgs) Handles pnlEmpresa.MouseHover
- EventPadreAcercar(sender)
- End Sub
- Private Sub pnlInstrumento_MouseHover_1(sender As Object, e As EventArgs) Handles pnlInstrumento.MouseHover
- EventPadreAcercar(sender)
- End Sub
- Private Sub pnlOrigenFondos_MouseHover_1(sender As Object, e As EventArgs) Handles pnlOrigenFondos.MouseHover
- EventPadreAcercar(sender)
- End Sub
- Private Sub pnlPlazo_MouseHover_1(sender As Object, e As EventArgs) Handles pnlPlazo.MouseHover
- EventPadreAcercar(sender)
- End Sub
- Private Sub pnlEmisor_MouseHover_1(sender As Object, e As EventArgs) Handles pnlEmisor.MouseHover
- EventPadreAcercar(sender)
- End Sub
- Private Sub pnlCalificacionRiesgo_MouseHover_1(sender As Object, e As EventArgs) Handles pnlCalificacionRiesgo.MouseHover
- EventPadreAcercar(sender)
- End Sub
- Private Sub pnlCalificadora_MouseHover_1(sender As Object, e As EventArgs) Handles pnlCalificadora.MouseHover
- EventPadreAcercar(sender)
- End Sub
- Private Sub pnlPais_MouseHover_1(sender As Object, e As EventArgs) Handles pnlPais.MouseHover
- EventPadreAcercar(sender)
- End Sub
- Private Sub pnlEstado_MouseHover_1(sender As Object, e As EventArgs) Handles pnlEstado.MouseHover
- EventPadreAcercar(sender)
- End Sub
- Private Sub pnlAutorizacion_MouseHover_1(sender As Object, e As EventArgs) Handles pnlAutorizacion.MouseHover
- EventPadreAcercar(sender)
- End Sub
- Private Sub pnlTipOper_MouseHover_1(sender As Object, e As EventArgs) Handles pnlTipOper.MouseHover
- EventPadreAcercar(sender)
- End Sub
- Private Sub pnlTipMercado_MouseHover_1(sender As Object, e As EventArgs) Handles pnlTipMercado.MouseHover
- EventPadreAcercar(sender)
- End Sub
- Private Sub pnlEmpresa_MouseLeave_1(sender As Object, e As EventArgs) Handles pnlEmpresa.MouseLeave
- EventPadreAlejar(sender)
- End Sub
- Private Sub pnlInstrumento_MouseLeave_1(sender As Object, e As EventArgs) Handles pnlInstrumento.MouseLeave
- EventPadreAlejar(sender)
- End Sub
- Private Sub pnlOrigenFondos_MouseLeave_1(sender As Object, e As EventArgs) Handles pnlOrigenFondos.MouseLeave
- EventPadreAlejar(sender)
- End Sub
- Private Sub pnlPlazo_MouseLeave_1(sender As Object, e As EventArgs) Handles pnlPlazo.MouseLeave
- EventPadreAlejar(sender)
- End Sub
- Private Sub pnlEmisor_MouseLeave_1(sender As Object, e As EventArgs) Handles pnlEmisor.MouseLeave
- EventPadreAlejar(sender)
- End Sub
- Private Sub pnlCalificacionRiesgo_MouseLeave_1(sender As Object, e As EventArgs) Handles pnlCalificacionRiesgo.MouseLeave
- EventPadreAlejar(sender)
- End Sub
- Private Sub pnlCalificadora_MouseLeave_1(sender As Object, e As EventArgs) Handles pnlCalificadora.MouseLeave
- EventPadreAlejar(sender)
- End Sub
- Private Sub pnlPais_MouseLeave_1(sender As Object, e As EventArgs) Handles pnlPais.MouseLeave
- EventPadreAlejar(sender)
- End Sub
- Private Sub pnlEstado_MouseLeave_1(sender As Object, e As EventArgs) Handles pnlEstado.MouseLeave
- EventPadreAlejar(sender)
- End Sub
- Private Sub pnlAutorizacion_MouseLeave_1(sender As Object, e As EventArgs) Handles pnlAutorizacion.MouseLeave
- EventPadreAlejar(sender)
- End Sub
- Private Sub pnlTipOper_MouseLeave_1(sender As Object, e As EventArgs) Handles pnlTipOper.MouseLeave
- EventPadreAlejar(sender)
- End Sub
- Private Sub pnlTipMercado_MouseLeave_1(sender As Object, e As EventArgs) Handles pnlTipMercado.MouseLeave
- EventPadreAlejar(sender)
- End Sub
- Private Sub pnlEmpresa_Click_1(sender As Object, e As EventArgs) Handles pnlEmpresa.Click
- ProcesoVisibilidad(grpEmpresas)
- MenuSeleccionado(sender)
- CambiarPosicionPrincipal(sender)
- End Sub
- Private Sub pnlInstrumento_Click_1(sender As Object, e As EventArgs) Handles pnlInstrumento.Click
- ProcesoVisibilidad(grpInstrumentos)
- MenuSeleccionado(sender)
- CambiarPosicionPrincipal(sender)
- End Sub
- Private Sub lblOrigenFondos_Click_1(sender As Object, e As EventArgs) Handles lblOrigenFondos.Click
- ProcesoVisibilidad(grpOrigenFondos)
- MenuSeleccionado(sender)
- CambiarPosicionPrincipal(sender.parent)
- End Sub
- Private Sub pnlOrigenFondos_Click_1(sender As Object, e As EventArgs) Handles pnlOrigenFondos.Click
- ProcesoVisibilidad(grpOrigenFondos)
- MenuSeleccionado(sender)
- CambiarPosicionPrincipal(sender)
- End Sub
- Private Sub lblPlazo_Click_1(sender As Object, e As EventArgs) Handles lblPlazo.Click
- ProcesoVisibilidad(grpPlazo)
- MenuSeleccionado(sender)
- CambiarPosicionPrincipal(sender.parent)
- End Sub
- Private Sub pnlPlazo_Click_1(sender As Object, e As EventArgs) Handles pnlPlazo.Click
- ProcesoVisibilidad(grpPlazo)
- MenuSeleccionado(sender)
- CambiarPosicionPrincipal(sender)
- End Sub
- Private Sub lblEmisor_Click_1(sender As Object, e As EventArgs) Handles lblEmisor.Click
- ProcesoVisibilidad(grpEmisor)
- MenuSeleccionado(sender)
- CambiarPosicionPrincipal(sender.parent)
- End Sub
- Private Sub pnlEmisor_Click_1(sender As Object, e As EventArgs) Handles pnlEmisor.Click
- ProcesoVisibilidad(grpEmisor)
- MenuSeleccionado(sender)
- CambiarPosicionPrincipal(sender)
- End Sub
- Private Sub lblCalificacionRiesgo_Click_1(sender As Object, e As EventArgs) Handles lblCalificacionRiesgo.Click
- ProcesoVisibilidad(grpCalificacionRiesgo)
- MenuSeleccionado(sender)
- CambiarPosicionPrincipal(sender.parent)
- End Sub
- Private Sub pnlCalificacionRiesgo_Click_1(sender As Object, e As EventArgs) Handles pnlCalificacionRiesgo.Click
- ProcesoVisibilidad(grpCalificacionRiesgo)
- MenuSeleccionado(sender)
- CambiarPosicionPrincipal(sender)
- End Sub
- Private Sub lblCalificadora_Click_1(sender As Object, e As EventArgs) Handles lblCalificadora.Click
- ProcesoVisibilidad(grpCalificadoraRiesgo)
- MenuSeleccionado(sender)
- CambiarPosicionPrincipal(sender.parent)
- End Sub
- Private Sub pnlCalificadora_Click_1(sender As Object, e As EventArgs) Handles pnlCalificadora.Click
- ProcesoVisibilidad(grpCalificadoraRiesgo)
- MenuSeleccionado(sender)
- CambiarPosicionPrincipal(sender)
- End Sub
- Private Sub lblPais_Click_1(sender As Object, e As EventArgs) Handles lblPais.Click
- ProcesoVisibilidad(grpPais)
- MenuSeleccionado(sender)
- CambiarPosicionPrincipal(sender.parent)
- End Sub
- Private Sub pnlPais_Click_1(sender As Object, e As EventArgs) Handles pnlPais.Click
- ProcesoVisibilidad(grpPais)
- MenuSeleccionado(sender)
- CambiarPosicionPrincipal(sender)
- End Sub
- Private Sub lblEstado_Click_1(sender As Object, e As EventArgs) Handles lblEstado.Click
- ProcesoVisibilidad(grpEstadoDocumento)
- MenuSeleccionado(sender)
- CambiarPosicionPrincipal(sender.parent)
- End Sub
- Private Sub pnlEstado_Click_1(sender As Object, e As EventArgs) Handles pnlEstado.Click
- ProcesoVisibilidad(grpEstadoDocumento)
- MenuSeleccionado(sender)
- CambiarPosicionPrincipal(sender)
- End Sub
- Private Sub lblAutorizacion_Click_1(sender As Object, e As EventArgs) Handles lblAutorizacion.Click
- ProcesoVisibilidad(grpAutorizacion)
- MenuSeleccionado(sender)
- CambiarPosicionPrincipal(sender.parent)
- End Sub
- Private Sub pnlAutorizacion_Click_1(sender As Object, e As EventArgs) Handles pnlAutorizacion.Click
- ProcesoVisibilidad(grpAutorizacion)
- MenuSeleccionado(sender)
- CambiarPosicionPrincipal(sender)
- End Sub
- Private Sub lblTipoOperacion_Click_1(sender As Object, e As EventArgs) Handles lblTipoOperacion.Click
- ProcesoVisibilidad(grpTipoOperacion)
- MenuSeleccionado(sender)
- CambiarPosicionPrincipal(sender.parent)
- End Sub
- Private Sub pnlTipOper_Click_1(sender As Object, e As EventArgs) Handles pnlTipOper.Click
- ProcesoVisibilidad(grpTipoOperacion)
- MenuSeleccionado(sender)
- CambiarPosicionPrincipal(sender)
- End Sub
- Private Sub lblTipoMercado_Click_1(sender As Object, e As EventArgs) Handles lblTipoMercado.Click
- ProcesoVisibilidad(grpTipoMercado)
- MenuSeleccionado(sender)
- CambiarPosicionPrincipal(sender.parent)
- End Sub
- Private Sub pnlTipMercado_Click_1(sender As Object, e As EventArgs) Handles pnlTipMercado.Click
- ProcesoVisibilidad(grpTipoMercado)
- MenuSeleccionado(sender)
- CambiarPosicionPrincipal(sender)
- End Sub
- Private Sub pnlOrigenFondos_Paint_1(sender As Object, e As PaintEventArgs) Handles pnlOrigenFondos.Paint
- End Sub
- Private Sub pnlTipMercado_Paint(sender As Object, e As PaintEventArgs) Handles pnlTipMercado.Paint
- End Sub
- Sub CargarTabla()
- frmBuscar = New frmBuscarDeLista(1)
- Dim DiccionarioColecciones As New Dictionary(Of String, Collection)
- DiccionarioColecciones = GuardarColecciones()
- Dim Data As New DataTable
- Data = oDAOPropuestasDeInversion.BuscarPropuestasCodigo(DiccionarioColecciones).Tables("Resultado")
- GenerarFormato(Data)
- For Each Item In pnlCargaDatos.Controls
- If TypeOf Item Is Form Then
- Item.dispose
- End If
- Next
- frmBuscar.dgvBuscarDeLista.DataSource = Data
- frmBuscar.Dock = DockStyle.Fill
- frmBuscar.TopLevel = False
- frmBuscar.Parent = pnlCargaDatos
- frmBuscar.Show()
- End Sub
- Sub GenerarFormato(ByRef Data As DataTable)
- For Each Row As DataRow In Data.Rows
- Dim CodigoPropuesta As String = String.Empty
- Dim Estado As String = String.Empty
- Dim Asunto As String = String.Empty
- Dim Empresa As String = String.Empty
- Dim InstrumentoFinanciero As String = String.Empty
- Dim Emisor As String = String.Empty
- Dim CalificacionRiesgo As String = String.Empty
- Dim EmpresaCalificadora As String = String.Empty
- Dim OrigenFondos As String = String.Empty
- Dim Comentarios As String = String.Empty
- Dim Justificaciones As String = String.Empty
- Dim TipoOperacion As String = String.Empty
- Dim Base As String = String.Empty
- Dim Monto As String = String.Empty
- Dim Precio As String = String.Empty
- Dim Rendimiento As String = String.Empty
- Dim CantidadPlazo As String = String.Empty
- Dim TipoPlazo As String = String.Empty
- Dim Ingresos As String = String.Empty
- Dim FechaCreación As String = String.Empty
- Dim EstadoAutorización As String = String.Empty
- Dim TipoMercado As String = String.Empty
- Dim Pais As String = String.Empty
- CodigoPropuesta = Row("Código de Propuesta").ToString
- Estado = Row("Estado").ToString
- Asunto = Row("Asunto").ToString
- Empresa = Row("Empresa").ToString
- InstrumentoFinanciero = Row("Instrumento Financiero").ToString
- Emisor = Row("Emisor").ToString
- CalificacionRiesgo = Row("Calificación de Riesgo").ToString
- EmpresaCalificadora = Row("Empresa Calificadora").ToString
- OrigenFondos = Row("Origen de Fondos").ToString
- Comentarios = Row("Comentarios").ToString
- Justificaciones = Row("Justificaciones").ToString
- TipoOperacion = Row("Tipo de Operacion").ToString
- Base = Row("Base de Calculo").ToString
- Monto = Row("Monto de Inversion").ToString
- Precio = Row("Precio").ToString
- Rendimiento = Row("Rendimiento").ToString
- CantidadPlazo = Row("Cantidad en Plazo").ToString
- TipoPlazo = Row("Tipo de Plazo").ToString
- Ingresos = Row("Ingresos").ToString
- FechaCreación = Row("Fecha de Creación").ToString
- EstadoAutorización = Row("Estado de Autorización").ToString
- TipoMercado = Row("Tipo de Mercado").ToString
- Pais = Row("Pais").ToString
- If String.IsNullOrEmpty(CodigoPropuesta) Then
- CodigoPropuesta = " ---- ---- ---- ---- ----"
- End If
- If String.IsNullOrEmpty(Estado) Then
- Estado = " ---- ---- ---- ---- ----"
- End If
- If String.IsNullOrEmpty(Asunto) Then
- Asunto = " ---- ---- ---- ---- ----"
- End If
- If String.IsNullOrEmpty(Empresa) Then
- Empresa = " ---- ---- ---- ---- ----"
- End If
- If String.IsNullOrEmpty(InstrumentoFinanciero) Then
- InstrumentoFinanciero = " ---- ---- ---- ---- ----"
- End If
- If String.IsNullOrEmpty(Emisor) Then
- Emisor = " ---- ---- ---- ---- ----"
- End If
- If String.IsNullOrEmpty(CalificacionRiesgo) Then
- CalificacionRiesgo = " ---- ---- ---- ---- ----"
- End If
- If String.IsNullOrEmpty(EmpresaCalificadora) Then
- EmpresaCalificadora = " ---- ---- ---- ---- ----"
- End If
- If String.IsNullOrEmpty(OrigenFondos) Then
- OrigenFondos = " ---- ---- ---- ---- ----"
- End If
- If String.IsNullOrEmpty(Comentarios) Then
- Comentarios = " ---- ---- ---- ---- ----"
- End If
- If String.IsNullOrEmpty(Justificaciones) Then
- Justificaciones = " ---- ---- ---- ---- ----"
- End If
- If String.IsNullOrEmpty(TipoOperacion) Then
- TipoOperacion = " ---- ---- ---- ---- ----"
- End If
- If String.IsNullOrEmpty(Base) Then
- Base = " ---- ---- ---- ---- ----"
- End If
- If String.IsNullOrEmpty(Monto) Then
- Monto = " ---- ---- ---- ---- ----"
- End If
- If String.IsNullOrEmpty(Precio) Then
- Precio = " ---- ---- ---- ---- ----"
- End If
- If String.IsNullOrEmpty(Rendimiento) Then
- Rendimiento = " ---- ---- ---- ---- ----"
- End If
- If String.IsNullOrEmpty(CantidadPlazo) Then
- CantidadPlazo = " ---- ---- ---- ---- ----"
- End If
- If String.IsNullOrEmpty(TipoPlazo) Then
- TipoPlazo = " ---- ---- ---- ---- ----"
- End If
- If String.IsNullOrEmpty(Ingresos) Then
- Ingresos = " ---- ---- ---- ---- ----"
- End If
- If String.IsNullOrEmpty(FechaCreación) Then
- FechaCreación = " ---- ---- ---- ---- ----"
- End If
- If String.IsNullOrEmpty(EstadoAutorización) Then
- EstadoAutorización = " ---- ---- ---- ---- ----"
- End If
- If String.IsNullOrEmpty(TipoMercado) Then
- TipoMercado = " ---- ---- ---- ---- ----"
- End If
- If String.IsNullOrEmpty(Pais) Then
- Pais = " ---- ---- ---- ---- ----"
- End If
- Row("Código de Propuesta") = CodigoPropuesta
- Row("Estado") = Estado
- Row("Asunto") = Asunto
- Row("Empresa") = Empresa
- Row("Instrumento Financiero") = InstrumentoFinanciero
- Row("Emisor") = Emisor
- Row("Calificación de Riesgo") = CalificacionRiesgo
- Row("Empresa Calificadora") = EmpresaCalificadora
- Row("Origen de Fondos") = OrigenFondos
- Row("Comentarios") = Comentarios
- Row("Justificaciones") = Justificaciones
- Row("Tipo de Operacion") = TipoOperacion
- Row("Base de Calculo") = Base
- Row("Monto de Inversion") = Monto
- Row("Precio") = Precio
- Row("Rendimiento") = Rendimiento
- Row("Cantidad en Plazo") = CantidadPlazo
- Row("Tipo de Plazo") = TipoPlazo
- Row("Ingresos") = Ingresos
- Row("Fecha de Creación") = FechaCreación
- Row("Estado de Autorización") = EstadoAutorización
- Row("Tipo de Mercado") = TipoMercado
- Row("Pais") = Pais
- Next
- End Sub
- Private Sub pnlPie_Paint(sender As Object, e As PaintEventArgs) Handles pnlPie.Paint
- End Sub
- Private Sub Button1_Click_1(sender As Object, e As EventArgs) Handles btnAceptar.Click
- eventoCargar()
- End Sub
- Private Sub Button2_Click(sender As Object, e As EventArgs) Handles btnCancel.Click
- eventoCancelar()
- End Sub
- Private Sub txtBuscar_TextChanged(sender As Object, e As EventArgs) Handles txtBuscar.TextChanged
- 'Filtrar(sender)
- Filtrar(sender)
- End Sub
- Sub Filtrar(sender As Object)
- Dim TextoIngresado As String = sender.text.ToString.ToLower
- Dim CajaActiva As New GroupBox
- Dim CajaInterna As New FlowLayoutPanel
- For Each Item In pnlContenedor.Controls
- If TypeOf Item Is GroupBox Then
- If Item.visible Then
- CajaActiva = Item
- Exit For
- End If
- End If
- Next
- For Each Item In CajaActiva.Controls
- If TypeOf Item Is FlowLayoutPanel Then
- CajaInterna = Item
- Exit For
- End If
- Next
- For Each Item In CajaInterna.Controls
- If TypeOf Item Is CheckBox Then
- If Item.text.ToString.ToLower.Contains(TextoIngresado) Then
- If Not Item.visible Then
- Item.visible = True
- End If
- Else
- If Item.visible Then
- Item.visible = False
- End If
- End If
- End If
- Next
- End Sub
- Private Sub GroupBox2_Enter(sender As Object, e As EventArgs) Handles GroupBox2.Enter
- End Sub
- Sub ModoPropuesta()
- Dim TbNM = TbIngresarModificar
- Dim VTbBuscar = TbBuscar
- If Modo = "NM" Or (TipoTransaccion = "B" And Modo = "NM") Then
- If Not VTbBuscar.Parent Is Nothing Then
- TbBuscar.Parent = Nothing
- End If
- If (TbNM.Parent Is Nothing) Then
- TbNM.Parent = TabCampos
- End If
- ElseIf Modo = "B" Then
- If Not TbNM.Parent Is Nothing Then
- TbNM.Parent = Nothing
- End If
- If (VTbBuscar.Parent Is Nothing) Then
- VTbBuscar.Parent = TabCampos
- End If
- End If
- End Sub
- Private Sub ToolStripButton1_Click(sender As Object, e As EventArgs) Handles navRecorrer.Click
- DeshabilitarControles()
- PreBusqueda()
- Modo = "NM"
- ModoPropuesta()
- Me.PIN0TableAdapter3.Fill(Me.InversionesDEVDataSet5.PIN0)
- PIN0BindingSource4.ResumeBinding()
- btnAccion.Text = "Aceptar"
- End Sub
- Public Sub CargarDatosContenedor()
- If MsgBox("Desea ver esta Propuesta de Inversión", MsgBoxStyle.OkCancel) = DialogResult.OK Then
- Dim Id As Integer = frmBuscar.dgvBuscarDeLista.CurrentRow.Cells("Id").Value
- If Not Id = Nothing Then
- Modo = "NM"
- TipoTransaccion = "B"
- ModoPropuesta()
- DeshabilitarControles()
- PreBusqueda()
- CargarPropuesta(Id)
- LlamadaDesdeBusqueda = True
- End If
- End If
- End Sub
- Private Sub txtMontoInversion_KeyPress(sender As Object, e As KeyPressEventArgs)
- ValidarEntradaPrecionada(sender, e)
- End Sub
- Sub ValidarEntradaPrecionada(sender As Object, e As KeyPressEventArgs)
- If String.IsNullOrEmpty(sender.Text) Then
- If e.KeyChar = "." Then
- sender.Text = "0"
- Exit Sub
- End If
- End If
- If (Not sender.Text.ToString.IndexOf(".") = -1 And e.KeyChar = ".") Then
- Operaciones.ValidarEntrada(sender, e, True)
- Else
- Operaciones.ValidarEntrada(sender, e, False)
- End If
- End Sub
- Sub ValidarEntradaLevantar(ByRef sender As Object)
- If sender.Text = "." Then
- sender.Text = ".0"
- End If
- End Sub
- Private Sub txtMontoInversion_KeyUp(sender As Object, e As KeyEventArgs)
- ValidarEntradaLevantar(sender)
- End Sub
- Private Sub txtIngresos_KeyPress(sender As Object, e As KeyPressEventArgs)
- ValidarEntradaPrecionada(sender, e)
- End Sub
- Private Sub txtIngresos_KeyUp(sender As Object, e As KeyEventArgs)
- ValidarEntradaLevantar(sender)
- End Sub
- Private Sub txtPrecio_KeyPress(sender As Object, e As KeyPressEventArgs)
- ValidarEntradaPrecionada(sender, e)
- End Sub
- Private Sub txtPrecio_KeyUp(sender As Object, e As KeyEventArgs)
- ValidarEntradaLevantar(sender)
- End Sub
- Private Sub txtRendimiento_KeyPress(sender As Object, e As KeyPressEventArgs)
- ValidarEntradaPrecionada(sender, e)
- End Sub
- Private Sub txtRendimiento_KeyUp(sender As Object, e As KeyEventArgs)
- ValidarEntradaLevantar(sender)
- End Sub
- Private Sub txtPlazoNumero_KeyPress(sender As Object, e As KeyPressEventArgs)
- ValidarEntradaPrecionada(sender, e)
- End Sub
- Private Sub txtPlazoNumero_KeyUp(sender As Object, e As KeyEventArgs)
- ValidarEntradaLevantar(sender)
- End Sub
- Private Sub btnRequisicionDePago_Click(sender As Object, e As EventArgs)
- End Sub
- Private Sub ToolStripButton2_Click(sender As Object, e As EventArgs) Handles navVistaPrevia.Click
- Impresion(True)
- End Sub
- Private Sub ToolStripButton3_Click(sender As Object, e As EventArgs) Handles navImprimir.Click
- Impresion(False)
- End Sub
- Private Sub Impresion(ByVal pVistaPreliminar As Boolean)
- Dim General As New DAOGeneral
- Dim Codigo As String = txtCodigoInversion.Text
- Dim Id = General.IdPropuesta(Codigo)
- IdPIN = Id
- If Not IdPIN = Nothing Then
- Dim oImprimir As New frmImprimir("PrintPropuestaDeInversion.rpt", IdPIN, True)
- oImprimir.NombreRPT = "PrintPropuestaDeInversion.rpt"
- oImprimir.IdDocumento = IdPIN
- If pVistaPreliminar = True Then
- oImprimir.ShowDialog()
- Else
- oImprimir.VistaPrevia = False
- oImprimir.CargarRPT()
- End If
- End If
- End Sub
- Private Sub txtNombre_TextChanged(sender As Object, e As EventArgs) Handles txtNombre.TextChanged
- ControlNombre()
- End Sub
- Private Sub cboRenta_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboRenta.SelectedIndexChanged
- ControlTipoRenta()
- End Sub
- Private Sub cboPaises_SelectedIndexChanged_1(sender As Object, e As EventArgs) Handles cboPaises.SelectedIndexChanged
- ControlPais()
- End Sub
- Private Sub grbInversión_Enter(sender As Object, e As EventArgs) Handles grbInversión.Enter
- End Sub
- Private Sub btnCambiarEstado_Click(sender As Object, e As EventArgs) Handles btnCambiarRev.Click
- Dim Codigo As String = txtCodigoInversion.Text.ToString
- Dim ExisteInstrumento As Boolean = oDAOPropuestasDeInversion.ExisteInstrumento(Codigo)
- If ExisteInstrumento Then
- ModificarEstado("V")
- Else
- MsgBox("El detalle del instrumento no ha sido ingresado o el monto de inversión es 0")
- End If
- End Sub
- Sub ModificarEstado(Estado As String)
- Dim Codigo = txtCodigoInversion.Text
- If Not String.IsNullOrEmpty(Codigo) Then
- Dim posicion = PIN0BindingSource4.Position
- ActivarSuspen = True
- Modo = "NM"
- btnAccion.Text = "Actualizar"
- PrepararModificacion()
- ModoPropuesta()
- DeshabilitarControles()
- CambiarEstadoAut(Estado)
- TipoTransaccion = "A"
- ControlCambio()
- End If
- End Sub
- Private Sub btnCambiarInter_Click(sender As Object, e As EventArgs)
- ModificarEstado("I")
- End Sub
- Private Sub btnCambiarApro_Click(sender As Object, e As EventArgs) Handles btnCambiarApro.Click
- Dim Codigo As String = txtCodigoInversion.Text.ToString
- Dim ExisteInstrumento As Boolean = oDAOPropuestasDeInversion.ExisteInstrumento(Codigo)
- If ExisteInstrumento Then
- ModificarEstado("A")
- Else
- MsgBox("El detalle del instrumento no ha sido ingresado o el monto de inversión es 0")
- End If
- End Sub
- Private Sub btnCambiarRec_Click(sender As Object, e As EventArgs) Handles btnCambiarRec.Click
- Dim Codigo As String = txtCodigoInversion.Text.ToString
- Dim ExisteInstrumento As Boolean = oDAOPropuestasDeInversion.ExisteInstrumento(Codigo)
- If ExisteInstrumento Then
- ModificarEstado("R")
- Else
- MsgBox("El detalle del instrumento no ha sido ingresado o el monto de inversión es 0")
- End If
- End Sub
- Sub EstadoControladoresNAV()
- Dim Estado As String = String.Empty
- If cboAutorizacion.SelectedValue = "P" Then
- Estado = "P"
- ElseIf cboAutorizacion.SelectedValue = "V" Then
- Estado = "V"
- ElseIf cboAutorizacion.SelectedValue = "A" Then
- Estado = "A"
- ElseIf cboAutorizacion.SelectedValue = "R" Then
- Estado = "R"
- End If
- If Estado = "P" Or Estado = "A" Or Estado = "R" Then
- navNuevo.Enabled = True
- navModificar.Enabled = False
- navEliminar.Enabled = False
- navBuscar.Enabled = True
- navRecorrer.Enabled = True
- navVistaPrevia.Enabled = True
- navImprimir.Enabled = True
- ElseIf Estado = "V" Then
- navNuevo.Enabled = True
- navModificar.Enabled = True
- navEliminar.Enabled = False
- navBuscar.Enabled = True
- navRecorrer.Enabled = True
- navVistaPrevia.Enabled = True
- navImprimir.Enabled = True
- End If
- End Sub
- Private Sub txtCodigoCompra_TextChanged(sender As Object, e As EventArgs)
- End Sub
- Private Sub pnlCambiarRev_Paint(sender As Object, e As PaintEventArgs) Handles pnlCambiarRev.Paint
- End Sub
- Private Sub pnlCambiarApro_Paint(sender As Object, e As PaintEventArgs) Handles pnlCambiarApro.Paint
- End Sub
- Private Sub TabCampos_SelectedIndexChanged(sender As Object, e As EventArgs) Handles TabCampos.SelectedIndexChanged
- CargarTabla()
- End Sub
- Sub LimpiarVariablesTraspaso()
- Variables.RetMonto = 0
- Variables.RetPrecio = 0
- Variables.RetRendimiento = 0
- Variables.RetIngresosEsp = 0
- Variables.RetUnidadesAcciones = 0
- Variables.RetUnidadesContratosFuturos = 0
- Variables.RetCantidadContratosFuturos = 0
- Variables.RetCuotaParticipacionFINV = 0
- Variables.RetValorParticipacionFINV = 0
- Variables.TipoTransaccionCompraVenta = "NA"
- Variables.RetCodigoInversionExiste = False
- End Sub
- End Class
|