Esempio n. 1
0
        public void Menu()
        {
            PrintWelcome();
            bool quit = false;

            while (!quit)
            {
                PrintMainMenu();
                var key = Console.ReadLine();
                Console.WriteLine();

                switch (key.ToUpper())
                {
                case ("1"):
                    CustomerMenu.Menu();
                    break;

                case "2":
                    ProductMenu.Menu();
                    break;

                case "Q":
                case "C":
                    quit = true;
                    break;
                }
            }
        }
Esempio n. 2
0
        public MainMenu(bool useLocalDB)
        {
            if (useLocalDB)
            {
                _db = new DatabaseManager();
            }
            else
            {
                _db = CreateAzureDBConnection();
            }

            CustomerMenu = new CustomerMenu(_db, this);
            ProductMenu  = new ProductMenu(_db, this);
            CategoryMenu = new CategoryMenu(_db, this);
        }