I can get everything but the 40% working what am I doing wrong?
Protected Sub Button3_Click(sender As Object, e As System.EventArgs) Handles Button3.Click
Dim Customertype As Char = "R"
Dim Customertypetwo As Char = "C"
Dim Customertypethree As Char
Dim Customertypeone As Char = (TextBox1.Text)
Dim decSubtotalone As Decimal = 100D - 249.99D
Dim Subtotal As Decimal
Dim decDiscount As Decimal = 0.1D
Dim decDiscountTwo As Decimal = 0.2D
Dim decDiscountThree As Decimal = 0.25D
Dim decDiscountFour As Decimal = 0.4D
Dim decDiscountFive As Decimal = 0.3D
Dim decDiscountAmount As Decimal
Dim InputError As Boolean = False
Try
Customertypethree = Convert.ToChar(Me.TextBox1.Text)
Catch ex As Exception
MsgBox("Please enter Customer Type")
End Try
Try
Subtotal = Convert.ToDecimal(Me.TextBox2.Text)
Catch ex As FormatException
MsgBox("Please enter Subtotal")
End Try
If Customertype = Me.TextBox1.Text Then
If Subtotal < 249.99 Then
decDiscountAmount = Subtotal * decDiscount
Me.Label1.Text = "10%"
Me.Label2.Text = decDiscountAmount.ToString("C")
Me.Label3.Text = "$" & Subtotal - decDiscountAmount.ToString("C")
End If
Dear customer, Unfortunately, your question requires a lot of work and cannot be done for free. Please submit it with all requirements as an assignment to our control panel and we'll assist you.
Comments
Leave a comment