Imports System.Data.SqlClient
Public Class frmBuscarDeLista
    Dim strCodigoPrincipal As String
    Dim CapaNegociosGeneral As New CNGeneral
    Dim InversionPropuesta As Integer = 0


    Sub New()

        ' Esta llamada es exigida por el diseñador.
        InitializeComponent()

        ' Agregue cualquier inicialización después de la llamada a InitializeComponent().

    End Sub


    Sub New(ByVal valor As Integer)

        Me.New
        InversionPropuesta = valor

    End Sub

    Function CodigoPrincipal()
        Return strCodigoPrincipal
    End Function



    Private Sub frmBuscarDeLista_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    End Sub


    Private Sub dgvBuscarDeLista_CellClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvBuscarDeLista.CellClick

        If InversionPropuesta = 1 Then
            frmPIN.CargarDatosContenedor()
        ElseIf InversionPropuesta = 2 Then

            frmINV.CargarDatosContenedor()
        End If

    End Sub

    Private Sub dgvBuscarDeLista_DataBindingComplete(sender As Object, e As DataGridViewBindingCompleteEventArgs) Handles dgvBuscarDeLista.DataBindingComplete
        dgvBuscarDeLista.ClearSelection()
        dgvBuscarDeLista.CurrentCell = Nothing
        dgvBuscarDeLista.Refresh()
    End Sub

    Private Sub btnCancelar_Click(sender As Object, e As EventArgs) Handles btnCancelar.Click
        Me.Close()
    End Sub

    Private Sub btnAceptar_Click(sender As Object, e As EventArgs) Handles btnAceptar.Click
        If strCodigoPrincipal = Nothing Then
            MsgBox("No se ha seleccionado un registro")
        Else
            Me.Close()
        End If

    End Sub

    Private Sub dgvBuscarDeLista_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvBuscarDeLista.CellContentClick

    End Sub

    Private Sub FlowLayoutPanel1_Paint(sender As Object, e As PaintEventArgs) Handles FlowLayoutPanel1.Paint

    End Sub
End Class