CHSHT - Newest Program: adeclare module level variables'...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
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(
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/29/2010 for the course MIS 304 taught by Professor Mote during the Fall '08 term at University of Texas at Austin.

Ask a homework question - tutors are online