private void BookTable() { BookTable: TableModel table = restro.BookTable(restro.ShowTables()); if (table != null) { TableAlloted = table; } else { goto BookTable; } }
private void ProceedAsPerTheChoice(Customer customer, AdminClass admin, IRestro restro, int choice) { int ans; switch (choice) { case 1: restro.ShowTables(); break; case 2: restro.ShowItems(); break; case 3: restro.PlaceOrder(admin, customer); break; case 4: Environment.Exit(0); break; default: Console.WriteLine("Invalid Option"); break; } askAgain: Console.WriteLine("Do you want to continue:\n1. Yes\n2. No"); ans = Convert.ToInt16(Console.ReadLine()); if (ans == 1) { Program.Start(admin); } else if (ans == 2) { Environment.Exit(0); } else { Console.WriteLine("Invalid Option"); goto askAgain; } }