Exemplo n.º 1
0
        public void Start()
        {
            Console.WriteLine("Are you an new customer or returning customer?");

            bool repeat = true;

            do
            {
                Console.WriteLine("[0] New Customer");
                Console.WriteLine("[1] Returning Customer");
                string userInput = Console.ReadLine();
                switch (userInput)
                {
                case "0":
                {
                    menu   = MenuFactory.GetMenu("customer");
                    repeat = false;
                    break;
                }

                case "1":
                {
                    menu   = MenuFactory.GetMenu("customer");
                    repeat = false;
                    break;
                }

                case "927":
                    menu   = MenuFactory.GetMenu("admin");
                    repeat = false;
                    break;

                default:
                {
                    Console.WriteLine("Invalid Entry");
                    break;
                }
                }
            }while(repeat);
            menu.Start();
        }
Exemplo n.º 2
0
        public void Start()
        {
            bool repeat = true;

            do
            {
                Console.WriteLine("Welcome to Happy Lemon Store App");
                Console.WriteLine("[0] Exit the program");
                Console.WriteLine("[1] Customer Sign In");
                Console.WriteLine("[2] New Customer Sign Up");
                Console.WriteLine("[3] Employee Sign In");
                string input = Console.ReadLine();
                switch (input)
                {
                case "0":
                    Console.WriteLine("Thanks for using the system. Goodbye");
                    repeat = false;
                    break;

                case "1":
                    _submenu = MenuFactory.GetMenu("order");
                    _submenu.Start();
                    break;

                case "2":
                    _submenu = MenuFactory.GetMenu("customer");
                    _submenu.Start();
                    break;

                case "3":
                    _submenu = MenuFactory.GetMenu("branch");
                    _submenu.Start();
                    break;

                default:
                    Console.WriteLine("Invalid Input");
                    break;
                }
            } while (repeat);
        }
Exemplo n.º 3
0
        public void Start()
        {
            bool repeat = true;

            Console.WriteLine("Welcome Admin!");
            do
            {
                Console.WriteLine("What location do you want to restock?");
                Console.WriteLine("[0] Downtown");
                Console.WriteLine("[1] Suburbs");
                Console.WriteLine("[2] Exit to main menu");
                string input = Console.ReadLine();
                switch (input)
                {
                case "0":
                    Location downtown = new Location();
                    downtown.Address = "77 Market Street, St. Louis, MO, 63118";
                    _invBL.Replenish(downtown);
                    break;

                case "1":
                    Location suburbs = new Location();
                    suburbs.Address = "1 Lockwood Ave, Webster Groves, MO 63119";
                    _invBL.Replenish(suburbs);
                    break;

                case "2":
                    repeat = false;
                    Console.WriteLine("Have a nice day!");
                    menu = MenuFactory.GetMenu("main");
                    break;

                default:
                    Console.WriteLine("Invalid Entry!");
                    break;
                }
            } while (repeat);
        }
Exemplo n.º 4
0
        public void Start(Customer customer)
        {
            bool repeat = true;

            do
            {
                Console.WriteLine("This is Manage Locations Menu");
                Console.WriteLine("What would you like to do?");
                Console.WriteLine("[1] View All Locations");
                Console.WriteLine("[2] Manage an Existing Location");
                Console.WriteLine("[3] Create a New Location");
                Console.WriteLine("[0] Go Back");
                string input = Console.ReadLine();
                switch (input)
                {
                case "0":
                    repeat = false;
                    break;

                case "1":
                    GetAllLocations();
                    break;

                case "2":
                    MenuFactory.GetMenu("inventory").Start(customer);
                    break;

                case "3":
                    AddNewLocation();
                    break;

                default:
                    Console.WriteLine("I don't understand your input, please try again.");
                    break;
                }
            } while(repeat);
        }
        public void Start()
        {
            bool repeat = true;

            do
            {
                Console.WriteLine($"Hello Happy Lemon Store Manager - Welcome to the Main Menu");
                Console.WriteLine("What would you like to do?");
                Console.WriteLine("[0] Sign Off");
                Console.WriteLine("[1] Manage a branch location");
                Console.WriteLine("[2] Open a new branch location");
                Console.WriteLine("[3] View all branch locations");
                string input = Console.ReadLine();
                switch (input)
                {
                case "0":
                    repeat = false;
                    break;

                case "1":
                    MenuFactory.GetMenu("inventory").Start();
                    break;

                case "2":
                    AddLocation();
                    break;

                case "3":
                    ViewAllLocations();
                    break;

                default:
                    Console.WriteLine("Invalid input");
                    break;
                }
            } while (repeat);
        }
Exemplo n.º 6
0
 /// <summary>
 /// This is the main method, its the starting point of your application
 /// </summary>
 /// <param name="args"></param>
 static void Main(string[] args)
 {
     MenuFactory.GetMenu("main").Start(null);
     //call method that starts main user interface
 }
Exemplo n.º 7
0
        public void Start(Customer customer)
        {
            _currentCustomer = customer;
            bool repeat = true;

            do
            {
                string input;
                while (_currentCustomer is null)
                {
                    Console.WriteLine("Welcome to the Wild Side Story!");
                    Console.WriteLine("We specialize in sourdough supplies and products");
                    Console.WriteLine("Have you shopped with us before? [y/n]");
                    input = Console.ReadLine();
                    switch (input.ToLower())
                    {
                    case "y":
                        _currentCustomer = AuthMenuFactory.GetMenu("login").Start();
                        break;

                    case "n":
                        Console.WriteLine("Please sign up before continuing");
                        _currentCustomer = AuthMenuFactory.GetMenu("signup").Start();
                        break;

                    case "42":
                        _currentCustomer = new Customer("admin");
                        MenuFactory.GetMenu("admin").Start(_currentCustomer);
                        break;

                    default:
                        Console.WriteLine("I don't understand your input, please try again.");
                        break;
                    }
                }


                Console.WriteLine("What would you like to do today?");
                Console.WriteLine("[1] Browse Items");
                Console.WriteLine("[2] My Profile");
                Console.WriteLine("[0] Exit");
                input = Console.ReadLine();
                switch (input)
                {
                case "0":
                    Console.WriteLine("Goodbye, come back soon!");
                    repeat = false;
                    break;

                case "1":
                    MenuFactory.GetMenu("browse").Start(_currentCustomer);
                    break;

                case "2":
                    MenuFactory.GetMenu("profile").Start(_currentCustomer);
                    break;

                case "42":
                    MenuFactory.GetMenu("admin").Start(_currentCustomer);
                    break;

                default:
                    Console.WriteLine("I don't understand your input, please try again.");
                    break;
                }
            } while(repeat);
        }
Exemplo n.º 8
0
 static void Main(string[] args)
 {
     MenuFactory.GetMenu("main").Start();
 }
Exemplo n.º 9
0
 /// <summary>
 /// This is the main method, its the starting point of your application
 /// </summary>
 /// <param name="args"></param>
 static void Main(string[] args)
 {
     Log.Logger = new LoggerConfiguration().MinimumLevel.Information().WriteTo.File("../logs/mochamomentlog.txt", rollingInterval: RollingInterval.Day).CreateLogger();
     //call method that starts main user interface
     MenuFactory.GetMenu("main").Start();
 }