Exemple #1
0
        private void ProcessChoice(string choice)
        {
            switch (choice)
            {
            case "1":
                DisplayOrdersWorkflow displaying = new DisplayOrdersWorkflow();
                displaying.Execute();
                break;

            case "2":
                AddOrderWorkflow adding = new AddOrderWorkflow();
                adding.Execute();
                break;

            case "3":
                EditOrderWorkflow editing = new EditOrderWorkflow();
                editing.Execute();
                break;

            case "4":
                RemoveOrderWorkFlow removing = new RemoveOrderWorkFlow();
                removing.Execute();
                break;
            }
        }
        public static void Start()
        {
            ConsoleIO prompt = new ConsoleIO();

            while (!isDone)
            {
                Console.Clear();
                Console.WriteLine("******************************");
                Console.WriteLine("* " + PrintFormatting.companyName);
                Console.WriteLine("*");
                Console.WriteLine("* 1. Display Orders");
                Console.WriteLine("* 2. Add Order");
                Console.WriteLine("* 3. Edit Order");
                Console.WriteLine("* 4. Remove Order");
                Console.WriteLine("* 5. Quit");
                Console.WriteLine("*");
                Console.WriteLine("******************************");

                Console.Write("Enter your choice: ");
                string userInput = Console.ReadLine().ToUpper();

                switch (userInput)
                {
                case "1":
                    DisplayOrdersWorkflow display = new DisplayOrdersWorkflow();
                    display.Execute();
                    break;

                case "2":
                    AddOrderWorkflow add = new AddOrderWorkflow();
                    add.Execute();
                    break;

                case "3":
                    EditOrderWorkflow edit = new EditOrderWorkflow();
                    edit.Execute();
                    break;

                case "4":
                    RemoveOrderWorkflow remove = new RemoveOrderWorkflow();
                    remove.Execute();
                    break;

                case "5":
                    isDone = true;
                    break;

                default:
                    prompt.PrintError("Please enter a number from 1 to 5.");
                    break;
                }
            }
        }
Exemple #3
0
        public static void Start()
        {
            while (true)
            {
                Console.Clear();
                Console.WriteLine(ConsoleIO.starBorder);
                Console.WriteLine("* Flooring Program");
                Console.WriteLine("*");
                Console.WriteLine("* 1. Display Orders");
                Console.WriteLine("* 2. Add an Order");
                Console.WriteLine("* 3. Edit an Order");
                Console.WriteLine("* 4. Remove an Order");
                Console.WriteLine("* 5. Quit");
                Console.WriteLine("*");
                Console.WriteLine(ConsoleIO.starBorder);

                Console.Write("\nEnter a selection: ");
                string userInput = Console.ReadLine();

                switch (userInput)
                {
                case "1":
                    DisplayOrdersWorkflow displayWorkflow = new DisplayOrdersWorkflow();
                    displayWorkflow.Execute();
                    break;

                case "2":
                    AddOrderWorkflow addWorkflow = new AddOrderWorkflow();
                    addWorkflow.Execute();
                    break;

                case "3":
                    EditOrderWorkflow editWorkflow = new EditOrderWorkflow();
                    editWorkflow.Execute();
                    break;

                case "4":
                    RemoveOrderWorkflow removeWorkflow = new RemoveOrderWorkflow();
                    removeWorkflow.Execute();
                    break;

                case "5":
                    return;

                default:
                    break;
                }
            }
        }
