| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978 |
-
- 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()
- txtMontoInversion.ReadOnly = False
- txtPrecio.ReadOnly = False
- txtRendimiento.ReadOnly = False
- 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
- txtMontoInversion.ReadOnly = True
- cboEmpresas.Enabled = False
- cboInstrumentosFinancieros.Enabled = False
- cboOrigenDeFondos.Enabled = False
- cboTipoOperacion.SelectedValue = "C"
- cboOrigenDeFondos.SelectedValue = "REPOVENTA"
- txtMontoInversion.Text = SaldoAplicadoTitulo
- cboEmpresas.SelectedValue = NombreEmpresa
- cboInstrumentosFinancieros.SelectedValue = NombreInstrumento
- End If
- End Sub
- Sub Nuevo()
- Modo = "NM"
- Operaciones.TipoOperacion = "N"
- grbInversión.Visible = False
- Refrescar()
- PreNuevoModificar()
- formato()
- 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) Handles txtMontoInversion.TextChanged
- ControlMontoInv()
- End Sub
- Private Sub txtMontoInversion_LostFocus(sender As Object, e As EventArgs) Handles txtMontoInversion.LostFocus
- ControlMontoInversion()
- End Sub
- Private Sub txtPrecio_TextChanged(sender As Object, e As EventArgs) Handles txtPrecio.TextChanged
- ControlPr()
- End Sub
- Private Sub txtPrecio_LostFocus(sender As Object, e As EventArgs) Handles txtPrecio.LostFocus
- ControlPrecio()
- End Sub
- Private Sub txtRendimiento_TextChanged(sender As Object, e As EventArgs)
- End Sub
- Private Sub txtRendimiento_LostFocus(sender As Object, e As EventArgs)
- ControlRendimiento()
- 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) Handles txtPlazoNumero.TextChanged
- ControlPlazoNum()
- End Sub
- Private Sub txtPlazoNumero_LostFocus(sender As Object, e As EventArgs) Handles txtPlazoNumero.LostFocus
- ControlPlazoNumero()
- End Sub
- Private Sub txtIngresos_TextChanged(sender As Object, e As EventArgs) Handles txtIngresos.TextChanged
- ControlIng()
- 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) Handles txtIngresos.LostFocus
- ControlIngresos()
- 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
- Me.txtMontoInversion.Text = oPropuestaInversionCE.MontoInversion.ToString(Configuraciones.CodigoTXTMontos)
- Me.txtPrecio.Text = oPropuestaInversionCE.Precio.ToString(Configuraciones.CodigoTXTMontos)
- Me.txtRendimiento.Text = oPropuestaInversionCE.Rendimiento.ToString()
- Me.txtPlazoNumero.Text = oPropuestaInversionCE.PlazoNumero.ToString
- Dim vPlazoFactor As String = oPropuestaInversionCE.PlazoFactor.ToString
- If vPlazoFactor.Length = 0 Then
- Me.cboPlazosFactor.SelectedIndex = -1
- Else
- Me.cboPlazosFactor.SelectedValue = vPlazoFactor.ToString
- End If
- Me.txtIngresos.Text = oPropuestaInversionCE.Ingresos.ToString(Configuraciones.CodigoTXTMontos)
- 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 ControlMontoInversion()
- If TipoTransaccion = "N" Or TipoTransaccion = "A" Then
- Dim vParse As Boolean
- Dim valor As Double
- vParse = Double.TryParse(Me.txtMontoInversion.Text, valor)
- If Not vParse Then
- Else
- oPropuestaInversionCE.MontoInversion = valor
- Me.txtMontoInversion.Text = oPropuestaInversionCE.MontoInversion.ToString(Configuraciones.CodigoTXTMontos)
- End If
- End If
- End Sub
- Private Sub ControlPrecio()
- If TipoTransaccion = "N" Or TipoTransaccion = "A" Then
- Dim vParse As Boolean
- Dim valor As Double
- vParse = Double.TryParse(Me.txtPrecio.Text, valor)
- If Not vParse Then
- Else
- oPropuestaInversionCE.Precio = valor
- Me.txtPrecio.Text = oPropuestaInversionCE.Precio.ToString(Configuraciones.CodigoTXTMontos)
- End If
- End If
- End Sub
- Private Sub ControlRendimiento()
- If TipoTransaccion = "N" Or TipoTransaccion = "A" Then
- Dim vParse As Boolean
- Dim valor As Double
- vParse = Double.TryParse(txtRendimiento.Text.Replace("%", ""), valor)
- If Not vParse Then
- Else
- oPropuestaInversionCE.Rendimiento = valor / 100
- txtRendimiento.Text = oPropuestaInversionCE.Rendimiento.ToString(Configuraciones.CodigoTXTPorcentaje)
- End If
- End If
- End Sub
- Private Sub ControlPlazoNumero()
- If TipoTransaccion = "N" Or TipoTransaccion = "A" Then
- Dim vParse As Boolean = True
- Dim valor As Integer = 0
- If Me.txtPlazoNumero.Text.Length > 0 Then
- vParse = Integer.TryParse(Me.txtPlazoNumero.Text, valor)
- End If
- If Not vParse Then
- Else
- oPropuestaInversionCE.PlazoNumero = valor
- End If
- 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 ControlIngresos()
- If TipoTransaccion = "N" Or TipoTransaccion = "A" Then
- Dim vParse As Boolean
- Dim valor As Double
- vParse = Double.TryParse(Me.txtIngresos.Text, valor)
- If Not vParse Then
- Else
- oPropuestaInversionCE.Ingresos = valor
- Me.txtIngresos.Text = oPropuestaInversionCE.Ingresos.ToString(Configuraciones.CodigoTXTMontos)
- End If
- 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 ControlPlazoNum()
- If TipoTransaccion = "N" Or TipoTransaccion = "B" Or TipoTransaccion = "A" Then
- If String.IsNullOrEmpty(txtPlazoNumero.Text) Then
- oPropuestaInversionCE.PlazoNumero = 0
- Else
- oPropuestaInversionCE.PlazoNumero = txtPlazoNumero.Text
- End If
- End If
- End Sub
- Private Sub ControlMontoInv()
- If TipoTransaccion = "N" Or TipoTransaccion = "B" Or TipoTransaccion = "A" Then
- If String.IsNullOrEmpty(txtMontoInversion.Text.Trim("%")) Then
- oPropuestaInversionCE.MontoInversion = 0
- Else
- oPropuestaInversionCE.MontoInversion = txtMontoInversion.Text.Trim("%")
- End If
- End If
- End Sub
- Private Sub ControlPr()
- If TipoTransaccion = "N" Or TipoTransaccion = "B" Or TipoTransaccion = "A" Then
- If String.IsNullOrEmpty(txtPrecio.Text.Trim("%")) Then
- oPropuestaInversionCE.Precio = 0
- Else
- oPropuestaInversionCE.Precio = txtPrecio.Text.Trim("%")
- End If
- End If
- End Sub
- Private Sub ControlRend()
- If TipoTransaccion = "N" Or TipoTransaccion = "B" Or TipoTransaccion = "A" Then
- If String.IsNullOrEmpty(txtRendimiento.Text.ToString.Trim("%")) Then
- oPropuestaInversionCE.Rendimiento = 0
- Else
- oPropuestaInversionCE.Rendimiento = CDec(txtRendimiento.Text.ToString.Trim("%"))
- End If
- End If
- End Sub
- Private Sub ControlIng()
- If TipoTransaccion = "N" Or TipoTransaccion = "B" Or TipoTransaccion = "A" Then
- If String.IsNullOrEmpty(txtIngresos.Text) Then
- oPropuestaInversionCE.Ingresos = 0
- Else
- oPropuestaInversionCE.Ingresos = txtIngresos.Text
- End If
- 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.txtMontoInversion.Text = vCerotxt
- Me.txtPrecio.Text = vCerotxt
- Me.txtRendimiento.Text = vCerotxt
- Me.txtPlazoNumero.Text = String.Empty
- Me.cboPlazosFactor.SelectedIndex = -1
- Me.txtIngresos.Text = vCerotxt
- 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()
- ControlMontoInversion()
- ControlPrecio()
- ControlRendimiento()
- ControlPlazoNumero()
- ControlPlazoFactor()
- ControlIngresos()
- ControlOrigenDeFondos()
- ControlEmisores()
- ControlCalificacionesDeRiesgo()
- ControlCalificadoraDeRiesgo()
- ControlJustificacion()
- ControlComentarios()
- ControlCodigoInversion()
- ControlEstadoDocumento()
- ControlEstadoAutorizacion()
- ControlFechaDocumento()
- ControlTipoOperacion()
- ControlTipoMercado()
- ControlPais()
- ControlPlazoNum()
- ControlPlazoFact()
- ControlMontoInv()
- ControlPr()
- ControlRend()
- ControlIng()
- ControlOFon()
- ControlTipOper()
- ControlNombre()
- ControlTipoRenta()
- ControlTasa()
- ControlPeriodicidad()
- End Sub
- Private Function ValoresValidos() As Boolean
- Dim DatosValidos As Boolean = True
- If String.IsNullOrEmpty(txtMontoInversion.Text.ToString) Or
- txtMontoInversion.Text = 0 Then
- MsgBox("Ingrese un Monto de Inversión válido")
- DatosValidos = False
- Return DatosValidos
- End If
- 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 ProMonto As Double = Operaciones.ConvertirDecimal(txtMontoInversion.Text.ToString)
- Dim ProPrecio As Double = Operaciones.ConvertirDecimal(txtPrecio.Text.ToString)
- Dim ProRendimientoEsp As Double = Operaciones.ConvertirDecimal(txtRendimiento.Text.ToString)
- Dim ProIngresosEsp As Double = Operaciones.ConvertirDecimal(txtIngresos.Text.ToString)
- Dim ProTipoTransaccionCompraVenta As String = cboTipoOperacion.SelectedValue.ToString
- Dim ProNueva As String = TipoTransaccion
- Dim CodigoExiste As String = txtCodigoInversion.Text.ToString
- Dim CodigoInstrumentoExiste As String = cboInstrumentosFinancieros.SelectedValue.ToString
- ''################################################################
- 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",
- ProMonto, ProPrecio, ProRendimientoEsp, ProIngresosEsp)
- 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",
- ProMonto, ProPrecio, ProRendimientoEsp, ProIngresosEsp)
- 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",
- ProMonto, ProPrecio, ProRendimientoEsp, ProIngresosEsp)
- 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",
- ProMonto, ProPrecio, ProRendimientoEsp, ProIngresosEsp)
- 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",
- ProMonto, ProPrecio, ProRendimientoEsp, ProIngresosEsp)
- 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",
- ProMonto, ProPrecio, ProRendimientoEsp, ProIngresosEsp)
- 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",
- ProMonto, ProPrecio, ProRendimientoEsp, ProIngresosEsp)
- 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",
- ProMonto, ProPrecio, ProRendimientoEsp, ProIngresosEsp)
- 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",
- ProMonto, ProPrecio, ProRendimientoEsp, ProIngresosEsp)
- 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",
- ProMonto, ProPrecio, ProRendimientoEsp, ProIngresosEsp)
- 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
- txtMontoInversion.ReadOnly = True
- txtPrecio.ReadOnly = True
- txtRendimiento.ReadOnly = True
- txtPlazoNumero.ReadOnly = True
- cboPlazosFactor.Enabled = False
- txtIngresos.ReadOnly = True
- 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
- txtMontoInversion.ReadOnly = False
- txtPrecio.ReadOnly = False
- txtRendimiento.ReadOnly = False
- txtPlazoNumero.ReadOnly = False
- cboPlazosFactor.Enabled = True
- txtIngresos.ReadOnly = False
- 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()
- formato()
- ModoPropuesta()
- LimpiarControles()
- HabilitarControles()
- TipoTransaccion = "N"
- End Sub
- Private Sub DeshabilitarBotonesBusqueda()
- txtMontoInversion.ReadOnly = True
- txtPrecio.ReadOnly = True
- txtRendimiento.ReadOnly = True
- txtPlazoNumero.ReadOnly = True
- cboPlazosFactor.Enabled = False
- txtIngresos.ReadOnly = True
- 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()
- formato()
- HabilitarAut()
- ModoPropuesta()
- If Not LlamadaDesdeBusqueda Then
- Me.PIN0TableAdapter3.Fill(Me.InversionesDEVDataSet5.PIN0)
- PIN0BindingSource4.Position = posicion
- End If
- 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 de Instrumento no a sido ingresado o el monto 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.txtPlazoNumero.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()
- txtMontoInversion.BackColor = Configuraciones.ColorFondoPredefinido()
- txtPrecio.BackColor = Configuraciones.ColorFondoPredefinido()
- txtRendimiento.BackColor = Configuraciones.ColorFondoPredefinido()
- txtIngresos.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.txtPlazoNumero.BackColor = Color.White
- Me.cboPlazosFactor.BackColor = Color.White
- Me.cboRenta.BackColor = Color.White
- Me.cboTasa.BackColor = Color.White
- Me.cboEstadoDocumento.BackColor = Color.White()
- txtMontoInversion.BackColor = Color.White
- txtPrecio.BackColor = Color.White
- txtRendimiento.BackColor = Color.White
- txtIngresos.BackColor = Color.White
- cboOrigenDeFondos.BackColor = Color.White
- cboTipoOperacion.BackColor = Color.White
- cboAutorizacion.BackColor = Color.White
- txtAsunto.BackColor = Color.White
- End Sub
- Sub formato()
- If String.IsNullOrEmpty(txtMontoInversion.Text) Then
- txtMontoInversion.Text = 0
- End If
- If String.IsNullOrEmpty(txtPrecio.Text) Then
- txtPrecio.Text = 0
- End If
- If txtRendimiento.Text.ToString.IndexOf("%") = -1 Then
- txtRendimiento.Text = txtRendimiento.Text.ToString + "%"
- End If
- If String.IsNullOrEmpty(txtRendimiento.Text.ToString.Trim("%")) Then
- txtRendimiento.Text = "0.0%"
- End If
- If String.IsNullOrEmpty(txtPlazoNumero.Text) Then
- txtPlazoNumero.Text = 0
- End If
- If String.IsNullOrEmpty(txtIngresos.Text) Then
- txtIngresos.Text = 0
- End If
- End Sub
- Private Sub txtMontoInversion_Leave(sender As Object, e As EventArgs) Handles txtMontoInversion.Leave
- formato()
- End Sub
- Private Sub txtPrecio_Leave(sender As Object, e As EventArgs) Handles txtPrecio.Leave
- formato()
- End Sub
- Private Sub txtRendimiento_Leave(sender As Object, e As EventArgs)
- End Sub
- Private Sub txtPlazoNumero_Leave(sender As Object, e As EventArgs) Handles txtPlazoNumero.Leave
- formato()
- End Sub
- Private Sub txtIngresos_Leave(sender As Object, e As EventArgs) Handles txtIngresos.Leave
- End Sub
- Private Sub txtRendimiento_TextChanged_1(sender As Object, e As EventArgs) Handles txtRendimiento.TextChanged
- ControlRend()
- End Sub
- Private Sub txtRendimiento_Leave_1(sender As Object, e As EventArgs) Handles txtRendimiento.Leave
- formato()
- 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()
- formato()
- 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()
- formato()
- CargarPropuesta(Id)
- LlamadaDesdeBusqueda = True
- End If
- End If
- End Sub
- Private Sub txtMontoInversion_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtMontoInversion.KeyPress
- 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) Handles txtMontoInversion.KeyUp
- ValidarEntradaLevantar(sender)
- End Sub
- Private Sub txtIngresos_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtIngresos.KeyPress
- ValidarEntradaPrecionada(sender, e)
- End Sub
- Private Sub txtIngresos_KeyUp(sender As Object, e As KeyEventArgs) Handles txtIngresos.KeyUp
- ValidarEntradaLevantar(sender)
- End Sub
- Private Sub txtPrecio_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtPrecio.KeyPress
- ValidarEntradaPrecionada(sender, e)
- End Sub
- Private Sub txtPrecio_KeyUp(sender As Object, e As KeyEventArgs) Handles txtPrecio.KeyUp
- ValidarEntradaLevantar(sender)
- End Sub
- Private Sub txtRendimiento_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtRendimiento.KeyPress
- ValidarEntradaPrecionada(sender, e)
- End Sub
- Private Sub txtRendimiento_KeyUp(sender As Object, e As KeyEventArgs) Handles txtRendimiento.KeyUp
- ValidarEntradaLevantar(sender)
- End Sub
- Private Sub txtPlazoNumero_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtPlazoNumero.KeyPress
- ValidarEntradaPrecionada(sender, e)
- End Sub
- Private Sub txtPlazoNumero_KeyUp(sender As Object, e As KeyEventArgs) Handles txtPlazoNumero.KeyUp
- 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
- End Sub
- Private Sub ToolStripButton3_Click(sender As Object, e As EventArgs) Handles navImprimir.Click
- 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 de Instrumento no a sido ingresado o el monto 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()
- formato()
- 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 de Instrumento no a sido ingresado o el monto 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 de Instrumento no a sido ingresado o el monto 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
|