01.
With
DataGridView1
02.
03.
tb_CareID.Text = .Rows.Item(e.RowIndex).Cells(0).Value.ToString()
04.
dt_CareDate.Text = .Rows.Item(e.RowIndex).Cells(1).Value.ToString()
05.
lb_empFname.Text = .Rows.Item(e.RowIndex).Cells(2).Value.ToString()
06.
lb_empLname.Text = .Rows.Item(e.RowIndex).Cells(3).Value.ToString()
07.
If
(.Rows.Item(e.RowIndex).Cells(4).Value.ToString() =
"CA"
)
Then
08.
CareService.Checked =
True
09.
Else
10.
ReturnDog.Checked =
True
11.
End
If
12.
End
With
13.
14.
Dim
d_adap
As
SqlDataAdapter
15.
Dim
d_set
As
DataSet
16.
d_set =
New
DataSet
17.
18.
d_adap =
New
SqlDataAdapter(
"select Cdog_ID,Cdog_Name,Cdog_Sex,Cdog_Color,Breed_Name,Size_Name,"
& _
19.
"Care_ID "
& _
20.
"from Customer_Dog,Dog_Breed,Price_Rate,Care_Service,Care_Detail "
& _
21.
"Where Cdog_ID = Cdog_No and Dog_Breed_ID = Cdog_Breed_No and Care_ID = Care_No "
& _
22.
"and Size_ID = Size_No and Care_No = '"
& tb_CareID.Text &
"'"
, sqlConnection)
23.
d_adap.Fill(d_set,
"Care_Detail"
)
24.
25.
DataGridView2.Columns(0).DataPropertyName =
"Cdog_ID"
26.
DataGridView2.Columns(1).DataPropertyName =
"Cdog_Name"
27.
DataGridView2.Columns(2).DataPropertyName =
"Cdog_Sex"
28.
DataGridView2.Columns(3).DataPropertyName =
"Cdog_Color"
29.
DataGridView2.Columns(4).DataPropertyName =
"Breed_Name"
30.
DataGridView2.Columns(5).DataPropertyName =
"Size_Name"
31.
32.
DataGridView2.DataSource = d_set.Tables(
"Care_Detail"
)