0
Option Strict On
Public Class Form1


    Private Sub btnCalculate_Click(sender As System.Object, e As System.EventArgs) Handles btnCalculate.Click
        Dim strType As String
        Dim intYellow As Integer
        Dim intBlue As Integer
        Dim Price As Double


        strType = txtType.Text
        Integer.TryParse(txtYellow.Text, intYellow)
        Integer.TryParse(txtBlue.Text, intBlue)
        If strType.ToUpper = "R" Then
            If intYellow >= 1 AndAlso intYellow <= 5 Then
                Price = 10.0
            End If
            If intBlue >= 1 AndAlso intBlue <= 5 Then
                Price = 70.0
            End If
            If intYellow >= 6 AndAlso intYellow <= 10 Then
                Price = 30.0

            End If
            If intBlue >= 6 AndAlso intBlue <= 10 Then
                Price = 60.0
            End If
            If intYellow >= 11 Then
                Price = 20.0
            End If
            If intBlue >= 11 Then
                Price = 50.0
            End If
        End If
        If strType.ToUpper = "W" Then
            If intYellow >= 1 AndAlso intYellow <= 5 Then
                Price = 40.0
            End If
            If intBlue >= 1 AndAlso intBlue <= 5 Then
                Price = 50.0
            End If
            If intYellow >= 6 AndAlso intYellow <= 10 Then
                Price = 30.0
            End If
            If intBlue >= 6 AndAlso intBlue <= 10 Then
                Price = 40.0
            End If
            If intYellow >= 11 Then
                Price = 20.0
            End If
            If intBlue >= 11 Then
                Price = 30.0
            End If
        End If
        lblTotalCost.Text = FormatCurrency((intYellow * Price) + (intBlue * Price)).ToString
    End Sub

    Private Sub btnDisplay_Click(sender As System.Object, e As System.EventArgs) Handles btnDisplay.Click
        gbList.Text = "Retail Pricing" & vbNewLine & "1-5 Yellow skateboards $60.00" & vbNewLine & "6-10 Yellow skateboards $50.00" & vbNewLine & "11 or more Yellow Skateboards $40.00" & vbNewLine & "1-5 blue skateboards $70.00" & vbNewLine & "6-10 blue skateboards $60.00" & vbNewLine & "11 or more blue skateboards $50.00" & vbNewLine & vbNewLine & "Wholesale Pricing" & vbNewLine & "1-5 Yellow skateboards $40.00" & vbNewLine & "6-10 Yellow skateboards $30.00 " & vbNewLine & "11 or more yellow skateboards $20.00" & vbNewLine & "1-5 Blue Skateboards $50.00" & vbNewLine & "6-10 blue skateboards  $50.00" & vbNewLine & "11 or more blue skateboards $30.00"

    End Sub
End Class

This need to be done. Please help.
1. Options strict must be on.
2.If the customer type entered (Must Use a Textbox control) by the user is incorrect then
an appopriate error message should be displayed and the focus should be sent to the incorrect
entry. The ToUpper method must be used to avoid any case sensitive problems.
3. The Quantity entry should only accepts digits, any other character entry should be ignored from the keyboard buffer.
4. When the form is loaded a user name should be prompted. Any time there is an entry error
the error message should include the user's name in the prompt message.
5. The pricing information should be contained within another Groupbox control. A user should have the ability of clicking a button to view the pricing information and clicking the same button to remove the pricing information from the form.

2
Contributors
1
Reply
3
Views
5 Years
Discussion Span
Last Post by G_Waddell
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.