예제 #1
0
        private static void ApplyChoice(int menuChoice)
        {
            switch (menuChoice)
            {
            case 1:
                OrderLookupWorkflow LookupWorkflow = new OrderLookupWorkflow();
                LookupWorkflow.Execute();
                break;

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

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

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

            case 5:
                Console.Write("To exit, ");
                CommonIO.Continue();
                break;
            }
        }
예제 #2
0
        public static void Start()
        {
            bool open = true;

            while (open)
            {
                Console.Clear();
                Console.WriteLine("SWC Corp Floor Ordering System");
                Console.WriteLine("---------------------------------");
                Console.WriteLine("Pick from the following options");
                Console.WriteLine("1. Display Order");
                Console.WriteLine("2. Place New Order");
                Console.WriteLine("3. Edit Existing Order");
                Console.WriteLine("4. Delete Existing Order");
                Console.WriteLine("5. Load All Orders On Given Date");
                Console.WriteLine("6. Quit");
                string userInput = Console.ReadLine();

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

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

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

                case "4":
                    DeleteExistingOrderWorkflow deleteOrderWorkflow = new DeleteExistingOrderWorkflow();
                    deleteOrderWorkflow.Execute();
                    break;

                case "5":
                    LoadAllOrdersWorkflow allOrdersWorkflow = new LoadAllOrdersWorkflow();
                    allOrdersWorkflow.Execute();
                    break;

                case "6":
                    open = false;
                    break;

                default:
                    Console.Clear();
                    Console.WriteLine("Please enter your choice as a number 1-6\nPress any key to continue...");
                    Console.ReadKey();
                    Console.Clear();
                    break;
                }
            }
        }
예제 #3
0
        public static void Start()
        {
            Console.Clear();
            while (true)
            {
                Console.Clear();
                Output.SendToConsole("Flooring Mastery Order Menu");
                Output.SendToConsole("---------------------------------");
                Output.SendToConsole("1. Order Lookup");
                Output.SendToConsole("2. Add an Order");
                Output.SendToConsole("3. Edit an order");
                Output.SendToConsole("4. Remove an order");
                Output.SendToConsole("5. List orders");
                Output.SendToConsole();
                Output.SendToConsole("Q. Return to Main Menu");
                Console.Write("\nEnter selection:  ");

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

                switch (userinput)
                {
                case "1":
                    OrderLookupWorkflow lookupWorkflow = DIContainer.Kernel.Get <OrderLookupWorkflow>();
                    lookupWorkflow.Execute();
                    break;

                case "2":
                    OrderAddWorkflow orderAddWorkflow = DIContainer.Kernel.Get <OrderAddWorkflow>();
                    orderAddWorkflow.Execute();
                    break;

                case "3":
                    OrderEditWorkflow orderEditWorkflow = DIContainer.Kernel.Get <OrderEditWorkflow>();
                    orderEditWorkflow.Execute();
                    break;

                case "4":
                    OrderRemovalWorkflow orderRemovalWorkflow = DIContainer.Kernel.Get <OrderRemovalWorkflow>();
                    orderRemovalWorkflow.Execute();
                    break;

                case "5":
                    OrderListWorkflow orderListWorkflow = DIContainer.Kernel.Get <OrderListWorkflow>();
                    orderListWorkflow.Execute();
                    break;

                case "q":
                    return;

                default:
                    Output.SendToConsole("\nInvalid selection. Press any key to try again...");
                    Console.ReadKey();
                    break;
                }
            }
        }
예제 #4
0
        public static void Start()
        {
            while (true)
            {
                Console.Clear();
                Console.WriteLine(BorderBar);
                Console.WriteLine("\nSWC Corp");
                Console.WriteLine(BorderBar);
                Console.WriteLine("\n1. Display an Order");
                Console.WriteLine("2. Add an Order");
                Console.WriteLine("3. Edit an Order");
                Console.WriteLine("4. Remove an Order");
                Console.WriteLine(BorderBar);

                Console.WriteLine("\nQ to quit");
                Console.WriteLine(BorderBar);
                Console.WriteLine("\nEnterSelection: ");


                string userinput = Console.ReadLine();

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

                case "2":
                    OrderAddWorkflow orderAddWorkflow = new OrderAddWorkflow();
                    orderAddWorkflow.Execute();
                    break;

                case "3":
                    OrderEditWorkflow orderEditWorkflow = new OrderEditWorkflow();
                    orderEditWorkflow.Execute();
                    break;

                case "4":
                    OrderDeleteWorkflow orderDeleteWorkflow = new OrderDeleteWorkflow();
                    orderDeleteWorkflow.Execute();
                    break;

                case "Q":
                    return;
                }
            }
        }
예제 #5
0
        public void Start()
        {
            while (true)
            {
                Console.Clear();
                Console.WriteLine("***                    ***");
                Console.WriteLine("*    Flooring Program    *");
                Console.WriteLine("***                    ***");
                Console.WriteLine("");
                Console.WriteLine("1.   Display Orders");
                Console.WriteLine("2.   Add Orders");
                Console.WriteLine("3.   Edit Orders");
                Console.WriteLine("4.   Remove Orders");

                Console.WriteLine("\nQ to quit. ");
                Console.Write("Enter Selection: ");
                string input = Console.ReadLine();
                switch (input)
                {
                case "1":
                    OrderLookupWorkflow orderLookup = new OrderLookupWorkflow();
                    orderLookup.Execute();
                    break;

                case "2":
                    OrderAddWorkflow orderAdd = new OrderAddWorkflow();
                    orderAdd.Execute();
                    break;

                case "3":
                    OrderEditWorkflow orderEdit = new OrderEditWorkflow();
                    orderEdit.Execute();
                    break;

                case "4":
                    OrderRemoveWorkflow orderRemove = new OrderRemoveWorkflow();
                    orderRemove.Execute();
                    break;

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

                default:
                    break;
                }
            }
        }
