Private Sub DataGridView4_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView4.CellClick
Button1.Hide()
If e.RowIndex = DataGridView4.RowCount - 1 Then
Exit Sub
End If
'อ่านข้อมูลพนักงานที่ถูกเลือกให้แสดงในคอนโทลแต่ละตัว
With DataGridView4
TextBox2.Text = .Rows.Item(e.RowIndex).Cells(0).Value.ToString
TextBox13.Text = .Rows.Item(e.RowIndex).Cells(19).Value.ToString
End With
End Sub
Private Sub DataGridView1_MouseUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles DataGridView1.CellMouseUp
Button1.Show()
DataGridView4.Hide()
If e.ColumnIndex = DataGridView1.ColumnCount - 1 Then
Exit Sub
End If
'อ่านข้อมูลพนักงานที่ถูกเลือกให้แสดงในคอนโทลแต่ละตัว
With DataGridView1
TextBox2.Text = .Rows.Item(e.RowIndex).Cells(0).Value.ToString
End With
With DataGridView4
(Textbox) TextBox2 = (Textbox)Rows.Item(e.RowIndex).Cells(0).Value.ToString
(Textbox) TextBox13 = (Textbox)Rows.Item(e.RowIndex).Cells(19).Value.ToString
End With