I have tried to add cost to pizza ordering system for a school assessment and i keeps failing I think i am putting it in the wrong place i have to add all the pizzas to together a regular pizzas is $8.50 and gourmet pizzas are 13.50 also if the customer chooses delivery the will be charged $3.00. Also if any one knows how i could put a array in to my program that we be helpful and i will be highly grateful. Here is my code with out any cost.
Code for delivery
Public Class delivery
Private Sub delivery_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'customer picks pizzas'
'declareing variables"
Dim regular_pizzas() As String = {"Hawaiian", "chesse", "Mushroom and Cheese", "Pepperoni", "Beef & Onion", "Ham & Cheese", "Classic Italian"}
Dim gourmet_pizzas() As String = {"Meat Lovers", "Super Supreme", "Beef Italiano", "Hot n Spicy", "BBQ Bacon", "Spicy Apricot", "Satay Chicken"}
ListBox1.Items.AddRange(regular_pizzas)
ListBox1.Items.AddRange(gourmet_pizzas)
Label3.Text = form1.customers_name
Label4.Text = form1.customers_address
Label5.Text = form1.customers_phone_number
End Sub
'customer can add pizza'
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ListBox2.Items.Add(ListBox1.Text)
ListBox2.SelectedIndex = ListBox2.SelectedIndex + 1
End Sub
'customer can remove a pizza'
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
ListBox2.Items.Remove(ListBox2.Text)
End Sub
'customer can remove all pizzas"
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
ListBox2.Items.Clear()
End Sub
'customer can only pick 5 pizzas'
Private Sub ListBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox2.SelectedIndexChanged
Dim numofpizzas As Integer
numofpizzas = ListBox2.Items.Count
If numofpizzas > 5 Then
MsgBox("Needs to be less then 5")
ListBox2.Items.Remove(ListBox2.Text)
End If
End Sub
End Class
it is the same for pick up at the moment.
Thank you
Jacoblowry96
Code for delivery
Public Class delivery
Private Sub delivery_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'customer picks pizzas'
'declareing variables"
Dim regular_pizzas() As String = {"Hawaiian", "chesse", "Mushroom and Cheese", "Pepperoni", "Beef & Onion", "Ham & Cheese", "Classic Italian"}
Dim gourmet_pizzas() As String = {"Meat Lovers", "Super Supreme", "Beef Italiano", "Hot n Spicy", "BBQ Bacon", "Spicy Apricot", "Satay Chicken"}
ListBox1.Items.AddRange(regular_pizzas)
ListBox1.Items.AddRange(gourmet_pizzas)
Label3.Text = form1.customers_name
Label4.Text = form1.customers_address
Label5.Text = form1.customers_phone_number
End Sub
'customer can add pizza'
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ListBox2.Items.Add(ListBox1.Text)
ListBox2.SelectedIndex = ListBox2.SelectedIndex + 1
End Sub
'customer can remove a pizza'
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
ListBox2.Items.Remove(ListBox2.Text)
End Sub
'customer can remove all pizzas"
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
ListBox2.Items.Clear()
End Sub
'customer can only pick 5 pizzas'
Private Sub ListBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox2.SelectedIndexChanged
Dim numofpizzas As Integer
numofpizzas = ListBox2.Items.Count
If numofpizzas > 5 Then
MsgBox("Needs to be less then 5")
ListBox2.Items.Remove(ListBox2.Text)
End If
End Sub
End Class
it is the same for pick up at the moment.
Thank you
Jacoblowry96