Beispiel #1
0
        public void managerMainMenu()
        {
            int input = 0;



            Console.WriteLine("                                                                         ");
            Console.WriteLine("                                                                         ");
            Console.WriteLine("                                                                         ");
            Console.WriteLine("       +================================================================+");
            Console.WriteLine("       |                                                                |");
            Console.WriteLine("       |                        MANAGER  lOGIN                          |");
            Console.WriteLine("       |                                                                |");
            Console.WriteLine("       +================================================================+");
            Console.WriteLine("       +----------------------------------------------------------------+");
            Console.WriteLine("       |                    [1] LOGIN                                   |");
            Console.WriteLine("       +----------------------------------------------------------------+");
            Console.WriteLine("       +----------------------------------------------------------------+");
            Console.WriteLine("       |                    [2] ADD INVENTORY                           |");
            Console.WriteLine("       +----------------------------------------------------------------+");
            Console.WriteLine("       +----------------------------------------------------------------+");
            Console.WriteLine("       |                    [3] REMOVE INVENTORY                        |");
            Console.WriteLine("       +----------------------------------------------------------------+");
            Console.WriteLine("       +----------------------------------------------------------------+");
            Console.WriteLine("       |                    [4]                                         |");
            Console.WriteLine("       +----------------------------------------------------------------+");
            Console.WriteLine("       +----------------------------------------------------------------+");
            Console.WriteLine("       |                    [5]                                         |");
            Console.WriteLine("       +----------------------------------------------------------------+");



            input = Int32.Parse(Console.ReadLine());

            switch (input)
            {
            case 1:
                Console.Clear();
                var productsMenu = new ProductsMenu();
                productsMenu.viewProductMenu();
                break;

            case 2:
                Console.Clear();
                var ordersMenu = new OrdersMenu();
                ordersMenu.viewOrdersMenu();
                break;

            case 3:
                Console.Clear();
                var customersMenu = new CustomersMenu();
                customersMenu.viewCustomersMenu();
                break;

            case 4:
                Console.Clear();
                var locationsMenu = new LocationsMenu();
                locationsMenu.viewLocationsMenu();
                break;

            case 5:
                Console.Clear();
                var cartsMenu = new CartsMenu();
                cartsMenu.viewCartMenu();
                break;

            default:
                var mainMenu = new MainMenu();
                mainMenu.viewMainMenu();
                break;
            }
        }
        public void viewCartMenu()
        {
            var cartmenu = new CartsMenu();
            var mainMenu = new MainMenu();
            int input    = 0;

            Console.WriteLine("                                                                         ");
            Console.WriteLine("                                                                         ");
            Console.WriteLine("                                                                         ");
            Console.WriteLine("       +================================================================+");
            Console.WriteLine("       |                                                                |");
            Console.WriteLine("       |                         SHOPPING CART MENU                     |");
            Console.WriteLine("       |                                                                |");
            Console.WriteLine("       +================================================================+");
            Console.WriteLine("       +----------------------------------------------------------------+");
            Console.WriteLine("       |                    [1] VIEW ORDERS MENU                        |");
            Console.WriteLine("       +----------------------------------------------------------------+");
            Console.WriteLine("       +----------------------------------------------------------------+");
            Console.WriteLine("       |                    [2] ADD AN ORDER                            |");
            Console.WriteLine("       +----------------------------------------------------------------+");
            Console.WriteLine("       +----------------------------------------------------------------+");
            Console.WriteLine("       |                    [3] VIEW ORDERS HISTORY                     |");
            Console.WriteLine("       +----------------------------------------------------------------+");
            Console.WriteLine("       +----------------------------------------------------------------+");
            Console.WriteLine("       |                    [4] DELETE AN ORDER                         |");
            Console.WriteLine("       +----------------------------------------------------------------+");
            Console.WriteLine("                                                                         ");
            Console.WriteLine("                                                                         ");
            Console.WriteLine("                                                                         ");
            Console.WriteLine("       +----------------------------------------------------------------+");
            Console.WriteLine("       |                    [5] RETURN TO MAIN MENU                     |");
            Console.WriteLine("       +----------------------------------------------------------------+");



            input = Int32.Parse(Console.ReadLine());
            var cart     = new CartsLogic();
            var products = new ProductsLogic();


            switch (input)
            {
            case 1:

                break;

            case 2:

                Console.Clear();

                Console.WriteLine("       +----------------------------------------------------------------+");
                Console.WriteLine("       |                        ADD TO SHOPPING CART                    |");
                Console.WriteLine("       +----------------------------------------------------------------+");
                products.GetProducts();
                cart.Add();
                cart.Add();
                mainMenu.viewMainMenu();

                break;

            case 3:
                // products.GetProducts();
                cart.GetInventoryByCartOrderID();

                cartmenu.viewCartMenu();

                mainMenu.viewMainMenu();



                break;

            case 4:
                Console.Clear();

                Console.WriteLine("       +----------------------------------------------------------------+");
                Console.WriteLine("       |                   DELETE A ORDER FROM INVENTORY                |");
                Console.WriteLine("       +----------------------------------------------------------------+");

                cart.Delete();
                break;


            case 5:


                Console.Clear();

                Console.WriteLine("       +----------------------------------------------------------------+");
                Console.WriteLine("       |                        CREATE AN ORDER                         |");
                Console.WriteLine("       +----------------------------------------------------------------+");
                Console.WriteLine("        Choose an item to add to cart");

                // products.GetProducts();
                cart.GetInventoryByCartOrderID();

                cartmenu.viewCartMenu();

                mainMenu.viewMainMenu();
                break;


            default:

                Console.Clear();
                var mainmenu = new MainMenu();
                mainmenu.viewMainMenu();
                break;
            }
        }
        public void viewMainMenu()
        {
            int input = 0;



            Console.WriteLine("                                                                         ");
            Console.WriteLine("                                                                         ");
            Console.WriteLine("                                                                         ");
            Console.WriteLine("       +================================================================+");
            Console.WriteLine("       |                                                                |");
            Console.WriteLine("       |            Welcome to 'Couch Potato Cart' Grocery Store        |");
            Console.WriteLine("       |                                                                |");
            Console.WriteLine("       +================================================================+");
            Console.WriteLine("       +----------------------------------------------------------------+");
            Console.WriteLine("       |                    [1] GO TO PRODUCT CATALOG                   |");
            Console.WriteLine("       +----------------------------------------------------------------+");
            Console.WriteLine("       +----------------------------------------------------------------+");
            Console.WriteLine("       |                    [2] CREATE AN ORDER                         |");
            Console.WriteLine("       +----------------------------------------------------------------+");
            Console.WriteLine("       +----------------------------------------------------------------+");
            Console.WriteLine("       |                    [3] SIGN UP                                 |");
            Console.WriteLine("       +----------------------------------------------------------------+");
            Console.WriteLine("       +----------------------------------------------------------------+");
            Console.WriteLine("       |                    [4] FIND A LOCATION                         |");
            Console.WriteLine("       +----------------------------------------------------------------+");
            Console.WriteLine("       +----------------------------------------------------------------+");
            Console.WriteLine("       |                    [5] VIEW SHOPPING CART                      |");
            Console.WriteLine("       +----------------------------------------------------------------+");



            input = Int32.Parse(Console.ReadLine());

            switch (input)
            {
            case 1:
                Console.Clear();
                var productsMenu = new ProductsMenu();
                productsMenu.viewProductMenu();
                break;

            case 2:
                Console.Clear();
                var ordersMenu = new OrdersMenu();
                ordersMenu.viewOrdersMenu();
                break;

            case 3:
                Console.Clear();
                var customersMenu = new CustomersMenu();
                customersMenu.viewCustomersMenu();
                break;

            case 4:
                Console.Clear();
                var locationsMenu = new LocationsMenu();
                locationsMenu.viewLocationsMenu();
                break;

            case 5:
                Console.Clear();
                var cartsMenu = new CartsMenu();
                cartsMenu.viewCartMenu();
                break;

            default:
                var mainMenu = new MainMenu();
                mainMenu.viewMainMenu();
                break;
            }
        }