Example #1
0
 private static void InitializeLists()
 {
     RestroMcD.SetMenuItems();
     RestroMcD.SetTables();
     RestroPizzaHut.SetMenuItems();
     RestroPizzaHut.SetTables();
 }
Example #2
0
        public static void Start(AdminClass admin)
        {
            IRestro restro = null;

            Console.WriteLine("Select a Restaurant");
            Console.WriteLine("1. McD \n2.Pizza Hut");
            var choice = Convert.ToInt16(Console.ReadLine());

            switch (choice)
            {
            case 1:
                restro = new RestroMcD();
                ChooseYourRole(restro, admin);
                break;

            case 2:
                restro = new RestroPizzaHut();
                ChooseYourRole(restro, admin);
                break;
            }
        }
Example #3
0
        public void ShowFunctionalityOfAdmin(AdminClass admin)
        {
ShowFunctionalityOfAdmin:
            Console.WriteLine("1. Customer List\n2. Show All Tables \n3. Show Menu List\n4. Exit");
            Console.WriteLine("\n Choose an Option: \n");
            var choice = Convert.ToInt16(Console.ReadLine());

            switch (choice)
            {
            case 1:
                GetCustomerInformation(admin);
                break;

            case 2:
                Console.WriteLine("1. McD\n2. Pizza Hut");
                var option2 = Convert.ToInt16(Console.ReadLine());
                if (option2 == 1)
                {
                    RestroMcD.ShowAllTheTablesInRestro();
                }
                else if (option2 == 2)
                {
                    RestroPizzaHut.ShowAllTheTablesInRestro();
                }
                break;

            case 3:
                Console.WriteLine("1. McD\n2. Pizza Hut");
                var option3 = Convert.ToInt16(Console.ReadLine());
                if (option3 == 1)
                {
                    RestroMcD.ShowAllTheItemsInRestro();
                }
                else if (option3 == 2)
                {
                    RestroPizzaHut.ShowAllTheItemsInRestro();
                }
                break;

            case 4:
                Environment.Exit(0);
                break;

            default:
                Console.WriteLine("\nSelect appropriate Option\n");
                ShowFunctionalityOfAdmin(admin);
                break;
            }
askAgain:
            Console.WriteLine("Do you want to continue \n1. Yes\n2.No");
            var option = Convert.ToInt16(Console.ReadLine());

            if (option == 1)
            {
                goto ShowFunctionalityOfAdmin;
            }
            else if (option == 2)
            {
                Environment.Exit(0);
            }
            else
            {
                Console.WriteLine("Invalid Option");
                goto askAgain;
            }
        }