Public Class frmFiltrosReporte

    Dim oDAOGeneral As New DAOGeneral
    Private Sub FiltrosReporte_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Call CargarInstrumentosFinancieros()
    End Sub
    Private Sub CargarInstrumentosFinancieros()
        Me.cboInstrumento.DataSource = oDAOGeneral.ListaInstrumentos
        Me.cboInstrumento.DisplayMember = "Descripcion"
        Me.cboInstrumento.ValueMember = "Codigo"
        Me.cboInstrumento.SelectedIndex = -1
    End Sub

    Private Sub btnBuscar_Click(sender As Object, e As EventArgs) Handles btnBuscar.Click
        Variables.CodigoInstrumento = cboInstrumento.SelectedValue
        If (cboInstrumento.SelectedValue = "REPO") Then
            frmRegistroReportos.Show()
            Me.Close()
        End If
        If (cboInstrumento.SelectedValue = "LETE" Or cboInstrumento.SelectedValue = "PBUR" Or cboInstrumento.SelectedValue = "VCN") Then
            frmRegistroLetes.Show()
            Me.Close()
        End If

        If (cboInstrumento.SelectedValue = "PPER") Then
            frmRegistroPrestamoPersonal.Show()
            Me.Close()
        End If

        If (cboInstrumento.SelectedValue = "PEMP") Then
            frmResgistrosPrestamoEmpresarial.Show()
            Me.Close()
        End If

        If (cboInstrumento.SelectedValue = "FINV") Then
            frmRegitrosFondoInversion.Show()
            Me.Close()
        End If

        If (cboInstrumento.SelectedValue = "ACCNC" Or cboInstrumento.SelectedValue = "ACCNP" Or cboInstrumento.SelectedValue = "ACCI") Then
            frmRegistroAcciones.Show()
            Me.Close()
        End If

        If (cboInstrumento.SelectedValue = "FUTU" Or cboInstrumento.SelectedValue = "OPC") Then
            frmRegistroFuturosOpciones.Show()
            Me.Close()
        End If

    End Sub
End Class