예제 #1
0
        public void RunInterface()
        {
            files.LoadCateringItems(this.catering);

            bool done = false;

            while (!done)
            {
                Console.WriteLine("Please select an option from the menu below");
                Console.WriteLine("(1) Display Catering Items");
                Console.WriteLine("(2) Order");
                Console.WriteLine("(3) Quit");

                string choiceMainMenu = Console.ReadLine();

                switch (choiceMainMenu)
                {
                case "1":
                    this.DisplayCateringItems();
                    break;

                case "2":
                    this.PurchasingMenu();
                    break;

                case "3":
                    done = true;
                    break;
                }
            }
        }
예제 #2
0
        /// <summary>
        /// Runs interface
        /// </summary>
        public void RunInterface()
        {
            files.LoadCateringItems(this.catering); //Calls the method to load csv into catering items

            bool done = false;

            while (!done)
            {
                Console.WriteLine();
                Console.WriteLine("This is the Catering System User Interface");
                Console.WriteLine();
                Console.WriteLine("(1) Display Catering Items");
                Console.WriteLine();
                Console.WriteLine("(2) Order");
                Console.WriteLine();
                Console.WriteLine("(3) Quit");
                string choice = Console.ReadLine();

                switch (choice)
                {
                case "1":
                    this.DisplayCateringItems();
                    break;

                case "2":
                    this.OrderItems();
                    break;

                case "3":
                    done = true;
                    break;

                default:
                    Console.WriteLine("Please choose a number between 1 and 3.");
                    break;
                }
            }
        }