rony rony

rony rony

  • NA
  • 1
  • 1.1k

how do i use the code in a button click event

Sep 12 2012 11:51 PM
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)