Exemple #1
0
        private void ProcessChoice(string input)
        {
            switch (input)
            {
            case "1":
                var DisplayOrder = new DisplayOrderWorkflow();
                DisplayOrder.Execute();
                break;

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

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

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

            case "5":
                System.Environment.Exit(1);
                break;
            }
        }
Exemple #2
0
        public static void Main()
        {
            Console.WriteLine(ConsoleIO.HorizontalLine);
            Console.WriteLine("Flooring Order Management System");
            Console.WriteLine(ConsoleIO.HorizontalLine);
            Console.WriteLine("1. List Orders");
            Console.WriteLine("2. Add Order");
            Console.WriteLine("3. Edit Order");
            Console.WriteLine("4. Delete Order");
            Console.WriteLine("Q. Quit");
            Console.WriteLine(ConsoleIO.HorizontalLine);
            Console.WriteLine();
            Console.WriteLine();
            Console.Write("Please enter your selection: ");


            bool validInput = false;

            while (validInput == false)
            {
                string input = Console.ReadLine();
                switch (input)
                {
                case "1":
                    ViewOrderWorkflow viewOrder = new ViewOrderWorkflow();
                    validInput = true;
                    viewOrder.Execute();
                    break;

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

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

                case "4":
                    RemoveOrderWorkflow deleteOrder = new RemoveOrderWorkflow();
                    validInput = true;
                    deleteOrder.Execute();
                    break;

                case "Q":
                    return;

                default:
                    Console.WriteLine("Invalid selection.  Please enter one of the above options.");
                    break;
                }
            }
        }
        public static void Start()
        {
            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("* 5. Quit");
                Console.WriteLine("*");
                Console.WriteLine("********************************************************");


                Console.Write("\n Enter Selection: ");

                string userinput = Console.ReadLine();

                WorkflowHelper.MenuInputValidation(userinput, "That was not a valid entry");



                switch (userinput)
                {
                case "1":
                    DisplayWorkflow displayWorkflow = new DisplayWorkflow();
                    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":
                    QuitWorkflow quitWorkflow = new QuitWorkflow();
                    quitWorkflow.Execute();
                    return;
                }
            }
        }
        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 #5
0
        public static void Start()
        {
            string menu = "****************************************************************************\n* Flooring Program\n*\n* 1.Display Orders\n* 2.Add an Order\n* 3.Edit an Order\n* 4.Remove an Order\n* 5.Quit\n*\n****************************************************************************";

            while (true)
            {
                Console.Clear();
                Console.WriteLine(menu);
                Console.Write("\nEnter Selection: ");

                string userinput = Console.ReadLine();
                int    selection;

                if (!int.TryParse(userinput, out selection))
                {
                    Console.WriteLine("Error: You did not enter a valid number selection!");
                    ConsoleIO.PressAnyKey();
                    continue;
                }

                switch (selection)
                {
                case 1:    //display orders
                    DisplayOrderWorkflow displayOrderWorkflow = new DisplayOrderWorkflow();
                    displayOrderWorkflow.Execute();
                    break;

                case 2:    //add an order
                    AddOrderWorkflow addOrderWorkflow = new AddOrderWorkflow();
                    addOrderWorkflow.Execute();
                    break;

                case 3:    //edit an order
                    EditOrderWorkflow editOrderWorkflow = new EditOrderWorkflow();
                    editOrderWorkflow.Execute();
                    break;

                case 4:    //remove an order
                    RemoveOrderWorkflow removeOrderWorkflow = new RemoveOrderWorkflow();
                    removeOrderWorkflow.Execute();
                    break;

                case 5:    //quit
                    return;

                default:
                    Console.WriteLine("Error: You did not enter a valid selection!");
                    ConsoleIO.PressAnyKey();
                    break;
                }
            }
        }
