public void Start() { bool repeat = true; do { Console.WriteLine("Welcome to Patrick's Peppers Application! We sell an assortment of sauces to spice up your life!"); Console.WriteLine("What would you like to do?"); Console.WriteLine("[0] View Products"); Console.WriteLine("[1] View as Manager"); Console.WriteLine("[2] Exit"); string input = Console.ReadLine(); switch (input) { case "0": submenu = Intro.GetMenu("ProductMenu"); submenu.Start(); break; case "1": submenu = Intro.GetMenu("InventoryMenu"); submenu.Start(); break; case "2": Console.WriteLine("Have a nice day!"); repeat = false; break; default: Console.WriteLine("Please enter a valid option"); break; } } while (repeat); }
public void Start() { bool repeat = true; do { Console.WriteLine("Welcome back Manager! What would you like to do?"); Console.WriteLine("[0] View Inventory"); Console.WriteLine("[1] View Customers"); Console.WriteLine("[2] Exit"); string input = Console.ReadLine(); switch (input) { case "0": // int prods = FindProduct(); submenu = Intro.GetMenu("InventoryMenu"); submenu.Start(); break; case "1": submenu = Intro.GetMenu("CustomerMenu"); submenu.Start(); break; case "2": repeat = false; break; default: Console.WriteLine("Please enter a valid option"); break; } } while (repeat); }
public static void Main(string[] args) { Log.Logger = new LoggerConfiguration() .MinimumLevel.Debug() .WriteTo.File("log.txt") .CreateLogger(); Intro.GetMenu("HomeScreen").Start(); }