private void createSalad(string i_Name) { if (severalDinerText.Text == "") { errorText.Text = "Several Diner Has Not Been Chosen Yet!"; } else if (quantityText.Text == "") { errorText.Text = "Quantity Has Not Been Chosen Yet!"; } else { Salad salad = InitializeFoods.InitializeSalad(i_Name, Int32.Parse(quantityText.Text), severalDinerText.Text); showSalad(salad); } }
private void createDrink(string i_Name, string i_Type) { if (severalDinerText.Text == "") { errorText.Text = "Several Diner Has Not Been Chosen Yet!"; } else if (quantityText.Text == "") { errorText.Text = "Quantity Has Not Been Chosen Yet!"; } else { Drink drink = InitializeFoods.InitializeDrink(i_Name, i_Type, Int32.Parse(quantityText.Text), severalDinerText.Text); showDrink(drink); } }
private void createDessert(string i_Name) { if (severalDinerText.Text == "") { errorText.Text = "Several Diner Has Not Been Chosen Yet!"; } else if (quantityText.Text == "") { errorText.Text = "Quantity Has Not Been Chosen Yet!"; } else { Dessert dessert = InitializeFoods.InitializeDessert(i_Name, Int32.Parse(quantityText.Text), severalDinerText.Text); showDessert(dessert); } }
//private void waterButton_Click(object sender, EventArgs e) //{ // createMainDish("Water", "Soft"); //} //private void appleButton_Click(object sender, EventArgs e) //{ // createMainDish("Apple", "Soft"); //} //private void orangeButton_Click(object sender, EventArgs e) //{ // createMainDish("Orange", "Soft"); //} private void createMainDish(string i_Name) { if (severalDinerText.Text == "") { errorText.Text = "Several Diner Has Not Been Chosen Yet!"; } else if (quantityText.Text == "") { errorText.Text = "Quantity Has Not Been Chosen Yet!"; } else { MainDish mainDish = InitializeFoods.InitializeMainDish(i_Name, Int32.Parse(quantityText.Text), severalDinerText.Text); showMainDish(mainDish); } }
private void createAppetizer(string i_Name) { if (severalDinerText.Text == "") { errorText.Text = "Several Diner Has Not Been Chosen Yet!"; } else if (quantityText.Text == "") { errorText.Text = "Quantity Has Not Been Chosen Yet!"; } else { Appetizer appetizer = InitializeFoods.InitializeAppetizer(i_Name, Int32.Parse(quantityText.Text), severalDinerText.Text); showAppetizer(appetizer); } }
private void createHamburger(string i_Size) { if (severalDinerText.Text == "") { errorText.Text = "Several Diner Has Not Been Chosen Yet!"; } else if (quantityText.Text == "") { errorText.Text = "Quantity Has Not Been Chosen Yet!"; } else if (hamburgersTypesTextBox.Text == "") { errorText.Text = "Hamburger Type Has Not Been Chosen Yet!"; } else { Hamburger hamburger = InitializeFoods.Initialize_Hamburger(hamburgersTypesTextBox.Text, i_Size, Int32.Parse(quantityText.Text), severalDinerText.Text); showHamburger(hamburger); } }