Please create the following pizza order form. My form images are not needed but
ID: 3760694 • Letter: P
Question
Please create the following pizza order form. My form images are not needed but I can supply them for you. Please be creative with your form. Pizza Order Form Calculate Order Total Clear Order When the Calculate Order Total button has been clicked, do the following: Verify that the Customer Name and Phone Number are not blank. Display an appropriate message if either textbox is empty and place the cursor in the appropriate textbox. Verify that at least one Pizza Choice has been made. If none of the checkboxes have been checked, display an appropriate message. If a checkbox is checked, verify that a Quantity for that candy has been made. The Quantity must be greater than O and numeric. If all data is correct, multiply the Quantity by the Price and display the Total in the appropriate textbox. Calculate the Total Order by adding together the Total Price for each type of pizza. When the Clear Order button has been clicked, clear the form, except for the Unit Price.Explanation / Answer
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = "" Then
MsgBox("Customer not entered")
TextBox1.Focus()
End If
If TextBox2.Text = "" Then
MsgBox("Phone number not entered")
TextBox2.Focus()
End If
If CheckedListBox1.SelectedItem = "" Then
MsgBox("Pl. select ant Item")
End If
If CheckedListBox1.SelectedItem = "Big Italy" Then
If TextBox3.Text <= 0 Then
MsgBox("Enter quantity")
End If
End If
If CheckedListBox1.SelectedItem = "Meat Lover" Then
If TextBox4.Text <= 0 Then
MsgBox("Enter quantity")
End If
End If
If CheckedListBox1.SelectedItem = "Veggie Lover" Then
If TextBox5.Text <= 0 Then
MsgBox("Enter quantity")
End If
End If
TextBox11.Text = Val(TextBox3.Text) * Val(TextBox8.Text)
TextBox10.Text = Val(TextBox4.Text) * Val(TextBox7.Text)
TextBox9.Text = Val(TextBox5.Text) * Val(TextBox6.Text)
TextBox12.Text = Val(TextBox10.Text) + Val(TextBox11.Text) + Val(TextBox9.Text)
End Sub
Private Sub CheckedListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckedListBox1.SelectedIndexChanged
If CheckedListBox1.SelectedItem = "Big Italy" Then
TextBox8.Text = 12.0
End If
If CheckedListBox1.SelectedItem = "Meat Lover" Then
TextBox7.Text = 10.0
End If
If CheckedListBox1.SelectedItem = "Veggie Lover" Then
TextBox6.Text = 9.5
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TextBox1.Clear()
TextBox2.Clear()
TextBox3.Clear()
TextBox4.Clear()
TextBox5.Clear()
TextBox9.Clear()
TextBox10.Clear()
TextBox11.Clear()
TextBox12.Clear()
End Sub
End Class
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.