fork download
  1. Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
  2. ' taking the input from the text box's and putting them in the Table
  3. ' multiplies the quantity needed plus the unit price to get the subtotal
  4.  
  5. Dim decSubTotal As Decimal
  6. Dim intQuantity As Integer
  7. Dim decPrice As Decimal
  8. Dim strItem As String
  9.  
  10. Decimal.TryParse(txtQuantity.Text, intQuantity)
  11. Integer.TryParse(txtPrice.Text, decPrice)
  12.  
  13. strItem = txtItem.Text
  14.  
  15. decSubTotal = decPrice * intQuantity
  16.  
  17. decTotal = decTotal + decSubTotal
  18.  
  19. txtOutPut.Text = txtOutPut.Text & strItem & vbTab & vbTab & intQuantity & vbTab & vbTab & decPrice & vbTab & vbTab & decSubTotal & ControlChars.NewLine
  20. txtTotal.Text = decTotal
  21.  
  22. txtQuantity.Text = String.Empty
  23. txtPrice.Text = String.Empty
  24. comMaterials.Focus()
  25. End Sub
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty