01.
string
check =
" Select VMilk_2 from VolumMilk where .......... "
;
02.
SqlCommand cmd =
new
SqlCommand(check, con);
03.
SqlDataAdapter adapter =
new
SqlDataAdapter(cmd);
04.
DataSet ds =
new
DataSet();
05.
06.
if
(ds.Tables[0].Rows.Count > 0)
07.
{
08.
..........................
09.
}
10.
11.
else
12.
{
13.
string
check1 =
" Select VMilk_1 from VolumMilk where ........... "
;
14.
SqlCommand cmd1 =
new
SqlCommand(check1, con);
15.
SqlDataAdapter adapter1 =
new
SqlDataAdapter(cmd1);
16.
DataSet ds1 =
new
DataSet();
17.
adapter1.Fill(ds1,
"prod2"
);
18.
MessageBox.Show(ds1.Tables[0].Rows.Count.ToString() + check1);
19.
if
(ds1.Tables[0].Rows.Count > 0)
20.
{
21.
...................
22.
}
23.
else
24.
{
25.
....................
26.
}
27.
}