1
Answer

how do i use the code in a button click event

rony rony

rony rony

12y
908
1
I new to .net , can someone please tell me how do i use the code on a button click event
any bit of info would be helpful


int quantityUsed = CAST(form.quantity.Text, int)
int verifyQuantity

SELECT quantity INTO verifyQuantity FROM component
WHERE itemName = form.item.Text

IF NOT_FOUND THEN <error routine for invalid item name>
ELSE
IF verifyQuantity < quantityUsed THEN <error routine for insufficient inventory>
ELSE
UPDATE component SET quantity = quantity - quantityUsed
WHERE itemName = form.item.Text
ENDIF
ENDIF
Answers (1)
Next Recommended Forum