01.
Private
Sub
btn_addsend_Click(
ByVal
sender
As
System.
Object
,
ByVal
e
As
System.EventArgs)
Handles
btn_addsend.Click
02.
If
txt_out_sn.Text =
""
Or
cbb_status.Text =
""
Or
txt_out_notesend.Text =
""
Then
03.
msg_errer(
"กรุณากรอกข้อมูลให้ครบ"
)
04.
Return
05.
End
If
06.
sql =
"select product_amount from product where product_id_full='"
& txt_out_pro_id.Text &
" product_amount='"
& num_exit.Value &
"'"
07.
DA =
New
SqlDataAdapter(sql, cn)
08.
DS =
New
DataSet
09.
DA.Fill(DS,
"table"
)
10.
Dim
dtp
As
DataTable = DS.Tables(
"table"
)
11.
If
dtp.Rows.Count <= 0
Then
12.
msg_errer(
"จำนวนสินค้าในสต๊อคเคลมเป็น 0 ไม่สามารถทำส่งคืนได้ กรุณารับสินค้าเข้าสต๊อค"
)
13.
Return
14.
End
If