private void buttonB_Click(object sender, EventArgs e) { LinkOrders lo = new LinkOrders(); string quantity = comboBoxTea.Text.ToString(); double price = 0; string name = "Coffee "; if (radioButtond.Checked == true) { name += " (Small)"; price = 50; } if (radioButtone.Checked == true) { name += " (Medium)"; price = 90; } if (radioButtonf.Checked == true) { name += " (Large)"; price = 120; } lo.AddToBill(name, quantity, price); MessageBox.Show("Successfully Added: \n\n" + "Item Name: " + name + "\nQuantity: " + quantity + "\nPrice: " + price + "/each"); }
private void buttonC_Click(object sender, EventArgs e) { LinkOrders lo = new LinkOrders(); string quantity = comboBoxDrink.Text.ToString(); double price = 0; string name = "Drink"; if (radioButtong.Checked == true) { name += " (500 ml)"; price = 50; } if (radioButtonh.Checked == true) { name += " (1 Litre)"; price = 80; } if (radioButtoni.Checked == true) { name += " (1.5 )"; price = 120; } lo.AddToBill(name, quantity, price); MessageBox.Show("Successfully Added: \n\n" + "Item Name: " + name + "\nQuantity: " + quantity + "\nPrice: " + price + "/each"); }
private void arabian_Click(object sender, EventArgs e) { LinkOrders lo = new LinkOrders(); string quantity = comboBox3.Text.ToString(); double price = 0; string name = "Arabian Pizza "; if (radioButton7.Checked == true) { name += " (Small)"; price = 250; } if (radioButton8.Checked == true) { name += " (Medium)"; price = 450; } if (radioButton9.Checked == true) { name += " (Large)"; price = 900; } lo.AddToBill(name, quantity, price); MessageBox.Show("Successfully Added: \n\n" + "Item Name: " + name + "\nQuantity: " + quantity + "\nPrice: " + price + "/each"); }
private void button2_Click(object sender, EventArgs e) { LinkOrders lo = new LinkOrders(); string quantity = comboBox1.Text.ToString(); double price = 650; string name = "Midnight Deal "; lo.AddToBill(name, quantity, price); MessageBox.Show("Successfully Added: \n\n" + "Item Name: " + name + "\nQuantity: " + quantity + "\nPrice: " + price + "/each"); }
private void button2_Click(object sender, EventArgs e) { LinkOrders lo = new LinkOrders(); string quantity = SaladLarge.Text.ToString(); double price = 0; string name = " Salad "; if (checkBox2.Checked == true) { name += " (Large)"; price = 200; } lo.AddToBill(name, quantity, price); MessageBox.Show("Successfully Added: \n\n" + "Item Name: " + name + "\nQuantity: " + quantity + "\nPrice: " + price + "/each"); }