Пример #1
0
        private static void AdminView(User user)
        {
            bool     runLoop = true;
            MainMenu state   = MainMenu.Stores;

            while (runLoop)
            {
                switch (state)
                {
                case MainMenu.Stores:
                    state = SelectTheStore(user);
                    break;

                case MainMenu.StoresOptions:
                    state = SelectAdminStoreOption();
                    break;

                case MainMenu.AdminViewOrders:
                    AdminViewUserOrders(user);
                    state = MainMenu.StoresOptions;
                    break;

                case MainMenu.AdminViewSales:
                    _sql.PrintSalesByStore(user.SelectedStore);
                    state = MainMenu.StoresOptions;
                    break;

                default:
                    runLoop = false;
                    break;
                }
            }
        }