Exemple #4
0
        public static void Start()
        {
            while (true)
            {
                Console.WriteLine(new string('=', 60));
                Console.WriteLine("");
                Console.WriteLine("                    FLOORING MENU");
                Console.WriteLine("");
                Console.WriteLine(new string('=', 60));
                Console.WriteLine("");
                Console.WriteLine("  1. Display Order.");
                Console.WriteLine("  2. Add an Order.");
                Console.WriteLine("  3. Edit an Order.");
                Console.WriteLine("  4. Remove an Order.");
                Console.WriteLine("  5. Quit.");
                Console.WriteLine("");
                Console.WriteLine(new string('=', 60));
                Console.WriteLine("");
                Console.WriteLine("  Please Enter a Selection: ");
                string userinput = Console.ReadLine();

                switch (userinput)
                {
                case "1":
                    DisplayOrdersWorkflow displayWorkflow = new DisplayOrdersWorkflow();
                    displayWorkflow.Execute();
                    break;

                case "2":
                    AddOrderWorkflow addWorkflow = new AddOrderWorkflow();
                    addWorkflow.Execute();
                    break;

                case "3":
                    EditOrderWorkflow editWorkflow = new EditOrderWorkflow();
                    editWorkflow.Execute();
                    break;

                case "4":
                    DeleteOrderWorkflow deleteWorkflow = new DeleteOrderWorkflow();
                    deleteWorkflow.Execute();
                    break;

                case "5":
                    Console.WriteLine("System End.");
                    return;
                }
            }
        }
        public void MainMenu()
        {
            //Main menu, to include Display orders, add order, edit order, remove order, quit
            while (true)
            {
                Console.WriteLine("*************************************************************************************");
                Console.WriteLine("*\tFlooring Program ");
                Console.WriteLine("*");
                Console.WriteLine("* 1. Display Orders");
                Console.WriteLine("* 2. Add an Order");
                Console.WriteLine("* 3. Edit an Order");
                Console.WriteLine("* 4. Remove an Order");
                Console.WriteLine("* 5. Quit");
                string input = Console.ReadLine();

                switch (input.ToUpper())
                {
                case "1":
                    DisplayOrdersWorkflow displayOrders = new DisplayOrdersWorkflow();
                    displayOrders.Execute();
                    break;

                case "2":
                    AddOrderWorkflow addOrder = new AddOrderWorkflow();
                    addOrder.Execute();
                    break;

                case "3":
                    EditOrderWorkflow editOrder = new EditOrderWorkflow();
                    editOrder.Execute();
                    break;

                case "4":
                    RemoveOrderWorkflow removeOrder = new RemoveOrderWorkflow();
                    removeOrder.Execute();
                    break;

                case "5":
                case "Q":
                    Environment.Exit(0);
                    break;

                default:
                    Console.WriteLine("Invalid Entry");
                    break;
                }
            }
        }
Exemple #6
0
        public static void Show()
        {
            while (true)
            {
                Console.Clear();

                Console.WriteLine("*********************************************************");
                Console.WriteLine("* Flooring Program");
                Console.WriteLine("*");
                Console.WriteLine("1. Display Orders");
                Console.WriteLine("2. Add an Order");
                Console.WriteLine("3. Edit an Order");
                Console.WriteLine("4. Remove an Order");

                Console.WriteLine("\nQ to quit");
                Console.WriteLine("*********************************************************");

                Console.Write("\nEnter selection: ");

                switch (Console.ReadLine())
                {
                case "1":
                    DisplayOrdersWorkflow displayOrders = new DisplayOrdersWorkflow();
                    displayOrders.Execute();
                    break;

                case "2":
                    AddOrderWorkflow addOrder = new AddOrderWorkflow();
                    addOrder.Execute();
                    break;

                case "3":
                    EditOrderWorkflow editOrder = new EditOrderWorkflow();
                    editOrder.Execute();
                    break;

                case "4":
                    RemoveOrderWorkflow removeOrder = new RemoveOrderWorkflow();
                    removeOrder.Execute();
                    break;

                case "Q":
                    return;
                }
            }
        }
