01.
Private
Sub
Button5_Click(
ByVal
sender
As
System.
Object
,
ByVal
e
As
System.EventArgs)
Handles
Button5.Click
02.
Dim
l
As
Integer
03.
For
j
As
Integer
= 0
To
l
04.
If
l = j
Then
05.
sql =
"update Product set product_amount = product_amount + "
& product_amount.Text &
"where product_id = '"
& product_id.Text &
"'"
06.
End
If
07.
Next
08.
cmd =
New
SqlClient.SqlCommand(sql, cn)
09.
If
cmd.ExecuteNonQuery = 0
Then
10.
11.
End
If
12.
13.
If
confirm(
"คุณต้องการจะลบรายการนี้หรือไม่"
) = vbNo
Then
Return
14.
listview_car.Items.Remove(listview_car.FocusedItem)
15.
total_price()
16.
End
Sub