Public Class Frm_History


    Public Sub New(_tablename As String, _code As String)

        ' 이 호출은 디자이너에 필요합니다.
        InitializeComponent()
        bs.Filter = "tablename ='" + _tablename + "' and code='" + _code + "'"

        ' InitializeComponent() 호출 뒤에 초기화 코드를 추가하십시오.

    End Sub
    Private Sub Frm_History_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        Me.bs.DataSource = Pub.DSHistory
    End Sub

    Private Sub DataGridView1_CellContentDoubleClick(sender As System.Object, e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentDoubleClick
        Dim drv As DataRowView = Me.bs.Current
        tablename = drv("tablename").ToString
        val = drv("ovalue").ToString
        colname = drv("column").ToString
        DialogResult = Windows.Forms.DialogResult.OK
    End Sub

    Private Sub DataGridView1_CellDoubleClick(sender As System.Object, e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellDoubleClick
        Dim drv As DataRowView = Me.bs.Current
        tablename = drv("tablename").ToString
        val = drv("ovalue").ToString
        colname = drv("column").ToString
        DialogResult = Windows.Forms.DialogResult.OK
    End Sub

    Public tablename As String = ""
    Public val As String = ""
    Public colname As String = ""

    Private Sub Frm_History_KeyDown(sender As System.Object, e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
        If e.KeyCode = Keys.Escape Then
            Me.DialogResult = Windows.Forms.DialogResult.Cancel
        End If
    End Sub
End Class