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 FormAcciones As New frmAcciones Dim FormFuturos As New frmFuturos Dim FormPrestamoEmpresarial As New frmPrestamoEmpresariales Dim FormPrestamoPersonal As New frmPrestamoPersonal Dim FormRepo As New frmReporto Dim FormLete As New frmLetes Dim FormCINV As New frmCertificadosDeInversion Dim FormDAP As New frmDepositosAPlazo Dim Operaciones As New Operaciones Dim oInversionDAO As New InversionDAO Dim TieneDetalleInstrumento As Boolean = False Private _PlazosFactor As String Sub AgregarCheckbox(ByRef P_cboObjeto As ComboBox, ByRef P_flpObjeto As FlowLayoutPanel) Dim Datos As New Dictionary(Of String, String) Dim i As Integer = 1 While i < P_cboObjeto.Items.Count P_cboObjeto.SelectedIndex = i Dim Valor As String = P_cboObjeto.SelectedValue Dim Texto As String = P_cboObjeto.Text Datos.Add(Valor, Texto) i += 1 End While For Each RecorrerDatos In Datos Dim O_Check As New CheckBox Dim Existe As Boolean = 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 P_flpObjeto.Controls.Add(O_Check) AddHandler O_Check.Click, AddressOf evento AddHandler O_Check.CheckedChanged, AddressOf Colorevento End If Existe = False Next Dim O_ChequeTodos As New CheckBox O_ChequeTodos.Name = "Todos" O_ChequeTodos.Checked = True O_ChequeTodos.Width = 250 O_ChequeTodos.BackColor = ColorTranslator.FromHtml("#EAEAE8") O_ChequeTodos.Text = "Todos" P_flpObjeto.Controls.Add(O_ChequeTodos) AddHandler O_ChequeTodos.Click, AddressOf evento AddHandler O_ChequeTodos.CheckedChanged, AddressOf Colorevento End Sub Sub evento(sender As Object, e As EventArgs) Dim P_flpObjeto As New FlowLayoutPanel P_flpObjeto = sender.parent If sender.name = "Todos" Then CambioCheckTodos(P_flpObjeto) 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 End Sub Sub CambioCheckTodos(ByRef P_flpObjeto As FlowLayoutPanel) Dim ContadorPrimario As Integer = P_flpObjeto.Controls.Count - 1 Dim UltimoCheck 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 = ContadorPrimario Then If Not yCheckBox.Checked Then UltimoCheck = False End If End If End If Next If UltimoCheck 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 UltimoCheck 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 ContadorPrimario As Integer = P_flpObjeto.Controls.Count - 1 Dim TodosCheck As Boolean = True If Not sender.name = "Todos" Then For Each xCheckBox In P_flpObjeto.Controls If TypeOf xCheckBox Is CheckBox Then Dim yCheckBox As New CheckBox yCheckBox = xCheckBox If Not yCheckBox.TabIndex = ContadorPrimario Then If Not yCheckBox.Checked Then TodosCheck = False End If End If If yCheckBox.TabIndex = ContadorPrimario Then If Not TodosCheck Then yCheckBox.Checked = False Else yCheckBox.Checked = True End If End If End If Next End If 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 'InversionesDEVDataSet2.PIN0' Puede moverla o quitarla según sea necesario. Me.PIN0TableAdapter2.Fill(Me.InversionesDEVDataSet2.PIN0) 'TODO: esta línea de código carga datos en la tabla 'InversionesDataSet.PIN0' Puede moverla o quitarla según sea necesario. 'Me.PIN0TableAdapter.Fill(Me.InversionesDataSet.PIN0) 'TODO: esta línea de código carga datos en la tabla 'InversionesDataSet1.PIN0' Puede moverla o quitarla según sea necesario. 'Me.PIN0TableAdapter1.Fill(Me.InversionesDataSet1.PIN0) 'TODO: esta línea de código carga datos en la tabla 'InversionesDataSet.PIN0' Puede moverla o quitarla según sea necesario. Call CargarEstadosDocumento() Call CargarEstadosAutorizacion() Call CargarEmpresas() Call CargarInstrumentosFinancieros() Call CargarEmisores() Call CargarCalificacionDeRiesgo() Call CargarCalificadoraDeRiesgo() Call CargarOrigenDeFondos() Call CargarTipoOperacion() Call CargarPaises() Call CargarTiposMercado() Call CargarTipoRenta() Call CargarTipoTasa() Call CargarPlazos() Call CargarPeriodicidades() 'Call CargarRegistro(0) If TipoTransaccion Is Nothing Then TipoTransaccion = "N" End If If TipoTransaccion = "N" Then Call NuevaPropuesta() ElseIf TipoTransaccion = "B" Then 'Call CargarPropuesta() End If 'Me.PIN0TableAdapter1.Fill(Me.InversionesDataSet1.PIN0) 'PIN0BindingSource.SuspendBinding() 'PIN0BindingSource.ResumeBinding() gpbInversión.Visible = False 'NuevaPropuesta() txtCodigoInversion.Text = String.Empty HabilitarBusqueda() formato() ConfiguracionInicial() End Sub Private Sub CargarRegistro(posicion As Integer) Dim cargar As New DataTable cargar = oInversionDAO.ListaCodigosPropuesta() cboEmpresas.SelectedValue = cargar.Rows(posicion)(1).ToString txtAsunto.Text = cargar.Rows(posicion)(2).ToString cboInstrumentosFinancieros.SelectedValue = cargar.Rows(posicion)(3).ToString txtMontoInversion.Text = cargar.Rows(posicion)(4).ToString txtPrecio.Text = cargar.Rows(posicion)(5).ToString txtRendimiento.Text = cargar.Rows(posicion)(6).ToString txtPlazoNumero.Text = cargar.Rows(posicion)(7).ToString cboPlazosFactor.SelectedValue = cargar.Rows(posicion)(8).ToString txtIngresos.Text = cargar.Rows(posicion)(9).ToString cboOrigenDeFondos.SelectedValue = cargar.Rows(posicion)(10).ToString cboEmisores.SelectedValue = cargar.Rows(posicion)(11).ToString cboCalificacionDeRiesgo.SelectedValue = cargar.Rows(posicion)(12).ToString cboCalificadoraDeRiesgo.SelectedValue = cargar.Rows(posicion)(13).ToString cboPaises.SelectedValue = cargar.Rows(posicion)(14).ToString cboTipoMercado.SelectedValue = cargar.Rows(posicion)(15).ToString txtCodigoInversion.Text = cargar.Rows(posicion)(16).ToString cboEstadoDocumento.SelectedValue = cargar.Rows(posicion)(17).ToString cboTipoOperacion.SelectedValue = cargar.Rows(posicion)(18).ToString dtpFechaDocumento.Value = cargar.Rows(posicion)(19) cboAutorizacion.SelectedValue = cargar.Rows(posicion)(20).ToString End Sub Private Sub UsuarioPrivilegio() Dim codigo As String = txtCodigoInversion.Text Dim Comprobar As New DAOGeneral Dim Estado As String = Comprobar.EstadoAutorizacionPro(codigo) Dim Existe As Boolean = ExisteInstrumento("INV0") If Existe Then gpbInversión.Visible = False MsgBox("La Inversion ya existe") Else If Estado = "A" Then gpbInversión.Visible = True Else gpbInversión.Visible = False End If 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" Me.cboEstadoDocumento.SelectedIndex = -1 TipoTransaccion = vTipoTransaccion AgregarCheckbox(cboEstadoDocumento, flpEstadoDocumento) 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" Me.cboAutorizacion.SelectedIndex = -1 TipoTransaccion = vTipoTransaccion AgregarCheckbox(cboAutorizacion, flpAutorizacion) 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" Me.cboEmpresas.SelectedIndex = -1 TipoTransaccion = vTipoTransaccion AgregarCheckbox(cboEmpresas, flpEmpresas) End Sub Private Sub CargarInstrumentosFinancieros() Dim vTipoTransaccion As String = TipoTransaccion TipoTransaccion = "X" Me.cboInstrumentosFinancieros.DataSource = oDAOGeneral.ListaInstrumentos Me.cboInstrumentosFinancieros.DisplayMember = "Descripcion" Me.cboInstrumentosFinancieros.ValueMember = "Codigo" Me.cboInstrumentosFinancieros.SelectedIndex = -1 TipoTransaccion = vTipoTransaccion AgregarCheckbox(cboInstrumentosFinancieros, flpInstrumentos) 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" Me.cboEmisores.SelectedIndex = -1 TipoTransaccion = vTipoTransaccion AgregarCheckbox(cboEmisores, flpEmisor) 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" Me.cboCalificacionDeRiesgo.SelectedIndex = -1 TipoTransaccion = vTipoTransaccion AgregarCheckbox(cboCalificacionDeRiesgo, flpCalificacionRiesgo) 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" Me.cboCalificadoraDeRiesgo.SelectedIndex = -1 TipoTransaccion = vTipoTransaccion AgregarCheckbox(cboCalificadoraDeRiesgo, flpCalificadoraRiesgo) 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" Me.cboOrigenDeFondos.SelectedIndex = -1 TipoTransaccion = vTipoTransaccion AgregarCheckbox(cboOrigenDeFondos, flpOrigenFondos) 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" Me.cboPlazosFactor.SelectedIndex = -1 TipoTransaccion = vTipoTransaccion AgregarCheckbox(cboPlazosFactor, flpPlazo) 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" Me.cboTipoOperacion.SelectedIndex = -1 TipoTransaccion = vTipoTransaccion AgregarCheckbox(cboTipoOperacion, flpTipoOperacion) 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" Me.cboPaises.SelectedIndex = -1 TipoTransaccion = vTipoTransaccion AgregarCheckbox(cboPaises, flpPais) 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" Me.cboTipoMercado.SelectedIndex = -1 TipoTransaccion = vTipoTransaccion AgregarCheckbox(cboTipoMercado, flpTipoMercado) End Sub Private Sub NuevaPropuesta() If oPropuestaInversionCE Is Nothing Then oPropuestaInversionCE = New CEPropuestaInversion End If 'TipoTransaccion = "N" HabilitarControles() LimpiarControles() Me.cboEstadoDocumento.SelectedValue = "A" Me.cboAutorizacion.SelectedValue = "P" Me.btnAccion.Text = "Guardar" Me.txtCodigoInversion.ReadOnly = True End Sub Private Function GuardarPropuesta() Dim ValidacionCorrecta As Boolean = ValoresValidos() If ValidacionCorrecta Then RefrescarValoresControles() Dim Instrumento As String = GuardarInstrumentoFinanciero() If Not TieneDetalleInstrumento Then ResultadoMsgBox = MessageBox.Show("No se ha ingresado detalles del Instrumento." & vbCrLf & "Desea continuar sin detalles?", "Sin Detalles", MessageBoxButtons.YesNo) If ResultadoMsgBox = DialogResult.Yes Then If Not String.IsNullOrEmpty(Instrumento) Then Dim Guardado As Boolean = oDAOPropuestasDeInversion.NuevaPropuesta(oPropuestaInversionCE, Instrumento) If Guardado Then TieneDetalleInstrumento = False End If 'Me.Dispose() End If End If Else If Not String.IsNullOrEmpty(Instrumento) Then oDAOPropuestasDeInversion.NuevaPropuesta(oPropuestaInversionCE, Instrumento) 'Me.Dispose() End If 'Me.Dispose() End If End If Return ValidacionCorrecta End Function Function GuardarInstrumentoFinanciero() Dim CodigoInstrumentoFinanciero As String = String.Empty Try CodigoInstrumentoFinanciero = cboInstrumentosFinancieros.SelectedValue Catch ex As Exception End Try 'Dim vRetorno As Integer 'Dim vCodigoInversion As String = " " ' oPropuestaInversionCE.CodigoIversion 'vCodigoInversion = "LETE" 'If Not InstrumentoFinanciero Is Nothing Then ' Dim oAccionesCE As AccionesCE ' If InstrumentoFinanciero.GetType.ToString = oAccionesCE.GetType.ToString Then ' Dim oDAOAcciones As AccionesDAO = New AccionesDAO ' 'vRetorno = oDAOAcciones.Nuevo(InstrumentoFinanciero, 1, "P") ' End If ' If InstrumentoFinanciero.GetType.ToString = "Inversiones.CEBonos" Then ' Dim oDAOBonos As BonosDAO = New BonosDAO ' 'vRetorno = oDAOBonos.Nuevo(InstrumentoFinanciero, 1, "P") ' End If ' If InstrumentoFinanciero.GetType.ToString = "Inversiones.CEDAP" Then ' Dim oDAODAP As DepositosAPlazoDAO = New DepositosAPlazoDAO ' 'vRetorno = oDAODAP.Nuevo(InstrumentoFinanciero, 1, "P") ' End If ' If InstrumentoFinanciero.GetType.ToString = "Inversiones.CELetes" Then ' Dim oDAOLetes As LETESDAO = New LETESDAO ' 'vRetorno = oDAOLetes.Nuevo(InstrumentoFinanciero, vCodigoInversion) ' End If ' If InstrumentoFinanciero.GetType.ToString = "Inversiones.CEReportos" Then ' Dim oDAOReportos As ReportosDAO = New ReportosDAO ' 'vRetorno = oDAOReportos.Nuevo(InstrumentoFinanciero, 1, "P") ' End If 'End If Return CodigoInstrumentoFinanciero End Function Private Sub EliminarPropuesta() End Sub Private Sub ActualizarPropuesta(ByVal parametro As String) Dim retorno As Integer RefrescarValoresControles() retorno = oDAOPropuestasDeInversion.Actualizar(oPropuestaInversionCE, parametro) If retorno = 0 Then MsgBox("Registro Actualizado", MsgBoxStyle.Information) CargarPropuesta(IdPIN) 'TipoTransaccion = "C" 'btnAccion.Text = "Aceptar" 'DeshabilitarControles() 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 Dim vParse As Boolean Dim valor As Double vParse = Double.TryParse(Me.txtMontoInversion.Text, valor) If Not vParse Then 'Me.lblMontoInversionErr.Visible = True Else 'Me.lblMontoInversionErr.Visible = False End If 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 Dim vParse As Boolean Dim valor As Double vParse = Double.TryParse(Me.txtPrecio.Text, valor) If Not vParse Then 'lblPrecioErr.Visible = True Else 'lblPrecioErr.Visible = False End If 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) 'Dim vParse As Boolean 'Dim valor As Double 'vParse = Double.TryParse(txtRendimiento.Text.Replace("%", ""), valor) 'If Not vParse Then ' Me.lblRendimientoErr.Visible = True 'Else ' Me.lblRendimientoErr.Visible = False 'End If 'ControlRend() 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 If TipoTransaccion = "N" 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 'Me.lblPlazoErrr.Visible = True Else 'Me.lblPlazoErrr.Visible = False End If End If 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 Dim vParse As Boolean Dim valor As Double vParse = Double.TryParse(Me.txtIngresos.Text, valor) If Not vParse Then 'Me.lblingresosErr.Visible = True Else 'Me.lblingresosErr.Visible = False End If 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() Me.btnAccion.Text = "Buscar" End Sub Private Sub CargarPropuesta(Id As Integer) oPropuestaInversionCE = Nothing oPropuestaInversionCE = oDAOPropuestasDeInversion.CargarPropuesta(Id) Dim vCodigoEmpresa As String = oPropuestaInversionCE.CodigoEmpresa If vCodigoEmpresa.Length = 0 Then Me.cboEmpresas.SelectedIndex = -1 Else Me.cboEmpresas.SelectedValue = vCodigoEmpresa End If Me.txtAsunto.Text = oPropuestaInversionCE.Asunto Dim vCodigoInstrumentoFinanciero As String = oPropuestaInversionCE.CodigoInstrumentoFinanciero If vCodigoInstrumentoFinanciero.Length = 0 Then Me.cboInstrumentosFinancieros.SelectedIndex = -1 Else Me.cboInstrumentosFinancieros.SelectedValue = vCodigoInstrumentoFinanciero End If Me.txtMontoInversion.Text = oPropuestaInversionCE.MontoInversion.ToString(Configuraciones.CodigoTXTMontos) Me.txtPrecio.Text = oPropuestaInversionCE.Precio.ToString(Configuraciones.CodigoTXTMontos) Me.txtRendimiento.Text = oPropuestaInversionCE.Rendimiento.ToString(Configuraciones.CodigoTXTPorcentaje) Me.txtPlazoNumero.Text = oPropuestaInversionCE.PlazoNumero Dim vPlazoFactor As String = oPropuestaInversionCE.PlazoFactor If vPlazoFactor.Length = 0 Then Me.cboPlazosFactor.SelectedIndex = -1 Else Me.cboPlazosFactor.SelectedValue = vPlazoFactor End If Me.txtIngresos.Text = oPropuestaInversionCE.Ingresos.ToString(Configuraciones.CodigoTXTMontos) Dim vOrigenDeFondos As String = oPropuestaInversionCE.OrigenDeFondos If vOrigenDeFondos.Length = 0 Then Me.cboOrigenDeFondos.SelectedIndex = -1 Else Me.cboOrigenDeFondos.SelectedValue = vOrigenDeFondos End If Dim vCodigoEmisor As String = oPropuestaInversionCE.CodigoEmisor If vCodigoEmisor = 0 Then Me.cboEmisores.SelectedIndex = -1 Else Me.cboEmisores.SelectedValue = vCodigoEmisor End If Dim vCodigoCalificacionDeRiesgo As String = oPropuestaInversionCE.CodigoCalificacionDeRiesgo If vCodigoCalificacionDeRiesgo.Length = 0 Then Me.cboCalificacionDeRiesgo.SelectedIndex = -1 Else Me.cboCalificacionDeRiesgo.SelectedValue = vCodigoCalificacionDeRiesgo End If Dim vCodigoEmpresaCalificadora As String = oPropuestaInversionCE.CodigoEmpresaCalificadora If vCodigoEmpresaCalificadora.Length = 0 Then Me.cboCalificadoraDeRiesgo.SelectedIndex = -1 Else Me.cboCalificadoraDeRiesgo.SelectedValue = vCodigoEmpresaCalificadora End If Me.txtJustificacion.Text = oPropuestaInversionCE.Justificacion Me.txtComentarios.Text = oPropuestaInversionCE.Comentarios Me.txtCodigoInversion.Text = oPropuestaInversionCE.CodigoIversion Me.txtCodigoInversion.ReadOnly = True Dim vEstadoDocumento As String = oPropuestaInversionCE.EstadoDocumento If vEstadoDocumento.Length = 0 Then Me.cboEstadoDocumento.SelectedIndex = -1 Else Me.cboEstadoDocumento.SelectedValue = vEstadoDocumento End If Dim vFechaDocumento As Date If Not Date.TryParse(oPropuestaInversionCE.FechaDocumento, vFechaDocumento) Then vFechaDocumento = Date.MinValue.Date End If Me.dtpFechaDocumento.Value = vFechaDocumento Dim vTipoOperacion As String = oPropuestaInversionCE.TipoOperacion If String.IsNullOrEmpty(vTipoOperacion) Then Me.cboTipoOperacion.SelectedIndex = -1 Else Me.cboTipoOperacion.SelectedValue = vTipoOperacion End If Dim vEstadoAut As String = oPropuestaInversionCE.EstadoAutorizacion If vEstadoAut.Length = 0 Then Me.cboAutorizacion.SelectedIndex = -1 Else Me.cboAutorizacion.SelectedValue = vEstadoAut End If Dim vTipoMercado As String = oPropuestaInversionCE.TipoMercado If String.IsNullOrEmpty(vTipoMercado) Then cboTipoMercado.SelectedIndex = -1 Else Me.cboTipoMercado.SelectedValue = vTipoMercado End If Dim vPais As String = oPropuestaInversionCE.Pais If String.IsNullOrEmpty(vPais) Then cboPaises.SelectedIndex = -1 Else cboPaises.SelectedValue = vPais End If TipoTransaccion = "C" IdPIN = Id IdIF = vCodigoInstrumentoFinanciero Me.btnAccion.Text = "Aceptar" RefrescarControles() End Sub 'NAVEGACION Sub PrimerRegistro() End Sub Sub RegistroAnterior() End Sub Sub SiguienteRegistro() End Sub Sub UltimoRegistro() End Sub Private Sub BloquearEmpresaInstrumento() 'cboEmpresas.Enabled = False 'cboInstrumentosFinancieros.Enabled = False End Sub '***FIN NAVEGACION Private Sub btnAccion_Click(sender As Object, e As EventArgs) Handles btnAccion.Click 'cboEstadoDocumento.SelectedIndexChanged() 'cboEstadoDocumento_SelectedIndexChanged() If TipoTransaccion = "B" Then LanzarBusqueda() ElseIf TipoTransaccion = "N" Then Dim IngresarInstrumento As Boolean = GuardarPropuesta() If IngresarInstrumento Then GuardarFamilia(Variables.Codigo) LimpiarControles() txtCodigoInversion.ReadOnly = True 'Me.PIN0TableAdapter1.Fill(Me.InversionesDataSet1.PIN0) Refrescar() PIN0BindingSource.SuspendBinding() End If ElseIf TipoTransaccion = "A" Then Dim posicion = PIN0BindingSource.Position ActualizarPropuesta(txtCodigoInversion.Text) 'Me.PIN0TableAdapter1.Fill(Me.InversionesDataSet1.PIN0) Refrescar() PIN0BindingSource.Position = posicion 'PIN0BindingSource.SuspendBinding() DeshabilitarControles() End If End Sub Sub GuardarFamilia(ByVal Instrumento As String) If InStr(Instrumento, "LETE") > 0 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 InStr(Instrumento, "PBUR") > 0 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 InStr(Instrumento, "VCN") > 0 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 InStr(Instrumento, "CETE") > 0 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 InStr(Instrumento, "ACC") > 0 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 InStr(Instrumento, "CINV") > 0 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 InStr(Instrumento, "BONO") > 0 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 InStr(Instrumento, "EURB0") > 0 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 InStr(Instrumento, "TIT") > 0 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 InStr(Instrumento, "DAP") > 0 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 InStr(Instrumento, "FUTU") > 0 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 InStr(Instrumento, "OPC") > 0 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 InStr(Instrumento, "PEMP") > 0 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 InStr(Instrumento, "PPER") > 0 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 InStr(Instrumento, "REPOVENTA") > 0 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 Else 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 Sub Private Sub LanzarBusqueda() frmBuscarDeLista.dgvBuscarDeLista.DataSource = oDAOPropuestasDeInversion.BuscarPropuestasInversion(oPropuestaInversionCE).Tables("Resultado") If frmBuscarDeLista.ShowDialog = DialogResult.OK Then 'Me.DocId = frmBuscarDeLista.CodigoPrincipal If Not frmBuscarDeLista.CodigoPrincipal = Nothing Then 'CargarRegistro(frmBuscarDeLista.CodigoPrincipal) CargarPropuesta(frmBuscarDeLista.CodigoPrincipal) End If End If End Sub Private Sub navPrimerRegistro_Click(sender As Object, e As EventArgs) PrimerRegistro() End Sub Private Sub navRegistroAnterior_Click(sender As Object, e As EventArgs) RegistroAnterior() End Sub Private Sub navSiguienteRegistro_Click(sender As Object, e As EventArgs) SiguienteRegistro() End Sub Private Sub navUltimoRegistro_Click(sender As Object, e As EventArgs) UltimoRegistro() 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) EliminarPropuesta() 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 ControlCodigoInversion() 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() If TipoTransaccion = "N" Or TipoTransaccion = "B" Or TipoTransaccion = "A" Then oPropuestaInversionCE.Asunto = Me.txtAsunto.Text End If End Sub Private Sub ControlInstrumento() If TipoTransaccion = "N" Then oPropuestaInversionCE.CodigoInstrumentoFinanciero = Me.cboInstrumentosFinancieros.SelectedValue GenerarCodigoDeInversion() End If If TipoTransaccion = "N" Or TipoTransaccion = "B" 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 'lblMontoInversionErr.Visible = True Else oPropuestaInversionCE.MontoInversion = valor Me.txtMontoInversion.Text = oPropuestaInversionCE.MontoInversion.ToString(Configuraciones.CodigoTXTMontos) 'lblMontoInversionErr.Visible = False 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 'lblPrecioErr.Visible = True Else oPropuestaInversionCE.Precio = valor Me.txtPrecio.Text = oPropuestaInversionCE.Precio.ToString(Configuraciones.CodigoTXTMontos) 'lblPrecioErr.Visible = False 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 'Me.lblRendimientoErr.Visible = True Else oPropuestaInversionCE.Rendimiento = valor / 100 txtRendimiento.Text = oPropuestaInversionCE.Rendimiento.ToString(Configuraciones.CodigoTXTPorcentaje) 'Me.lblRendimientoErr.Visible = False 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 'Me.lblPlazoErrr.Visible = True Else oPropuestaInversionCE.PlazoNumero = valor 'Me.lblPlazoErrr.Visible = False 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 'Me.lblingresosErr.Visible = True Else oPropuestaInversionCE.Ingresos = valor Me.txtIngresos.Text = oPropuestaInversionCE.Ingresos.ToString(Configuraciones.CodigoTXTMontos) 'Me.lblingresosErr.Visible = False 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) Then oPropuestaInversionCE.MontoInversion = 0 Else oPropuestaInversionCE.MontoInversion = txtMontoInversion.Text End If End If End Sub Private Sub ControlPr() If TipoTransaccion = "N" Or TipoTransaccion = "B" Or TipoTransaccion = "A" Then If String.IsNullOrEmpty(txtPrecio.Text) Then oPropuestaInversionCE.Precio = 0 Else oPropuestaInversionCE.Precio = txtPrecio.Text 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.CodigoIversion = 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 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 = -1 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 = False Me.cboEstadoDocumento.SelectedIndex = -1 Me.cboAutorizacion.SelectedIndex = -1 Me.dtpFechaDocumento.Value = Date.Now.Date Me.cboTipoOperacion.SelectedIndex = -1 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() End Sub Private Function ValoresValidos() As Boolean Dim DatosValidos As Boolean = True If cboEmpresas.SelectedIndex = -1 Then MsgBox("Seleccione una Empresa") DatosValidos = False Return DatosValidos End If If cboTipoOperacion.SelectedIndex = -1 Then MsgBox("Seleccione un Tipo de Operación") DatosValidos = False Return DatosValidos End If If cboInstrumentosFinancieros.SelectedIndex = -1 Then MsgBox("Seleccione un Instrumento") DatosValidos = False Return DatosValidos End If If cboOrigenDeFondos.SelectedIndex = -1 Then MsgBox("Seleccione un origen de fondos") 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() End Sub Private Sub btnDetalleIF_Click(sender As Object, e As EventArgs) Handles btnDetalleIF.Click Variables.Codigo = txtCodigoInversion.Text Variables.Periodicidad = cboPeriodicidad.SelectedValue TieneDetalleInstrumento = True Dim NuevaPosInstrumento As Boolean = False If String.IsNullOrEmpty(Variables.CodigoComparativo) Then Variables.CodigoComparativo = Variables.Codigo Else If Not Variables.CodigoComparativo = Variables.Codigo Then NuevaPosInstrumento = True End If End If Variables.InvPro = "P" Dim CodigoInstrumento As String = txtCodigoInversion.Text If InStr(CodigoInstrumento, "FINV") > 0 Then frmFOIN.ShowDialog() End If If (InStr(CodigoInstrumento, "FUTU") > 0 Or InStr(CodigoInstrumento, "OPC") > 0) Then Dim ExistInstrumento As Boolean If (InStr(CodigoInstrumento, "FUTU")) Then ExistInstrumento = ExisteInstrumento("FUT0") Else ExistInstrumento = ExisteInstrumento("OPC0") End If Try If ExistInstrumento Then FormFuturos.Dispose() FormFuturos = New frmFuturos 'FormFuturos.CargarRegistro(oInversionCE.CodigoIversion) FormFuturos.ShowDialog() Else If NuevaPosInstrumento Then Variables.CodigoComparativo = String.Empty FormFuturos.Dispose() FormFuturos = New frmFuturos FormFuturos.ShowDialog() Else FormFuturos.ShowDialog() End If End If Catch ex As Exception FormFuturos = New frmFuturos FormFuturos.ShowDialog() End Try End If If InStr(CodigoInstrumento, "REPO") > 0 Or InStr(CodigoInstrumento, "REPOVENTA") > 0 Then Dim ExistInstrumento As Boolean If (InStr(CodigoInstrumento, "REPOVENTA")) Then ExistInstrumento = ExisteInstrumento("REP0VENTA") Else ExistInstrumento = ExisteInstrumento("REP0") End If Try If ExistInstrumento Then FormRepo.Dispose() FormRepo = New frmReporto 'FormRepo.CargarRegistro(oInversionCE.CodigoIversion) FormRepo.ShowDialog() Else If NuevaPosInstrumento Then Variables.CodigoComparativo = String.Empty 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 'Dim frmInstrumento As New frmReporto 'If TipoOperacion = "C" Then ' frmInstrumento.ShowDialog() 'End If 'If TipoOperacion = "N" Then ' If frmInstrumento.ShowDialog = DialogResult.OK Then ' Dim oCE As New ReportosCE ' oInstrumentoFinanciero = oCE ' frmInstrumento.Dispose() ' Refrescar() ' End If 'End If End If If (InStr(CodigoInstrumento, "PPER") > 0) Then Dim ExistInstrumento As Boolean = ExisteInstrumento("PPER0") Try If ExistInstrumento Then FormPrestamoPersonal.Dispose() FormPrestamoPersonal = New frmPrestamoPersonal 'FormPrestamoPersonal.CargarRegistro(oInversionCE.CodigoIversion) FormPrestamoPersonal.ShowDialog() Else If NuevaPosInstrumento Then Variables.CodigoComparativo = String.Empty 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 (InStr(CodigoInstrumento, "PEMP") > 0) Then Dim ExistInstrumento As Boolean = ExisteInstrumento("PEMP0") Try If ExistInstrumento Then FormPrestamoEmpresarial.Dispose() FormPrestamoEmpresarial = New frmPrestamoEmpresariales 'FormPrestamoEmpresarial.CargarRegistro(oInversionCE.CodigoIversion) FormPrestamoEmpresarial.ShowDialog() Else If NuevaPosInstrumento Then Variables.CodigoComparativo = String.Empty 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 InStr(CodigoInstrumento, "ACC") > 0 Then Dim ExistInstrumento As Boolean = ExisteInstrumento("ACC0") Try If ExistInstrumento Then FormAcciones.Dispose() FormAcciones = New frmAcciones FormAcciones.CargarRegistro(oPropuestaInversionCE.CodigoIversion) FormAcciones.ShowDialog() Else If NuevaPosInstrumento Then Variables.CodigoComparativo = String.Empty FormAcciones.Dispose() FormAcciones = New frmAcciones FormAcciones.ShowDialog() Else FormAcciones.ShowDialog() End If End If Catch ex As Exception FormAcciones = New frmAcciones FormAcciones.ShowDialog() End Try 'Dim frmInstrumento As New frmAcciones ''frmInstrumento.Show() 'If TipoOperacion = "C" Then ' frmInstrumento.ShowDialog() 'Else ' frmInstrumento.ShowDialog() 'End If ''If TipoOperacion = "N" Then '' frmInstrumento.TipoTransaccion = "N" '' If frmInstrumento.ShowDialog = DialogResult.OK Then '' Dim oCE As New AccionesCE '' oCE = frmInstrumento.RetornarObjeto '' oInstrumentoFinanciero = oCE '' frmInstrumento.Dispose() '' End If ''End If End If If InStr(CodigoInstrumento, "LETE") > 0 Or InStr(CodigoInstrumento, "PBUR") > 0 Or InStr(CodigoInstrumento, "VCN") > 0 Or InStr(CodigoInstrumento, "CETE") > 0 Then Dim ExistInstrumento As Boolean If (InStr(CodigoInstrumento, "LETE") > 0) Then ExistInstrumento = ExisteInstrumento("LET0") ElseIf (InStr(CodigoInstrumento, "PBUR") > 0) Then ExistInstrumento = ExisteInstrumento("PBUR") ElseIf (InStr(CodigoInstrumento, "VCN") > 0) Then ExistInstrumento = ExisteInstrumento("VCN") Else ExistInstrumento = ExisteInstrumento("CET0") End If Try If ExistInstrumento Then FormLete.Dispose() FormLete = New frmLetes 'FormLete.CargarRegistro(oInversionCE.CodigoIversion) FormLete.ShowDialog() Else If NuevaPosInstrumento Then Variables.CodigoComparativo = String.Empty 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 'Dim frmInstrumento As New frmLetes 'If TipoOperacion = "C" Then 'frmInstrumento.CargarRegistro(oInversionCE.CodigoIversion) ' frmInstrumento.ShowDialog() 'End If 'If TipoOperacion = "N" Then ' frmInstrumento.Modo = "N" ' If frmInstrumento.ShowDialog = DialogResult.OK Then ' Dim oCE As New LETESCE ' oCE = frmInstrumento.RetornarObjeto ' oInstrumentoFinanciero = oCE ' frmInstrumento.Dispose() ' End If 'End If End If 'If oInversionCE.CodigoInstrumentoFinanciero = "BONO" Then ' Dim frmInstrumento As New frmBonos ' If TipoOperacion = "C" Then ' frmInstrumento.CargarRegistro(oInversionCE.CodigoIversion) ' frmInstrumento.Show() ' End If ' If TipoOperacion = "N" Then ' frmInstrumento.TipoTransaccion = "N" ' If frmInstrumento.ShowDialog = DialogResult.OK Then ' Dim oCE As New BonosCE ' oCE = frmInstrumento.RetornarObjeto ' oInstrumentoFinanciero = oCE ' frmInstrumento.Dispose() ' End If ' End If 'End If If InStr(CodigoInstrumento, "BONO") > 0 Or InStr(CodigoInstrumento, "CINV") > 0 Or InStr(CodigoInstrumento, "TIT") > 0 Or InStr(CodigoInstrumento, "EURB") > 0 Then 'Dim frmInstrumento As New frmCertificadosDeInversion 'If InStr(CodigoInstrumento, "CINV") > 0 Then ' If TipoOperacion = "C" Then ' frmInstrumento.CargarRegistro(oInversionCE.CodigoIversion) ' frmInstrumento.ShowDialog() ' End If ' If TipoOperacion = "N" Then ' frmInstrumento.TipoTransaccion = "N" ' If frmInstrumento.ShowDialog = DialogResult.OK Then ' Dim oCE As New CertificadoDeInversionCE ' oCE = frmInstrumento.RetornarObjeto ' oInstrumentoFinanciero = oCE ' frmInstrumento.Dispose() ' End If ' End If 'ElseIf InStr(CodigoInstrumento, "TIT") > 0 Then ' frmInstrumento.ShowDialog() 'ElseIf InStr(CodigoInstrumento, "EURB") > 0 Or InStr(CodigoInstrumento, "BONO") > 0 Then ' frmInstrumento.ShowDialog() 'End If Dim ExistInstrumento As Boolean If (InStr(CodigoInstrumento, "BONO") > 0) Then ExistInstrumento = ExisteInstrumento("BON0") ElseIf (InStr(CodigoInstrumento, "CINV") > 0) Then ExistInstrumento = ExisteInstrumento("CIN0") ElseIf (InStr(CodigoInstrumento, "TIT") > 0) Then ExistInstrumento = ExisteInstrumento("TIT") Else ExistInstrumento = ExisteInstrumento("EURB0") End If Try If ExistInstrumento Then FormCINV.Dispose() FormCINV = New frmCertificadosDeInversion FormCINV.CargarRegistro(oPropuestaInversionCE.CodigoIversion) FormCINV.ShowDialog() MsgBox(0) Else If NuevaPosInstrumento Then Variables.CodigoComparativo = String.Empty FormCINV.Dispose() FormCINV = New frmCertificadosDeInversion FormCINV.ShowDialog() Else FormCINV.ShowDialog() End If End If Catch ex As Exception FormCINV = New frmCertificadosDeInversion FormCINV.ShowDialog() End Try End If If InStr(CodigoInstrumento, "DAP") > 0 Then 'Dim frmInstrumento As New frmDepositosAPlazo 'If TipoOperacion = "C" Then Dim ExistInstrumento As Boolean = ExisteInstrumento("DAP0") Try If ExistInstrumento Then FormDAP.Dispose() FormDAP = New frmDepositosAPlazo FormDAP.CargarRegistro(oPropuestaInversionCE.CodigoIversion) FormDAP.ShowDialog() Else If NuevaPosInstrumento Then Variables.CodigoComparativo = String.Empty 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 TipoOperacion = "N" Then ' frmInstrumento.TipoTransaccion = "N" ' If frmInstrumento.ShowDialog = DialogResult.OK Then ' Dim oCE As New DepositosAPlazoCE ' oCE = frmInstrumento.RetornarObjeto ' oInstrumentoFinanciero = oCE ' frmInstrumento.Dispose() ' Refrescar() ' End If 'End If End If End Sub Function ExisteInstrumento(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 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 = True cboEmisores.Enabled = True cboCalificacionDeRiesgo.Enabled = True cboCalificadoraDeRiesgo.Enabled = True txtJustificacion.ReadOnly = False txtComentarios.ReadOnly = False cboTipoOperacion.Enabled = True cboAutorizacion.Enabled = False dtpFechaDocumento.Enabled = True cboTipoMercado.Enabled = True cboPaises.Enabled = True cboEstadoDocumento.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 Variables.Plazo = txtPlazoNumero.Text If (cboPlazosFactor.SelectedValue = Nothing) Then Variables.PlazoFact = "" Else Variables.PlazoFact = cboPlazosFactor.SelectedValue.ToString() End If If (String.IsNullOrEmpty(cboTasa.SelectedValue)) Then Variables.TipoTasa = "" Else Variables.TipoTasa = cboTasa.SelectedValue.ToString() End If If (String.IsNullOrEmpty(cboRenta.SelectedValue)) Then Variables.TipoRenta = "" Else Variables.TipoRenta = cboRenta.SelectedValue.ToString() End If '' If TipoTransaccion = "C" Then 'If oPropuestaInversionCE.EstadoDocumento <> "C" Then ' 'SI NO ESTA CERRADA ' If oPropuestaInversionCE.EstadoAutorizacion <> "A" Then ' 'SI NO ESTA AUTORIZADA ' Else 'ESTA AUTORIZADA Variables.NombreMainIF = txtNombre.Text Dim Id = oDAOPropuestasDeInversion.IdRegistro(txtCodigoInversion.Text) ConvertirEnInversion(Id) 'End If 'Else ' 'SI NO ESTA CERRADA 'End If 'End If End Sub Private Sub cboPaises_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboPaises.SelectedIndexChanged 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) If vConversion = 1 Then MsgBox("Completo") CargarPropuesta(vIdPropuesta) Else MsgBox("Error") End If End If End Sub Private Sub RefrescarControles() If TipoTransaccion = "C" Then 'If oPropuestaInversionCE.EstadoDocumento = "C" Then ' DeshabilitarControles() 'End If 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 If Not cboPeriodicidad.SelectedValue Is Nothing Then Variables.Periodo = cboPeriodicidad.SelectedValue.ToString() Variables.Periodicidad = cboPeriodicidad.SelectedValue.ToString() End If End Sub Private Sub cboTasa_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboTasa.SelectedIndexChanged End Sub Private Sub navEliminar_Click(sender As Object, e As EventArgs) If (Borrar() = 0) Then LimpiarControles() End If ' CargarNavegador() Refrescar() btnAccion.Text = "Buscar" 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 = "M" Operaciones.TipoOperacion = "M" oPropuestaInversionCE.EstadoDocumento = "A" PIN0BindingSource.ResumeBinding() End Sub Sub RellenarDatos() Dim MontoPrecio As New Collection Dim Codigo As String = txtCodigoInversion.Text MontoPrecio = oDAOPropuestasDeInversion.TraerMontosPrecio(Codigo) txtMontoInversion.Text = 0 txtPrecio.Text = 0 Dim TipoOperacion As String = cboTipoOperacion.SelectedValue If Not String.IsNullOrEmpty(TipoOperacion) Then If Not MontoPrecio.Count = 0 Then Dim MontoPrimario As String = String.Empty Dim MontoSecundario As String = String.Empty Dim PrecioV As String = String.Empty Dim PrecioC As String = String.Empty MontoPrimario = MontoPrecio(3).ToString MontoSecundario = MontoPrecio(4).ToString PrecioV = MontoPrecio(5).ToString PrecioC = MontoPrecio(6).ToString If TipoOperacion = "C" Then If Not String.IsNullOrEmpty(MontoSecundario) Then txtMontoInversion.Text = MontoSecundario End If If Not String.IsNullOrEmpty(PrecioC) Then txtPrecio.Text = PrecioC End If ElseIf TipoOperacion = "V" Then If Not String.IsNullOrEmpty(MontoPrimario) Then txtMontoInversion.Text = MontoPrimario End If If Not String.IsNullOrEmpty(PrecioV) Then txtPrecio.Text = PrecioV End If End If End If End If End Sub Private Sub navNuevo_Click_1(sender As Object, e As EventArgs) Handles navNuevo.Click gpbInversión.Visible = False NuevaPropuesta() PIN0BindingSource.SuspendBinding() Refrescar() TipoTransaccion = "N" PreNuevoModificar() formato() End Sub Private Sub DeshabilitarBotonesBusqueda() 'cboEmpresas.Enabled = 'txtAsunto.ReadOnly = 'cboInstrumentosFinancieros.Enabled = txtMontoInversion.ReadOnly = True txtPrecio.ReadOnly = True txtRendimiento.ReadOnly = True txtPlazoNumero.ReadOnly = True cboPlazosFactor.Enabled = False txtIngresos.ReadOnly = True cboOrigenDeFondos.Enabled = False ' cboEmisores.Enabled = cboCalificacionDeRiesgo.Enabled = cboCalificadoraDeRiesgo.Enabled = False txtJustificacion.ReadOnly = True txtComentarios.ReadOnly = True cboTipoOperacion.Enabled = False ' cboEstadoDocumento.Enabled = cboAutorizacion.Enabled = False dtpFechaDocumento.Enabled = False cboTipoMercado.Enabled = False cboPaises.Enabled = False End Sub Sub HabilitarAut() cboAutorizacion.Enabled = True End Sub Private Sub navBuscar_Click_1(sender As Object, e As EventArgs) Handles navBuscar.Click HabilitarBusqueda() formato() End Sub Sub HabilitarBusqueda() HabilitarControles() '' DeshabilitarBotonesBusqueda() gpbInversión.Visible = False ' PrepararBusqueda() PreBusqueda() PIN0BindingSource.SuspendBinding() TipoTransaccion = "B" End Sub Private Sub navModificar_Click(sender As Object, e As EventArgs) Handles navModificar.Click btnAccion.Text = "Actualizar" HabilitarControles() TipoTransaccion = "M" Operaciones.TipoOperacion = "M" UsuarioPrivilegio() PrepararModificacion() Refrescar() BloquearEmpresaInstrumento() TipoTransaccion = "A" 'PIN0BindingSource.SuspendBinding() PreNuevoModificar() formato() HabilitarAut() 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 If (Operaciones.TipoOperacion = "M") Then UsuarioPrivilegio() Else 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 If (BorrarPropuesta() = 0) Then LimpiarControles() End If PIN0BindingSource.SuspendBinding() Refrescar() btnAccion.Text = "Buscar" HabilitarControles() DeshabilitarBotonesBusqueda() PrepararBusqueda() Variables.CodigoComparativo = "NULL" 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 RellenarDatos() End Sub Private Sub PIN0BindingSource_CurrentChanged(sender As Object, e As EventArgs) Handles PIN0BindingSource.CurrentChanged End Sub Private Sub navRegistroAnterior_Click_1(sender As Object, e As EventArgs) Handles navRegistroAnterior.Click btnAccion.Text = "Aceptar" DeshabilitarControles() End Sub Private Sub navPrimerRegistro_Click_1(sender As Object, e As EventArgs) Handles navPrimerRegistro.Click btnAccion.Text = "Aceptar" DeshabilitarControles() End Sub Private Sub navUltimoRegistro_Click_1(sender As Object, e As EventArgs) Handles navUltimoRegistro.Click btnAccion.Text = "Aceptar" DeshabilitarControles() End Sub Private Sub PreBusqueda() Me.cboEmpresas.BackColor = Configuraciones.ColorFondoBusqueda() Me.txtCodigoInversion.BackColor = Configuraciones.ColorFondoBusqueda() Me.cboInstrumentosFinancieros.BackColor = Configuraciones.ColorFondoBusqueda() Me.cboEmisores.BackColor = Configuraciones.ColorFondoBusqueda() Me.cboCalificacionDeRiesgo.BackColor = Configuraciones.ColorFondoBusqueda() Me.cboCalificadoraDeRiesgo.BackColor = Configuraciones.ColorFondoBusqueda() Me.txtCodigoInversion.BackColor = Configuraciones.ColorFondoBusqueda() Me.cboPaises.BackColor = Configuraciones.ColorFondoBusqueda() Me.cboTipoMercado.BackColor = Configuraciones.ColorFondoBusqueda() Me.txtNombre.BackColor = Configuraciones.ColorFondoBusqueda() Me.cboPeriodicidad.BackColor = Configuraciones.ColorFondoBusqueda() Me.txtPlazoNumero.BackColor = Configuraciones.ColorFondoBusqueda() Me.cboPlazosFactor.BackColor = Configuraciones.ColorFondoBusqueda() Me.cboRenta.BackColor = Configuraciones.ColorFondoBusqueda() Me.cboTasa.BackColor = Configuraciones.ColorFondoBusqueda() Me.txtCodigoInversion.BackColor = Configuraciones.ColorFondoBusqueda() Me.cboEstadoDocumento.BackColor = Configuraciones.ColorFondoBusqueda() txtMontoInversion.BackColor = Configuraciones.ColorFondoBusqueda() txtPrecio.BackColor = Configuraciones.ColorFondoBusqueda() txtRendimiento.BackColor = Configuraciones.ColorFondoBusqueda() txtIngresos.BackColor = Configuraciones.ColorFondoBusqueda() cboOrigenDeFondos.BackColor = Configuraciones.ColorFondoBusqueda() cboTipoOperacion.BackColor = Configuraciones.ColorFondoBusqueda() cboAutorizacion.BackColor = Configuraciones.ColorFondoBusqueda() txtAsunto.BackColor = Configuraciones.ColorFondoBusqueda() dtpFechaDocumento.Enabled = False TipoTransaccion = "B" oPropuestaInversionCE = Nothing oPropuestaInversionCE = New CEPropuestaInversion LimpiarControles() Me.btnAccion.Text = "Buscar" 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 = SystemColors.Control 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) 'formato() 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.Turquoise.Name Then sender.BackColor = Color.White End If Else If Not sender.parent.BackColor.Name = Color.Turquoise.Name Then sender.BackColor = Color.White End If End If End Sub Sub Alejar(sender As Object) If TypeOf sender Is Panel Then If Not sender.BackColor.Name = Color.Turquoise.Name Then sender.BackColor = Color.WhiteSmoke End If Else If Not sender.parent.BackColor.Name = Color.Turquoise.Name Then sender.BackColor = Color.WhiteSmoke End If End If End Sub Sub MenuSeleccionado(sender As Object) 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 sender.BackColor = Color.Turquoise sender.parent.backcolor = Color.Turquoise End Sub Private Sub lblOrigenFondos_MouseHover(sender As Object, e As EventArgs) Handles lblOrigenFondos.MouseHover EventHijoAcercar(sender) End Sub Private Sub lblOrigenFondos_MouseLeave(sender As Object, e As EventArgs) Handles lblOrigenFondos.MouseLeave EventHijoAlejar(sender) End Sub Private Sub pnlOrigenFondos_MouseHover(sender As Object, e As EventArgs) Handles pnlOrigenFondos.MouseHover EventPadreAcercar(sender) End Sub Private Sub pnlOrigenFondos_MouseLeave(sender As Object, e As EventArgs) Handles pnlOrigenFondos.MouseLeave 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) Handles lblEmisor.MouseHover EventHijoAcercar(sender) End Sub Private Sub lblEmisor_MouseLeave(sender As Object, e As EventArgs) Handles lblEmisor.MouseLeave EventHijoAlejar(sender) End Sub Private Sub pnlEmisor_MouseHover(sender As Object, e As EventArgs) Handles pnlEmisor.MouseHover EventPadreAcercar(sender) End Sub Private Sub pnlEmisor_MouseLeave(sender As Object, e As EventArgs) Handles pnlEmisor.MouseLeave EventPadreAlejar(sender) End Sub Private Sub pnlCalificacionRiesgo_MouseHover(sender As Object, e As EventArgs) Handles pnlCalificacionRiesgo.MouseHover EventPadreAcercar(sender) End Sub Private Sub pnlCalificacionRiesgo_MouseLeave(sender As Object, e As EventArgs) Handles pnlCalificacionRiesgo.MouseLeave EventPadreAlejar(sender) End Sub Private Sub lblCalificadora_MouseHover(sender As Object, e As EventArgs) Handles lblCalificadora.MouseHover EventHijoAcercar(sender) End Sub Private Sub lblPais_MouseHover(sender As Object, e As EventArgs) Handles lblPais.MouseHover EventHijoAcercar(sender) End Sub Private Sub lblEstado_MouseHover(sender As Object, e As EventArgs) Handles lblEstado.MouseHover EventHijoAcercar(sender) End Sub Private Sub lblAutorizacion_MouseHover(sender As Object, e As EventArgs) Handles lblAutorizacion.MouseHover EventHijoAcercar(sender) End Sub Private Sub lblTipoOperacion_MouseHover(sender As Object, e As EventArgs) Handles lblTipoOperacion.MouseHover EventHijoAcercar(sender) End Sub Private Sub lblTipoMercado_MouseHover(sender As Object, e As EventArgs) Handles lblTipoMercado.MouseHover EventHijoAcercar(sender) End Sub Private Sub lblCalificadora_MouseLeave(sender As Object, e As EventArgs) Handles lblCalificadora.MouseLeave EventHijoAlejar(sender) End Sub Private Sub lblPais_MouseLeave(sender As Object, e As EventArgs) Handles lblPais.MouseLeave EventHijoAlejar(sender) End Sub Private Sub lblEstado_MouseLeave(sender As Object, e As EventArgs) Handles lblEstado.MouseLeave EventHijoAlejar(sender) End Sub Private Sub lblAutorizacion_MouseLeave(sender As Object, e As EventArgs) Handles lblAutorizacion.MouseLeave EventHijoAlejar(sender) End Sub Private Sub lblTipoOperacion_MouseLeave(sender As Object, e As EventArgs) Handles lblTipoOperacion.MouseLeave EventHijoAlejar(sender) End Sub Private Sub lblTipoMercado_MouseLeave(sender As Object, e As EventArgs) Handles lblTipoMercado.MouseLeave EventHijoAlejar(sender) End Sub Private Sub pnlCalificadora_MouseHover(sender As Object, e As EventArgs) Handles pnlCalificadora.MouseHover EventPadreAcercar(sender) End Sub Private Sub pnlPais_MouseHover(sender As Object, e As EventArgs) Handles pnlPais.MouseHover EventPadreAcercar(sender) End Sub Private Sub pnlEstado_MouseHover(sender As Object, e As EventArgs) Handles pnlEstado.MouseHover EventPadreAcercar(sender) End Sub Private Sub pnlAutorizacion_MouseHover(sender As Object, e As EventArgs) Handles pnlAutorizacion.MouseHover EventPadreAcercar(sender) End Sub Private Sub pnlTipOper_MouseHover(sender As Object, e As EventArgs) Handles pnlTipOper.MouseHover EventPadreAcercar(sender) End Sub Private Sub pnlTipMercado_MouseHover(sender As Object, e As EventArgs) Handles pnlTipMercado.MouseHover EventPadreAcercar(sender) End Sub Private Sub pnlCalificadora_MouseLeave(sender As Object, e As EventArgs) Handles pnlCalificadora.MouseLeave EventPadreAlejar(sender) End Sub Private Sub pnlPais_MouseLeave(sender As Object, e As EventArgs) Handles pnlPais.MouseLeave EventPadreAlejar(sender) End Sub Private Sub pnlEstado_MouseLeave(sender As Object, e As EventArgs) Handles pnlEstado.MouseLeave EventPadreAlejar(sender) End Sub Private Sub pnlAutorizacion_MouseLeave(sender As Object, e As EventArgs) Handles pnlAutorizacion.MouseLeave EventPadreAlejar(sender) End Sub Private Sub pnlTipOper_MouseLeave(sender As Object, e As EventArgs) Handles pnlTipOper.MouseLeave EventPadreAlejar(sender) End Sub Private Sub pnlTipMercado_MouseLeave(sender As Object, e As EventArgs) Handles pnlTipMercado.MouseLeave EventPadreAlejar(sender) End Sub Private Sub lblCalificacionRiesgo_MouseHover(sender As Object, e As EventArgs) Handles lblCalificacionRiesgo.MouseHover EventHijoAcercar(sender) End Sub Private Sub lblCalificacionRiesgo_MouseLeave(sender As Object, e As EventArgs) Handles lblCalificacionRiesgo.MouseLeave 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) Handles lblInstrumento.Click ProcesoVisibilidad(grpInstrumentos) MenuSeleccionado(lblInstrumento) End Sub Private Sub lblEmpresa_MouseHover(sender As Object, e As EventArgs) Handles lblEmpresa.MouseHover EventHijoAcercar(sender) End Sub Private Sub lblInstrumento_MouseHover(sender As Object, e As EventArgs) Handles lblInstrumento.MouseHover EventHijoAcercar(sender) End Sub Private Sub lblEmpresa_MouseLeave(sender As Object, e As EventArgs) Handles lblEmpresa.MouseLeave EventHijoAlejar(sender) End Sub Private Sub lblInstrumento_MouseLeave(sender As Object, e As EventArgs) Handles lblInstrumento.MouseLeave EventHijoAlejar(sender) End Sub Private Sub pnlEmpresa_MouseHover(sender As Object, e As EventArgs) Handles pnlEmpresa.MouseHover EventPadreAcercar(sender) End Sub Private Sub pnlInstrumento_MouseHover(sender As Object, e As EventArgs) Handles pnlInstrumento.MouseHover EventPadreAcercar(sender) End Sub Private Sub pnlEmpresa_MouseLeave(sender As Object, e As EventArgs) Handles pnlEmpresa.MouseLeave EventPadreAlejar(sender) End Sub Private Sub pnlInstrumento_MouseLeave(sender As Object, e As EventArgs) Handles pnlInstrumento.MouseLeave EventPadreAlejar(sender) End Sub Private Sub lblPlazo_MouseHover(sender As Object, e As EventArgs) Handles lblPlazo.MouseHover EventHijoAcercar(sender) End Sub Private Sub lblPlazo_MouseLeave(sender As Object, e As EventArgs) Handles lblPlazo.MouseLeave EventHijoAlejar(sender) End Sub Private Sub pnlPlazo_MouseHover(sender As Object, e As EventArgs) Handles pnlPlazo.MouseHover EventPadreAcercar(sender) End Sub Private Sub pnlPlazo_MouseLeave(sender As Object, e As EventArgs) Handles pnlPlazo.MouseLeave EventPadreAlejar(sender) End Sub Private Sub lblEmpresa_Click(sender As Object, e As EventArgs) Handles lblEmpresa.Click ProcesoVisibilidad(grpEmpresas) MenuSeleccionado(lblEmpresa) 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 - 25 Dim W_Tamflp As Double = W_Tamgrp - 25 Dim H_Tamgrp As Double = Items.Parent.Height - 50 Dim H_Tamflp As Double = H_Tamgrp - 50 Items.Width = W_Tamgrp Items.Height = H_Tamgrp Items.Location = New Point(15, 15) For Each flItem In Items.Controls If TypeOf flItem Is FlowLayoutPanel Then flItem.Width = W_Tamflp flItem.Height = H_Tamflp End If Next For Each item In Items.Controls If TypeOf item Is CheckBox Then Dim W_Tamchk As Double = item.Width - 20 item.Width = W_Tamchk End If Next End If Next End Sub Private Sub pnlEmpresa_Paint(sender As Object, e As PaintEventArgs) Handles pnlEmpresa.Paint End Sub Private Sub pnlInstrumento_Paint(sender As Object, e As PaintEventArgs) Handles pnlInstrumento.Paint End Sub Private Sub lblOrigenFondos_Click(sender As Object, e As EventArgs) Handles lblOrigenFondos.Click ProcesoVisibilidad(grpOrigenFondos) MenuSeleccionado(lblOrigenFondos) End Sub Private Sub pnlOrigenFondos_Paint(sender As Object, e As PaintEventArgs) Handles pnlOrigenFondos.Paint End Sub Private Sub lblPlazo_Click(sender As Object, e As EventArgs) Handles lblPlazo.Click ProcesoVisibilidad(grpPlazo) MenuSeleccionado(lblPlazo) End Sub Private Sub pnlPlazo_Paint(sender As Object, e As PaintEventArgs) Handles pnlPlazo.Paint End Sub Private Sub lblEmisor_Click(sender As Object, e As EventArgs) Handles lblEmisor.Click ProcesoVisibilidad(grpEmisor) MenuSeleccionado(lblEmisor) End Sub Private Sub pnlEmisor_Paint(sender As Object, e As PaintEventArgs) Handles pnlEmisor.Paint End Sub Private Sub lblCalificacionRiesgo_Click(sender As Object, e As EventArgs) Handles lblCalificacionRiesgo.Click ProcesoVisibilidad(grpCalificacionRiesgo) MenuSeleccionado(lblCalificacionRiesgo) End Sub Private Sub pnlCalificacionRiesgo_Paint(sender As Object, e As PaintEventArgs) Handles pnlCalificacionRiesgo.Paint End Sub Private Sub pnlEmpresa_Click(sender As Object, e As EventArgs) Handles pnlEmpresa.Click ProcesoVisibilidad(grpEmpresas) End Sub Private Sub pnlInstrumento_Click(sender As Object, e As EventArgs) Handles pnlInstrumento.Click ProcesoVisibilidad(grpInstrumentos) End Sub Private Sub lblCalificadora_Click(sender As Object, e As EventArgs) Handles lblCalificadora.Click ProcesoVisibilidad(grpCalificadoraRiesgo) MenuSeleccionado(lblCalificadora) End Sub Private Sub pnlCalificadora_Click(sender As Object, e As EventArgs) Handles pnlCalificadora.Click ProcesoVisibilidad(grpCalificadoraRiesgo) End Sub Private Sub lblPais_Click(sender As Object, e As EventArgs) Handles lblPais.Click ProcesoVisibilidad(grpPais) MenuSeleccionado(lblPais) End Sub Private Sub pnlPais_Click(sender As Object, e As EventArgs) Handles pnlPais.Click ProcesoVisibilidad(grpPais) End Sub Private Sub lblEstado_Click(sender As Object, e As EventArgs) Handles lblEstado.Click ProcesoVisibilidad(grpEstadoDocumento) MenuSeleccionado(lblEstado) End Sub Private Sub pnlEstado_Click(sender As Object, e As EventArgs) Handles pnlEstado.Click ProcesoVisibilidad(grpEstadoDocumento) End Sub Private Sub lblAutorizacion_Click(sender As Object, e As EventArgs) Handles lblAutorizacion.Click ProcesoVisibilidad(grpAutorizacion) MenuSeleccionado(lblAutorizacion) End Sub Private Sub pnlAutorizacion_Click(sender As Object, e As EventArgs) Handles pnlAutorizacion.Click ProcesoVisibilidad(grpAutorizacion) End Sub Private Sub lblTipoOperacion_Click(sender As Object, e As EventArgs) Handles lblTipoOperacion.Click ProcesoVisibilidad(grpTipoOperacion) MenuSeleccionado(lblTipoOperacion) End Sub Private Sub pnlTipOper_Click(sender As Object, e As EventArgs) Handles pnlTipOper.Click ProcesoVisibilidad(grpTipoOperacion) End Sub Private Sub lblTipoMercado_Click(sender As Object, e As EventArgs) Handles lblTipoMercado.Click ProcesoVisibilidad(grpTipoMercado) MenuSeleccionado(lblTipoMercado) End Sub Private Sub pnlTipMercado_Click(sender As Object, e As EventArgs) Handles pnlTipMercado.Click ProcesoVisibilidad(grpTipoMercado) End Sub Private Sub pnlOrigenFondos_Click(sender As Object, e As EventArgs) Handles pnlOrigenFondos.Click ProcesoVisibilidad(grpOrigenFondos) End Sub Private Sub pnlPlazo_Click(sender As Object, e As EventArgs) Handles pnlPlazo.Click ProcesoVisibilidad(grpPlazo) End Sub Private Sub pnlEmisor_Click(sender As Object, e As EventArgs) Handles pnlEmisor.Click ProcesoVisibilidad(grpEmisor) End Sub Private Sub pnlCalificacionRiesgo_Click(sender As Object, e As EventArgs) Handles pnlCalificacionRiesgo.Click ProcesoVisibilidad(grpCalificacionRiesgo) End Sub End Class