All pastes #464594 Raw Edit

Mine

public text v1 · immutable
#464594 ·published 2007-04-29 16:33 UTC
rendered paste body
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        
        Dim servicecharge As Integer

        ' Declare the value of service charge
        servicecharge = 10


        ' 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
            Label3.Text = Label3.Text - TextBox1.Text
        ElseIf TextBox1.Text > Label3.Text 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

    End Sub