Exemplo n.º 1
0
        public override void Display()
        {
            var date = Input.GetDate("Enter the date of the order: ");

            Output.DisplayAllOrders(date);

            var orderNumbers = Calculation.GetAllOrderNumbers(date);
            var allOrders    = SetTestOrProd.MyOrderObject.LoadOrders(date);

            int orderNumberToEdit = Input.GetInt("Enter the number of the order to edit: ");

            if (orderNumbers.Contains(orderNumberToEdit))
            {
                var MyOrder = (from o in allOrders
                               where o.OrderNumber == orderNumberToEdit
                               select o).FirstOrDefault();

                Order newOrder = Edit.OrderEdit(MyOrder);

                Console.Clear();

                var validate = new ValidationScreen();

                validate.Display(newOrder, date, true);
            }
            else
            {
                var Home = new HomeScreen();
                Screen.JumpScreen(Home);
            }
        }
Exemplo n.º 2
0
        public override void Display()
        {
            var date = Input.GetDate("Enter the date of the order: ");

            if (!BLL.Calculation.DoesOrderFileExist(date))
            {
                SetTestOrProd.MyOrderObject.SaveOrdersToFile(date, new List <Order>());
            }

            Order newOrder = Input.GetOrder();

            Console.Clear();

            var validate = new ValidationScreen();

            validate.Display(newOrder, date, false);
        }