public bool KassaMenu() { string[] options = new string[] { "Add a new ingredient", "Order an ingredient", "View a list of all ingredient", "Create a new pizza", "View a list of all pizzas", "Make a new order", "Show orders", "Quit" }; int input = UserIO.Menu(options, AppConstands.Title); switch (input) { case 0: Console.Clear(); Ingredient_Manager.CreateNewIngredient(); Console.ReadLine(); return(true); case 1: Console.Clear(); Ingredient_Manager.OrderIngredient(); Console.ReadLine(); return(true); case 2: Console.Clear(); Ingredient_Manager.ShowAllIngredients(); Console.ReadLine(); return(true); case 3: Console.Clear(); Pizza_Manager.CreateNewPizza(); Console.ReadLine(); return(true); case 4: Pizza_Manager.ShowAllPizzas(); return(true); case 5: Console.Clear(); Order_Manager.MakeOrder(); Console.ReadLine(); return(true); case 6: Order_Manager.ShowOrders(); //Order_Manager.DisplayOrderList(); return(true); case 7: //quit return(false); default: Console.WriteLine("Give a vallid input plz!"); Console.ReadLine(); return(true); } }
private void GetUserInput(Order newOrder) { int[] item = new int[4]; Pizza_Manager.ShowPizzaList(); Console.WriteLine(); Console.WriteLine("Select id to add to order"); int id = UserIO.GetUserInt(0, Pizza_Manager.GlobalPizzas.Count - 1); item[0] = id; Console.Clear(); ShowCart(newOrder); Pizza_Manager.ShowOnePizza(id); Console.WriteLine(); UserIO.PrintBlue("---------------------------------------------------------------------"); Console.WriteLine(); Console.WriteLine("Select the size: Small = 1 | Medium = 2 | Large = 3"); int size = UserIO.GetUserInt(1, 3); item[1] = size; Console.WriteLine("Select Crust: PanCrust = 1 | DeepCrust = 2 | CheeseCrust = 3"); int crust = UserIO.GetUserInt(1, 3); item[2] = crust; Console.WriteLine("How many of these?"); int quantity = UserIO.GetUserInt(1, 50); item[3] = quantity; newOrder.Items.Add(item); newOrder.ItemsArray = newOrder.Items.ToArray(); }