Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.89 KB | None | 0 0
  1. If AllowanceTxtBox.Text <> "" Then
  2.                 Try
  3.                     Integer.Parse(AllowanceTxtBox.Text)
  4.                 Catch AllowanceError As Exception
  5.                     MessageBox.Show("You didn't input numbers for the allowance price!", "Data Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
  6.                     AllowanceTxtBox.Focus()
  7.                     AllowanceTxtBox.SelectAll()
  8.                 End Try
  9.             Else
  10.                 AllowanceTxtBox.Text = "0"
  11.             End If
  12.             AmountDueTxtBox.Text = FormatCurrency(CStr(CDbl(TotalTxtBox.Text) - CDbl(AllowanceTxtBox.Text)))
  13.         Catch NumberProblem As Exception
  14.             MessageBox.Show("There was a problem with your numbers for the sales price.", "Data error", MessageBoxButtons.OK, MessageBoxIcon.Error)
  15.             SalesPriceTxtBox.Focus()
  16.             SalesPriceTxtBox.SelectAll()
  17.         End Try
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement