01.
Dim
StrConn
As
String
02.
Dim
Sql
As
String
03.
StrConn = WebConfigurationManager.ConnectionStrings(
"conn"
).ConnectionString
04.
Dim
Conn
As
New
SqlConnection(StrConn)
05.
Conn.Open()
06.
Dim
a, b, c, d, f, g, h, i
As
Integer
07.
Sql =
"SELECT * FROM Dtac_sale where month(Dtac_sale.date_now)= "
& Month.Text &
" AND year(Dtac_sale.date_now)= "
& Year.Text &
" "
08.
Dim
sqlCom
As
New
SqlCommand(Sql, Conn)
09.
Dim
dr
As
SqlDataReader = sqlCom.ExecuteReader
10.
While
dr.Read
11.
a = dr.Item(
"sale_60"
)
12.
b = dr.Item(
"sale_100"
)
13.
c = dr.Item(
"sale_200"
)
14.
d = dr.Item(
"sale_300"
)
15.
f = dr.Item(
"back_60"
)
16.
g = dr.Item(
"back_100"
)
17.
h = dr.Item(
"back_200"
)
18.
i = dr.Item(
"back_300"
)
19.
Response.Write(a)
20.
Response.Write(
"<br>"
)
21.
Session(
"z"
) = Session(
"z"
) + a
22.
Session(
"y"
) = Session(
"y"
) + b
23.
Session(
"x"
) = Session(
"x"
) + c
24.
Session(
"w"
) = Session(
"w"
) + d
25.
Session(
"v"
) = Session(
"v"
) + f
26.
Session(
"u"
) = Session(
"u"
) + g
27.
Session(
"t"
) = Session(
"t"
) + h
28.
Session(
"s"
) = Session(
"s"
) + i
29.
End
While