Exemplo n.º 1
0
        public void Perform(ActionExecutionContext context)
        {
            context.Out.WriteLine(ConsoleColor.Green, "Mark Order as Delivery");
            var orders = _orderApi.GetOrdersWithStatus(OrderStatus.ReadyToDelivery);

            var submenuOrder = new MenuBuilder()
                               .Title("SELECT ORDER: ")
                               .RunnableOnce();

            foreach (var order in orders)
            {
                var currentOrder = order;
                var temp         = order.Number + " " + order.Date + " " + order.Status;
                submenuOrder.Item(temp, ctx => SetAsDelivery(ctx, currentOrder.Id));
            }
            submenuOrder.GetMenu().Run();
        }
Exemplo n.º 2
0
        public void Perform(ActionExecutionContext context)
        {
            context.Out.WriteLine(ConsoleColor.Green, "Mark Order Line as prepared");
            var orders = _orderApi.GetOrdersWithStatus(OrderStatus.InProgress);

            var submenuOrder = new MenuBuilder()
                               .Title("SELECT ORDER: ")
                               .RunnableOnce();

            foreach (var order in orders)
            {
                var currentOrder = order;
                var temp         = order.Number + " " + order.Date + " " + order.Status;
                submenuOrder.Item(temp, ctx => SelectNotReadyOrderLineFromOrder(ctx, currentOrder));
            }

            submenuOrder.GetMenu().Run();
        }