Exemple #7
0
        public static void Start()
        {
            while (true)
            {
                Console.Clear();
                Console.WriteLine("*************************************");
                Console.WriteLine("          Floor Ordering Menu");
                Console.WriteLine("*************************************");
                Console.WriteLine("1. Display Orders");
                Console.WriteLine("2. Add an Order");
                Console.WriteLine("3. Edit an Order");
                Console.WriteLine("4. Remove an Order");
                Console.WriteLine("\nQ to quit");
                Console.WriteLine("\nEnter selection");

                string userinput = Console.ReadLine();

                switch (userinput.ToUpper())
                {
                case "1":
                    Console.Clear();
                    DisplayOrdersWorkflow display = new DisplayOrdersWorkflow();
                    display.Execute();
                    break;

                case "2":
                    Console.Clear();
                    AddOrderWorkflow add = new AddOrderWorkflow();
                    add.Execute();
                    break;

                case "3":
                    EditOrderWorkflow edit = new EditOrderWorkflow();
                    edit.Execute();
                    break;

                case "4":
                    RemoveOrderWorkflow remove = new RemoveOrderWorkflow();
                    remove.Execute();
                    break;

                case "Q":
                    return;
                }
            }
        }
        public static void Start()
        {
            while (true)
            {
                Console.Clear();
                Console.WriteLine("Flooring Program");
                Console.WriteLine("------------------------");
                Console.WriteLine("1. Display Order(s)");
                Console.WriteLine("2. Add an Order");
                Console.WriteLine("3. Edit an Order");
                Console.WriteLine("4. Remove an Order");

                Console.WriteLine("\nQ to quit");
                Console.Write("\nEnter selection: ");

                string userinput = Console.ReadLine();

                switch (userinput)
                {
                case "1":
                    DisplayOrdersWorkflow lookupWorkflow = new DisplayOrdersWorkflow();
                    lookupWorkflow.Execute();
                    break;

                case "2":
                    AddOrderWorkflow addWorkflow = new AddOrderWorkflow();
                    addWorkflow.Execute();
                    break;

                case "3":
                    EditOrderWorkflow editWorkflow = new EditOrderWorkflow();
                    editWorkflow.Execute();
                    break;

                case "4":
                    RemoveOrderWorkflow removeWorkflow = new RemoveOrderWorkflow();
                    removeWorkflow.Execute();
                    break;

                case "q":
                case "Q":
                    return;
                }
            }
        }
Exemple #9
0
        public static void Start()
        {
            while (true)
            {
                Console.Clear();
                Console.WriteLine("********************************************************************");
                Console.WriteLine("Flooring Program \n");
                Console.WriteLine("1. Display Orders");
                Console.WriteLine("2. Add an Order");
                Console.WriteLine("3. Edit an Order");
                Console.WriteLine("4. Remove an Order");
                Console.WriteLine("5. Quit\n");
                Console.WriteLine("********************************************************************");
                Console.WriteLine("Enter Selection");

                string userInput = Console.ReadLine();

                switch (userInput)
                {
                case "1":
                    DisplayOrdersWorkflow displayWorkflow = new DisplayOrdersWorkflow();
                    displayWorkflow.Execute();
                    break;

                case "2":
                    AddOrderWorkflow addWorkflow = new AddOrderWorkflow();
                    addWorkflow.Execute();
                    break;

                case "3":
                    EditOrderWorkflow editWorkflow = new EditOrderWorkflow();
                    editWorkflow.Execute();
                    break;

                case "4":
                    RemoveOrderWorkflow removeWorkflow = new RemoveOrderWorkflow();
                    removeWorkflow.Execute();
                    break;

                case "5":
                    return;
                }
            }
        }
Exemple #10
0
        public static void Start()
        {
            while (true)
            {
                Console.Clear();
                Console.WriteLine("SWC Corp. Flooring Ordering System");
                Console.WriteLine("-----------------------------------------");
                Console.WriteLine("1. Display Orders");
                Console.WriteLine("2. Add an Order");
                Console.WriteLine("3. Edit an Order");
                Console.WriteLine("4. Remove an Order");
                Console.WriteLine("5. Quit");
                Console.WriteLine();
                Console.Write("Please enter a numbered option: ");
                string userInput = Console.ReadLine();

                switch (userInput)
                {
                case "1":
                    DisplayOrdersWorkflow displayWorkflow = new DisplayOrdersWorkflow();
                    displayWorkflow.Execute();
                    break;

                case "2":
                    AddOrderWorkflow addWorkflow = new AddOrderWorkflow();
                    addWorkflow.Execute();
                    break;

                case "3":
                    EditOrderWorkflow editWorkflow = new EditOrderWorkflow();
                    editWorkflow.Execute();
                    break;

                case "4":
                    RemoveOrderWorkflow removeWorkflow = new RemoveOrderWorkflow();
                    removeWorkflow.Execute();
                    break;

                case "5":
                    return;
                }
            }
        }
