public static void CatererNavigation() { //navigation system for the caterer with all its options. Console.WriteLine("\nPlease pick a option.\n[1] Adjust / look at the menu.\n[2] Look at all orders.\n[3] Look at the expected amount of customers.\n[0] Exit application."); int choice = Program.ChoiceInput(0, 3); while (choice != 0) { if (choice == 1) { //adjust menu FoodMenu.Caterer(); } else if (choice == 2) { //Look at all orders CatererFoodOrder.Caterer(); } else if (choice == 3) { //look at expected customers expected.ExpectedCustomers(); } Console.WriteLine("\nPlease pick a option.\n[1] Adjust / look at the menu.\n[2] Look at all orders.\n[3] Look at the expected amount of customers.\n[0] Exit application."); choice = Program.ChoiceInput(0, 3); } }
public static void jsonFoodMain() { string fileName = "food.json"; string rawJson = File.ReadAllText(@fileName); List <Food> menu = JsonConvert.DeserializeObject <List <Food> >(rawJson); string newJson = JsonConvert.SerializeObject(menu); FoodMenu.Caterer(); File.WriteAllText(fileName, newJson); }