Example #1
0
        public void OperationSelection(string choice)
        {
            switch (choice)
            {
            case "1":
                DisplayOrderWorkFlow searchOrder = new DisplayOrderWorkFlow();
                searchOrder.Execute();
                break;

            case "2":
                AddWorkFlow addOrderWorkFlow = new AddWorkFlow();
                addOrderWorkFlow.Execute();
                break;

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

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

            default:
                Console.WriteLine();
                Console.WriteLine("{0} is not a valid choice.", choice);
                Console.WriteLine("Press ENTER to continue.");
                Console.ReadLine();
                break;
            }
        }
Example #2
0
        public static void Start()
        {
            while (true)
            {
                Console.Clear();
                Console.WriteLine("SG Flooring Program");
                Console.WriteLine("___________________________");
                Console.WriteLine("1. Display an Order");
                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.Write("\n Enter your selection here: ");
                string UserInput = Console.ReadLine();

                switch (UserInput)
                {
                case "1":
                    DisplayOrderWorkFlow displayOrderWorkFlow = new DisplayOrderWorkFlow();
                    displayOrderWorkFlow.Execute();
                    Console.ReadLine();
                    break;

                case "2":
                    AddOrderWorkFlow addOrderWorkFlow = new AddOrderWorkFlow();
                    addOrderWorkFlow.Execute();
                    Console.ReadLine();
                    break;

                case "3":
                    EditOrderWorkFlow editOrderWorkFlow = new EditOrderWorkFlow();
                    editOrderWorkFlow.Execute();
                    Console.ReadLine();
                    break;

                case "4":
                    RemoveOrderWorkFlow removeOrderWorkFlow = new RemoveOrderWorkFlow();
                    removeOrderWorkFlow.Execute();
                    Console.ReadLine();
                    break;

                case "Q":
                    return;

                default:
                    Console.Write("That is not a valid entry.");
                    Console.ReadLine();
                    break;
                }
            }
        }
Example #3
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 Order");
                Console.WriteLine("* 3. Edit Order ");
                Console.WriteLine("* 4. Remove Order ");
                Console.WriteLine("* 5. Quit ");
                Console.WriteLine("*");
                Console.WriteLine("***********************************");

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

                string userInput = Console.ReadLine();

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

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

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

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

                case "5":
                    return;
                }
            }
        }
Example #4
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;
                }
            }
        }
Example #5
0
        public static void Start()
        {
            while (true)
            {
                Console.Clear();
                Console.WriteLine("SWC Corp Flooring Orders");
                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 displayOrderWorkFlow = new DisplayOrderWorkFlow();
                    displayOrderWorkFlow.Execute();
                    break;

                case "2":
                    AddOrderWorkFlow addOrderWorkFlow = new AddOrderWorkFlow();
                    addOrderWorkFlow.Execute();
                    break;

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

                case "4":
                    RemoveOrderWorkFlow removeOrderWorkFlow = new RemoveOrderWorkFlow();
                    removeOrderWorkFlow.Execute();
                    break;

                case "5":
                    return;
                }
            }
        }
Example #6
0
        private static bool Choice()
        {
            string userinput = Console.ReadLine();

            switch (userinput)
            {
            case "1":
                DisplayOrderWorkFlow displayOrder = new DisplayOrderWorkFlow();
                displayOrder.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(false);

            default:
                Console.WriteLine("Try again!!!!");
                Console.WriteLine("Press Enter to continue....");
                Console.ReadKey();
                break;
            }
            return(true);
        }
Example #7
0
        public static void Start()
        {
            try
            {
                const string divLine = "=============================================================";

                //Default Display Mode
                DisplayMode displayMode = DisplayMode.Condensed;

                while (true)
                {
                    Console.Clear();
                    Console.WriteLine(divLine);
                    Console.WriteLine("|   SWC CORP. - FLOTSam  (Flooring Order Tracking System)   {0}", "|");
                    Console.WriteLine(divLine);

                    Console.WriteLine("|0. Toggle display mode (currently: {0}) {1," + (23 - displayMode.ToString().Length) + "}", displayMode.ToString(), "|");
                    Console.WriteLine("|1. List ALL Files      (given: nothing)                    {0}", "|");
                    Console.WriteLine("|2. List ALL Orders     (given: order date)                 {0}", "|");
                    Console.WriteLine("|3. Add an Order        (given: order date)                 {0}", "|");
                    Console.WriteLine("|4. Show an Order       (given: order date & order number)  {0}", "|");
                    Console.WriteLine("|5. Edit an Order       (given: order date & order number)  {0}", "|");
                    Console.WriteLine("|6. Remove an Order     (given: order date & order number)  {0}", "|");
                    Console.WriteLine("|7. (Q) to quit                                             {0}", "|");
                    Console.WriteLine(divLine);

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

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

                    switch (userInput)
                    {
                    case "0":
                        if (displayMode == DisplayMode.Normal)
                        {
                            displayMode = DisplayMode.Condensed;
                        }
                        else
                        {
                            displayMode = DisplayMode.Normal;
                        }
                        break;

                    case "1":
                        ListAllFilesWorkFlow.Execute();
                        break;

                    case "2":
                        DisplayOrdersWorkFlow.Execute(displayMode);
                        break;

                    case "3":
                        AddOrderWorkFlow.Execute(displayMode);
                        break;

                    case "4":
                        DisplayOrderWorkFlow.Execute(displayMode);
                        break;

                    case "5":
                        EditOrderWorkFlow.Execute(displayMode);
                        break;

                    case "6":
                        DeleteOrderWorkFlow.Execute(displayMode);
                        break;

                    case "7":
                    case "Q":
                        return;

                    default:
                        //Invalid Input
                        ConsoleIO.DisplayText($"Invalid entry! Please enter a number between 1 & 7 \nPress any key to try again...", false, true, ConsoleColor.Red);
                        continue;
                    }
                }
            }
            catch (Exception ex)
            {
                ConsoleIO.DisplayError(ex);
            }
        }