Ejemplo n.º 1
0
        public static void Start()
        {
            while (true)
            {
                Console.WriteLine("====================================================");
                Console.WriteLine("|                                                  |");
                Console.WriteLine("|                Dynasty Tomorrow                  |");
                Console.WriteLine("|                                                  |");
                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("====================================================");

                string userInput = Console.ReadLine();

                switch (userInput)
                {
                case "1":
                    LookUpOrderWorkflow OrderLookUp = new LookUpOrderWorkflow();
                    OrderLookUp.TheBeginningOfTheEnd();
                    break;

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

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

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

                case "Q":
                    return;
                }
            }
        }
Ejemplo n.º 2
0
 public void DisplayListToConsole(List <Order> orders)
 {
     foreach (var order in orders)
     {
         Console.WriteLine($"   Order Number: {order.OrderNumber}");
         Console.WriteLine($"   Customer Name: {order.CustomerName}");
         Console.WriteLine($"   State: {order.State}");
         Console.WriteLine($"   Tax Rate: {order.TaxRate}");
         Console.WriteLine($"   Product Type: {order.Product.Type}");
         Console.WriteLine($"   Product Area: {order.Area}");
         Console.WriteLine($"   Product cost per square foot: {order.Product.CostPerSquareFoot}");
         Console.WriteLine($"   Labor cost per square foot: {order.Product.LaborCostPerSquareFoot}");
         Console.WriteLine($"   Material Cost: {order.MaterialCost}");
         Console.WriteLine($"   Labor Cost: {order.LaborCost}");
         Console.WriteLine($"   Total Tax: {order.TaxOfTotal}");
         Console.WriteLine($"   Total Cost: {order.TotalCost}");
         Console.WriteLine();
         Console.WriteLine("******* Press enter to see next customer... ********");
         Console.ReadKey();
         Console.Clear();
         LookUpOrderWorkflow.Display();
         Console.WriteLine();
     }
 }