Private Sub bt_Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_Cancel.Click
lb_empFname.Text = login.Emp_Fname
lb_empLname.Text = login.Emp_Lname
Clear()
Control_bt()
Control_child_bt()
Disabled_Display()
dt_saleDate.ResetText()
bt_Add.Enabled = True
bt_Back.Enabled = True
bt_ViewDetail.Enabled = True
DataGridView1.Enabled = False
If DataGridView2.Rows.Count = 0 Then
Exit Sub
Else
DataGridView2.DataSource.Clear()
End If
End Sub
'****************************************************************************************************
'เลือกสุนัขเเล้วส่งไปหน้า sale
'****************************************************************************************************
For i = 0 To DataGridView1.Rows.Count - 1
If DataGridView1.Rows(i).Selected Then
Dim j As Integer = Sale.DataGridView2.Rows.Add()
Sale.DataGridView2.Rows(j).Cells(0).Value = DataGridView1.Rows(i).Cells(0).Value
Sale.DataGridView2.Rows(j).Cells(1).Value = DataGridView1.Rows(i).Cells(1).Value
Sale.DataGridView2.Rows(j).Cells(2).Value = DataGridView1.Rows(i).Cells(2).Value
Sale.DataGridView2.Rows(j).Cells(3).Value = DataGridView1.Rows(i).Cells(3).Value
Sale.DataGridView2.Rows(j).Cells(4).Value = DataGridView1.Rows(i).Cells(4).Value
End If
Next