Newest Program:
a
‘
declare module level variables'
Dim
mAllCharges
,
mAllCredits
,
mCustomersOverCredit,
As Integer
‘
declare other variables'
Dim
decBeginningBalance, decTotalCharges, decTotalCredits, decCreditLimit
,
decEndingBalance,
decAvailableCredit
As Decimal
'Cant be blank'
If
txtAccountNumber.Text =
""
Then
MessageBox.Show(
"You must enter a value for account number"
)
‘
Beginning balance has to be a number, and not empty'
If
txtBeginningBalance.Text =
""
Then
If
IsNumeric(txtBeginningBalance.Text) =
False Then
'Total charges has to be a number, and positive (or 0), and not empty
If
txtTotalCharges.Text =
""
Then
If
IsNumeric(decTotalCharges) =
False Then
If
decTotalCharges < 0
Then
decTotalCharges =
CDec
(txtTotalCharges.Text)
'Total credits has to be positive or 0, a number, and not be blank"
If
txtTotalCredits.Text =
""
Then
If
IsNumeric(txtTotalCredits.Text) =
False Then
decTotalCredits =
CDec
(txtTotalCredits.Text)
If
decTotalCredits < 0
Then
'Credit Limit must be positive or 0, a number, and not be blank
If
txtCreditLimit.Text =
""
Then
If
IsNumeric(txtCreditLimit.Text) =
False Then
decTotalCredits =
CDec
(txtTotalCredits.Text)
If
decTotalCredits < 0
Then
'Calculate & display Ending Balance'
decEndingBalance = decBeginningBalance + decTotalCharges - decTotalCredits
lblEndingBalance.Text = decEndingBalance.ToString(
This is the end of the preview.
Sign up
to
access the rest of the document.
- Fall '08
- Mote
- #, ASCII, False False False, 1byte, 2-byte
-
Click to edit the document details