Exemple #11
0
        public static void Start()
        {
            while (true)
            {
                Console.Clear();
                Headers.MainMenuHeader();
                Console.WriteLine(" 1. Display Orders");
                Console.WriteLine(" 2. Add an Order");
                Console.WriteLine(" 3. Edit an Order");
                Console.WriteLine(" 4. Remove an Order");
                Console.WriteLine("\n Q to Quit");
                Console.WriteLine("\n Enter a selection:");

                string userInput = Console.ReadLine().ToUpper();

                switch (userInput)
                {
                case "1":
                    DisplayOrdersWorkflow displayWorkflow = new DisplayOrdersWorkflow();
                    displayWorkflow.Execute();
                    break;

                case "2":
                    AddOrderWorkflow addWorkflow = new AddOrderWorkflow();
                    addWorkflow.Execute();
                    break;

                case "3":
                    EditOrderWorkflow editWorkflow = new EditOrderWorkflow();
                    editWorkflow.Execute();
                    break;

                case "4":
                    RemoveOrderWorkflow removeWorkflow = new RemoveOrderWorkflow();
                    removeWorkflow.Execute();
                    break;

                case "Q":
                    return;
                }
            }
        }
        private static bool MenuChoice()
        {
            string userInput = Console.ReadLine();

            switch (userInput.ToUpper())
            {
            case "1":
                DisplayOrdersWorkflow displayOrders = new DisplayOrdersWorkflow();
                displayOrders.Execute();
                break;

            case "2":
                AddOrderWorkflow addOrder = new AddOrderWorkflow();
                addOrder.Execute();
                break;

            case "3":
                EditOrderWorkflow editOrder = new EditOrderWorkflow();
                editOrder.Execute();
                break;

            case "4":
                RemoveOrderWorkflow removeOrder = new RemoveOrderWorkflow();
                removeOrder.Execute();
                break;

            case "5":
                CheckPricesWorkFlow checkPrices = new CheckPricesWorkFlow();
                checkPrices.Execute();
                break;

            case "Q":
                return(false);

            default:
                Console.WriteLine("Please enter a valid choice. Press any key to continue.");
                Console.ReadLine();
                break;
            }

            return(true);
        }
Exemple #13
0
        public static void Start()
        {
            while (true)
            {
                ConsoleIO.DisplayMenu();
                string input = Console.ReadLine();

                switch (input)
                {
                case "1":
                    DisplayOrdersWorkflow displayOrdersWorkflow = new DisplayOrdersWorkflow();
                    displayOrdersWorkflow.Execute();
                    break;

                case "2":
                    AddOrdersWorkflow addOrdersWorkflow = new AddOrdersWorkflow();
                    addOrdersWorkflow.Execute();
                    break;

                case "3":
                    EditOrdersWorkflow editOrdersWorkflow = new EditOrdersWorkflow();
                    editOrdersWorkflow.Execute();
                    break;

                case "4":
                    DeleteOrdersWorkflow deleteOrdersWorkflow = new DeleteOrdersWorkflow();
                    deleteOrdersWorkflow.Execute();
                    break;

                case "Q":
                case "q":
                    return;

                default:
                    break;
                }
            }
        }
        public static void Run()
        {
            bool isRunning   = true;
            int  alertStatus = 0;

            while (isRunning)
            {
                Console.Clear();
                Console.WriteLine("**************************************************");
                Console.WriteLine("Flooring Program");
                Console.WriteLine();
                Console.WriteLine("1. Display Orders");
                Console.WriteLine("2. Add an Order");
                Console.WriteLine("3. Edit an Order");
                Console.WriteLine("4. Remove an Order");
                Console.WriteLine("5. Quit program");
                Console.WriteLine();
                Console.WriteLine("**************************************************");

                switch (alertStatus)
                {
                case 1:
                    Console.WriteLine("Invalid input! Enter number to select menu option.");
                    Console.WriteLine();
                    break;

                default:
                    Console.WriteLine();
                    Console.WriteLine();
                    break;
                }

                alertStatus = 0;

                Console.Write("Enter command : ");
                string userInput = Console.ReadLine();

                switch (userInput)
                {
                case "1":
                    DisplayOrdersWorkflow display = new DisplayOrdersWorkflow();
                    display.Execute();
                    break;

                case "2":
                    AddOrderWorkflow add = new AddOrderWorkflow();
                    add.Execute();
                    break;

                case "3":
                    EditOrderWorkflow edit = new EditOrderWorkflow();
                    edit.Execute();
                    break;

                case "4":
                    RemoveOrderWorkflow remove = new RemoveOrderWorkflow();
                    remove.Execute();
                    break;

                case "5":
                    isRunning = false;
                    break;

                default:
                    alertStatus = 1;
                    break;
                }
            }
        }