public static void ShowOrdersDueToPriceRange(ref RestarurantManager restarurantManager) { Console.WriteLine("Price:"); string priceStr = Console.ReadLine(); double price; while (!double.TryParse(priceStr, out price) || price < 0) { Console.WriteLine("Error! Write the Order price properly:"); priceStr = Console.ReadLine(); } Console.WriteLine("Price 2:"); string priceStr1 = Console.ReadLine(); double price1; while (!double.TryParse(priceStr1, out price1) || price1 < 0) { Console.WriteLine("Error! Write the Order price properly:"); priceStr1 = Console.ReadLine(); } try { restarurantManager.ShowAllOrders(restarurantManager.GetOrdersByPriceInterval(price, price1)); } catch (OrderItemDoesNotExist ex) { Console.WriteLine("Error:" + ex.Message); } }
public static void ShowOrdersDueToDate(ref RestarurantManager restarurantManager) { Console.WriteLine("Write the date #month/day/year#:"); DateTime date1 = Convert.ToDateTime(Console.ReadLine()); try { restarurantManager.ShowAllOrders(restarurantManager.GetOrderByDate(date1)); } catch (OrderDoesNotExist ex) { Console.WriteLine("Error:" + ex.Message); } }
public static void ShowAllOrders(ref RestarurantManager restarurantManager) { restarurantManager.ShowAllOrders(); }