Exemple #6
0
        public static void StartMenu()
        {
            while (true)
            {
                Console.Clear();
                Console.WriteLine(TextHelper.ConsoleBar);

                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(TextHelper.ConsoleBar);
                Console.WriteLine("Enter your selection: ");

                string userInput = Console.ReadLine();

                switch (userInput)
                {
                case "1":
                    LookupOrderWorkflow lookupWorkflow = new LookupOrderWorkflow();
                    lookupWorkflow.Execute();
                    break;

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

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

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

                case "5":
                    return;

                default:
                    Console.WriteLine("That was not a valid entry! Press any key to contine...");
                    Console.ReadKey();
                    break;
                }
            }
        }
Exemple #7
0
        public static void Run()
        {
            string border = "**********************************";

            while (true)
            {
                Console.WriteLine(border);
                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(border);

                string UserChoice = Console.ReadLine();
                bool   IsAnInt    = int.TryParse(UserChoice, out int userChoice);
                if (!IsAnInt || userChoice < 1 || userChoice > 5)
                {
                    Console.WriteLine("Please enter a number between 1 and 5.");
                    continue;
                }

                switch (userChoice)
                {
                case 1:
                    DisplayOrderWorkflow displayWorkflow = new DisplayOrderWorkflow();
                    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 #8
0
        public static void Start()
        {
            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("*5. Quit");
                Console.WriteLine("*************************************************************************");


                Console.Write("Please enter a selection: ");
                string userInput = Console.ReadLine();

                switch (userInput)
                {
                case "1":
                    ListOrdersWorkflow ordersWorkflow = new ListOrdersWorkflow();
                    ordersWorkflow.Execute();
                    break;

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

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

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

                case "5":
                    return;

                default:
                    Console.WriteLine("That is not a valid selection.");
                    Console.WriteLine("Press any key to continue...");
                    Console.ReadLine();
                    break;
                }
            }
        }
Exemple #9
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 #10
0
        public static void Start()
        {
            while (true)
            {
                Console.WriteLine("");
                Console.WriteLine("");
                Console.ForegroundColor = ConsoleColor.Green;
                Console.WriteLine("SGFlooring Order Menu");
                Console.ForegroundColor = ConsoleColor.White;
                Console.WriteLine("*****************************");
                Console.ForegroundColor = ConsoleColor.Green;
                Console.WriteLine("1. Display Order Information");
                Console.WriteLine("2. Add A New Order");
                Console.WriteLine("3. Edit An Existing Order");
                Console.WriteLine("4. Remove An Existing Order");

                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine("\nQ to quit");
                Console.ForegroundColor = ConsoleColor.Green;
                Console.WriteLine("Enter Selection:");
                string userinput = Console.ReadLine();

                switch (userinput)
                {
                case "1":
                    DisplayOrderWorkflow displayOrder = new DisplayOrderWorkflow();
                    displayOrder.Execute();
                    break;

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

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

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

                case "Q":
                    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 #12
0
        public static void Start()
        {
            while (true)
            {
                Console.Clear();
                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("\nEnter Selection:");

                string userinput = Console.ReadLine();

                switch (userinput)
                {
                case "1":
                    DisplayOrderWorkFlow LookupWorkFlow = new DisplayOrderWorkFlow();
                    LookupWorkFlow.Execute();
                    break;

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

                case "3":
                    EditOrderWorkFlow EditAnOrder = new EditOrderWorkFlow();
                    EditAnOrder.Execute();
                    break;

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

                case "5":
                    return;

                default:
                    Console.WriteLine("That's not a selection");
                    break;
                }
            }
        }
Exemple #13
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;
                }
            }
        }
Exemple #14
0
        public static void Start()  //made static because there will only be one menu start program running
        {
            while (true)
            {
                Console.Clear();
                Console.WriteLine("*********************************");
                Console.WriteLine("Flooring Program Menu");

                Console.WriteLine("\n1. Display Order Details");
                Console.WriteLine("2. Add an Order");
                Console.WriteLine("3. Edit an Order");
                Console.WriteLine("4. Remove an Order");
                Console.WriteLine("5. Quit");

                Console.WriteLine("\n*********************************");
                Console.Write("\nEnter Selection: ");

                string userinput = Console.ReadLine();

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

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

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

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

                case "5":
                    return;
                }
            }
        }
Exemple #15
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 #16
0
        public static void Run()
        {
            while (true)
            {
                Console.Clear();
                Console.WriteLine("Flooring Program");
                Console.WriteLine();
                Console.WriteLine("1) Display Order");
                Console.WriteLine("2) Add Order");
                Console.WriteLine("3) Edit Order");
                Console.WriteLine("4) Remove Order");
                Console.WriteLine();
                Console.WriteLine("5) Quit");
                Console.WriteLine();
                Console.WriteLine("Enter your selection:");
                string userInput = Console.ReadLine();

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

                case "2":
                    CreateOrderWorkflow createWorkFlow = new CreateOrderWorkflow();
                    createWorkFlow.Execute();
                    break;

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

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

                case "5":
                case "Q":
                    Environment.Exit(0);
                    return;
                }
            }
        }
