All pastes #465306 Raw Edit

Something

public text v1 · immutable
#465306 ·published 2007-04-30 01:52 UTC
rendered paste body
Dim servicecharge As Integer
        Dim transaction As Integer
        Dim Balance As Integer


        ' Declare the value of service charge
        servicecharge = 10
        transaction = TextBox1.Text
        Balance = Label3.Text

        ' Deposit Funds to the account
        If RadioButton1.Checked = True Then
            Label3.Text = TextBox1.Text
        End If
        ' Process a cheque through the account, confirming sufficient funds, If returned NSF the account
        ' will not be deducted the amount of the cheque, but will be charged 10 dollars.
        If RadioButton2.Checked = True Then
            Balance = Balance - transaction
        ElseIf transaction > Balance Then

            MessageBox.Show("Insufficient Funds")
            Label3.Text = Label3.Text - servicecharge
        End If
        ' Service charge processed on the account.
        If RadioButton3.Checked = True Then
            Label3.Text = Label3.Text - servicecharge
        End If