Beispiel #1
0
        public void Start()
        {
            Boolean stay = true;

            do
            {
                Console.Clear();
                Console.WriteLine(MenuPrint);
                Console.WriteLine("Enter a #, 'Back' or 'Exit': ");
                string userInput = Console.ReadLine();

                IMenu menu;
                switch (userInput)
                {
                case "1":
                    menu = new CustomerCartMenu(_user);
                    menu.Start();
                    break;

                case "2":
                    Console.Clear();
                    GetCustomerOrderHistory();
                    Console.ReadLine();
                    break;

                case "3":
                    GetLocations();
                    Console.Write("Choose Location Name:\t");
                    string userLocation = Console.ReadLine();
                    _location = _locationBL.GetLocationByName(userLocation);
                    menu      = new CustomerLocationMenu(_user, _customerBL, _location, _locationBL, _productBL, _inventoryLineItemsBL, _customerCartBL, _customerOrderLineItem, _customerOrderHistory);
                    menu.Start();
                    break;

                case "Back":
                    stay = false;
                    break;

                case "Exit":
                    System.Environment.Exit(1);
                    break;

                default:
                    Console.Clear();
                    Console.WriteLine("Invalid input! Please select a menu item");
                    Console.WriteLine("Press Enter to view menu");
                    Console.ReadLine();
                    break;
                }
            } while (stay);
        }
        public void Start()
        {
            Boolean stay = true;

            do
            {
                Console.Clear();
                Console.WriteLine("Customer Cart");

                /*foreach(var item in _user.CustCart) {
                 *  Console.WriteLine(item);
                 * }*/
                Console.WriteLine(MenuPrint);
                Console.WriteLine("Enter a #, 'Back' or 'Exit': ");
                string userInput = Console.ReadLine();

                IMenu menu;
                switch (userInput)
                {
                case "0":

                    break;

                case "1":
                    menu = new CustomerCartMenu(_user);
                    menu.Start();
                    break;

                /*case "2":
                 *  Console.Clear();
                 *  GetCustomers();
                 *  break;*/
                case "Back":
                    stay = false;
                    break;

                case "Exit":
                    System.Environment.Exit(1);
                    break;

                default:
                    Console.Clear();
                    Console.WriteLine("Invalid input! Please select a menu item");
                    Console.WriteLine("Press Enter to view menu");
                    Console.ReadLine();
                    break;
                }
            } while (stay);
        }