Exemple #17
0
        public void Start()
        {
            while (true)
            {
                Console.Clear();

                string mode = ConfigurationManager.AppSettings["Mode"].ToString();
                if (mode == "TrainingMode")
                {
                    ConsoleIO.DisplayTrainingModeMessage();
                }

                //Console.Clear();
                char keyPressed = ConsoleIO.DisplayMenu();

                switch (keyPressed)
                {
                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 #18
0
        public static void Start()
        {
            OrderManager manager = OrderManagerFactory.Create();

            while (true)
            {
                Console.Clear();
                Console.WriteLine("SWC Corp 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("\nEnter Your Selection: ");

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

                switch (userInput)
                {
                case "1":
                    DisplayingOrdersWorkflow displayOrder = new DisplayingOrdersWorkflow(manager);
                    displayOrder.Execute();
                    break;

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

                case "3":
                    UpdateOrderWorkflow updateOrder = new UpdateOrderWorkflow(manager);
                    updateOrder.Execute();
                    break;

                case "4":
                    RemoveOrderWorkflow removeOrder = new RemoveOrderWorkflow(manager);
                    removeOrder.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 #20
0
        public static void Start()
        {
            Console.Clear();
            Console.WriteLine("Flooring Program");
            Console.WriteLine("*******************************************");
            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("*******************************************");

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

            string userInput = Console.ReadLine();

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

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

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

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

            case "5":
                return;
            }
        }
Exemple #21
0
        public static void Start()
        {
            while (true)
            {
                Console.Clear();
                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.Write("\nEnter selection: ");

                string userinput = Console.ReadLine();

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

                case "2":
                    SaveOrderWorkflow saveWorkflow = new SaveOrderWorkflow();
                    saveWorkflow.Execute();
                    break;

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

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

                case "5":
                    return;
                }
            }
        }
Exemple #22
0
        public static void Start()
        {
            while (true)
            {
                Console.Clear();
                Console.WriteLine("SWC Corp Flooring");
                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.Write("\nEnter selection: ");

                string userinput = Console.ReadLine();

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

                case "2":
                    NewOrderWorkflow newOrderWorkflow = new NewOrderWorkflow();
                    newOrderWorkflow.Execute();
                    break;

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

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

                case "Q":
                    return;
                }
            }
        }
Exemple #23
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 #24
0
        public static void Start()
        {
            Console.Clear();
            Console.WriteLine("****************************");
            Console.WriteLine("* Flooring Mastery Project *");
            Console.WriteLine("****************************");
            Console.WriteLine();
            Console.WriteLine("1. Display Order: ");
            Console.WriteLine("2. Add New Order: ");
            Console.WriteLine("3. Edit Order: ");
            Console.WriteLine("4. Remove Order: ");
            Console.WriteLine("\nQ to quit: ");
            Console.WriteLine("\nPlease enter selection: ");

            string userinput = Console.ReadLine();

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

            case "2":
                AddNewOrderWorkflow addWorkflow = new AddNewOrderWorkflow();
                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 #26
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;
                }
            }
        }
        public static void Run()
        {
            IUserIO    io = new ConsoleIO();
            MenuChoice choice;

            do
            {
                io.Clear();
                choice = io.GetMenuChoice();
                IWorkflow workflow = null;
                switch (choice)
                {
                case MenuChoice.DisplayOrders:
                    workflow = new ReadOrdersWorkflow();
                    break;

                case MenuChoice.AddOrder:
                    workflow = new CreateOrderWorkflow();
                    break;

                case MenuChoice.EditOrder:
                    workflow = new EditOrderWorkflow();
                    break;

                case MenuChoice.RemoveOrder:
                    workflow = new RemoveOrderWorkflow();
                    break;

                case MenuChoice.Quit:
                    workflow = null;
                    break;
                }
                workflow?.Execute();
            } while (choice != MenuChoice.Quit);
            io.WriteLine("Exiting...");
        }
Exemple #28
0
        private static bool ProcessChoice()
        {
            string userinput = Console.ReadLine();

            switch (userinput)
            {
            case "1":
                ListOrdersWorkflow listorderworkflow = new ListOrdersWorkflow();
                listorderworkflow.Execute();
                break;

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

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

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

            case "5":
                return(false);

            default:
                Console.WriteLine("That is not a valid Choice. Press any key to continue.");
                Console.ReadKey();
                break;
            }
            return(true);
        }
Exemple #29
0
        public static void Start()
        {
            while (true)
            {
                Console.Clear();
                Console.WriteLine();
                Console.WriteLine(ConsoleIO.SeperatorBar);
                Console.WriteLine(" FLOORING ORDERING MAIN MENU ");
                Console.WriteLine(ConsoleIO.SeperatorBar);
                Console.WriteLine(" 1) DISPLAY Order(s) ");
                Console.WriteLine(" 2) ADD Order ");
                Console.WriteLine(" 3) EDIT Order ");
                Console.WriteLine(" 4) REMOVE Order ");
                Console.WriteLine(" 5) QUIT System ");
                Console.WriteLine(ConsoleIO.SeperatorBar);
                Console.WriteLine();
                Console.Write(" ENTER SELECTION BY NUMBER: ");

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

                switch (input)
                {
                case "1":

                    Console.Clear();
                    Console.WriteLine();
                    Console.WriteLine(ConsoleIO.SeperatorBar);
                    Console.WriteLine(" ORDER OPTIONS ");
                    Console.WriteLine(ConsoleIO.SeperatorBar);
                    Console.WriteLine(" 1) DISPLAY SINGLE ORDER: By Date & Order Number ");
                    Console.WriteLine(" 2) DISPLAY ALL ORDER: For a Given Date ");
                    Console.WriteLine(" 3) RETURN TO MAIN MENU ");
                    Console.WriteLine(ConsoleIO.SeperatorBar);
                    Console.WriteLine();
                    Console.Write(" ENTER SELECTION BY NUMBER: ");

                    input = Console.ReadLine().ToUpper();

                    switch (input)
                    {
                    case "1":
                        DisplaySingleOrderWorkflow displaySingleOrderWorkflow = new DisplaySingleOrderWorkflow();
                        displaySingleOrderWorkflow.Execute();
                        break;

                    case "2":
                        DisplayAllOrdersWorkflow displayAllOrdersWorkflow = new DisplayAllOrdersWorkflow();
                        displayAllOrdersWorkflow.Execute();
                        break;

                    case "3":
                    case "Q":
                    case "q":
                        break;
                    }
                    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":
                case "Q":
                case "q":
                    return;
                }
            }
        }
        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;
                }
            }
        }