01.
If
day1 =
"1"
Then
02.
Dim
str_date
As
String
=
""
03.
Dim
date1_a
As
Date
=
Date
.Now.ToShortDateString
04.
str_date = day2.ToShortDateString
05.
06.
sql =
"select top 1 DocNo from BCQuotation where DocNo LIKE '%QA58%' AND convert(VARCHAR, DocDate, 103)= '"
& str_date &
"' order by DocNo DESC"
07.
da =
New
SqlDataAdapter(sql, cn)
08.
dt2 =
New
DataTable
09.
da.Fill(dt2)
10.
If
dt.Rows.Count > 0
Then
11.
GridView1.DataSource = dt2
12.
GridView1.DataBind()
13.
14.
15.
16.
End
If
17.
Else
18.
cut_str2 = cut_str2 + 1S
19.
End
If