예제 #6
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;
                }
            }
        }
예제 #7
0
파일: Menu.cs 프로젝트: gril0036/AGrill
        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;
                }
            }
        }
예제 #8
0
        public static void Start()
        {
            while (true)
            {
                Console.Clear();
                Console.WriteLine("Flooring Program");
                Console.WriteLine("=======================");
                Console.WriteLine("1. Display an Order");
                Console.WriteLine("2. Add an Order");
                Console.WriteLine("3. Edit and Order");
                Console.WriteLine("4. Remove an Order");

                Console.WriteLine("\nQ to Quit");
                Console.Write("\nEnter Selection: ");

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

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

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

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

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

                case "Q":
                    return;
                }
            }
        }
예제 #9
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;
                }
            }
        }
예제 #10
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":
                    OrderLookupWorkflow lookupWorkflow = new OrderLookupWorkflow();
                    lookupWorkflow.Execute();
                    break;

                case "2":
                    OrderAddToListWorkflow addToListWorkflow = new OrderAddToListWorkflow();
                    addToListWorkflow.Execute();
                    break;

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

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

                case "5":
                    Environment.Exit(0);
                    return;
                }
            }
        }
예제 #11
0
파일: Menu.cs 프로젝트: Cmoesta91/Portfolio
        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;
                }
            }
        }
예제 #12
0
        public static void Start()
        {
            while (true)
            {
                Console.Clear();
                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.Write("Enter selection: ");
                string userinput = Console.ReadLine();

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

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

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

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

                case "5":
                    return;
                }
            }
        }
예제 #13
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.Write("\nEnter selection ");

                string userinput = Console.ReadLine();

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

                case "2":
                    AddAnOrderWorkflow.Execute();
                    break;

                case "3":
                    EditAnOrderWorkflow.Execute();
                    break;

                case "4":
                    DeleteAnOrderWorkflow.Execute();
                    break;

                case "5":
                    return;
                }
            }
        }
        public static void Start()
        {
            while (true)
            {
                Console.Clear();
                Console.WriteLine("Flooring Program");
                Console.WriteLine(ConsoleIO.DividingBar);
                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 - Quit");
                Console.WriteLine(ConsoleIO.DividingBar);
                string userInput = ConsoleIO.GetStringInputFromUser("Enter a menu option: ").ToUpper();

                switch (userInput)
                {
                case "1":
                case "D":
                case "DISPLAY":
                case "DISPLAY ORDERS":
                    OrderLookupWorkflow lookupFlow = new OrderLookupWorkflow();
                    lookupFlow.Execute();
                    break;

                case "2":
                case "A":
                case "ADD":
                case "ADD ORDER":
                case "ADD AN ORDER":
                    AddOrderWorkflow addOrderFlow = new AddOrderWorkflow();
                    addOrderFlow.Execute();
                    break;

                case "3":
                case "E":
                case "EDIT":
                case "EDIT ORDER":
                case "EDIT AN ORDER":
                    EditOrderWorkflow editOrderFlow = new EditOrderWorkflow();
                    editOrderFlow.Execute();
                    break;

                case "4":
                case "R":
                case "REMOVE":
                case "REMOVE ORDER":
                case "REMOVE AN ORDER":
                    DeleteOrderWorkflow deleteOrderFlow = new DeleteOrderWorkflow();
                    deleteOrderFlow.Execute();
                    break;

                case "ALL":
                    OrderLookupAllWorkflow lookupAllFlow = new OrderLookupAllWorkflow();
                    lookupAllFlow.Execute();
                    break;

                case "Q":
                    return;
                }
            }
        }
예제 #15
0
        public static void Start()
        {
            while (true)
            {
                Console.Clear();
                Console.WriteLine("|||       SWC Flooring Project   |||");
                Console.WriteLine("|||------------------------------|||");
                Console.WriteLine("|||       1. Display Orders      |||");
                Console.WriteLine("|||------------------------------|||");
                Console.WriteLine("|||       2. Add Order           |||");
                Console.WriteLine("|||------------------------------|||");
                Console.WriteLine("|||       3. Edit Order          |||");
                Console.WriteLine("|||------------------------------|||");
                Console.WriteLine("|||       4. Remove Order        |||");
                Console.WriteLine("|||------------------------------|||");
                Console.WriteLine("|||       5. Display Products    |||");
                Console.WriteLine("|||------------------------------|||");
                Console.WriteLine("|||       6. Display all States  |||");
                Console.WriteLine("|||______________________________|||");

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

                string userinput = Console.ReadLine();

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

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

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

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

                case "5":
                    DisplayProductsWorkflow displayWorkflow = new DisplayProductsWorkflow();
                    displayWorkflow.Execute();
                    Console.WriteLine("Press any key to continue");
                    Console.ReadKey();
                    break;

                case "6":
                    DisplayAllStatesWorkflow statesWorkflow = new DisplayAllStatesWorkflow();
                    statesWorkflow.Execute();
                    Console.WriteLine("Press any key to continue");
                    Console.ReadKey();
                    break;

                case "Q":
                    return;
                }
            }
        }