Exemplo n.º 1
0
        public async Task <bool> EditDeliveryDate(ExtendedOrderConfirmDeliveryDateVM orderConfirmation)
        {
            Order order = await ctx.Order.Where(o => o.OrderId == orderConfirmation.OrderId)
                          .FirstOrDefaultAsync();

            order.DeliveryDate = orderConfirmation.DeliveryDate;
            await ctx.SaveChangesAsync();

            return(true);
        }
Exemplo n.º 2
0
        public async Task <bool> ConfirmDeliveryDate(ExtendedOrderConfirmDeliveryDateVM orderConfirmation)
        {
            Order order = await ctx.Order.Where(o => o.OrderId == orderConfirmation.OrderId)
                          .FirstOrDefaultAsync();

            order.DeliveryDate = orderConfirmation.DeliveryDate;
            order.StatusId     = Guid.Parse("F4F13152-3B04-4EC0-BA8F-C722F30A479D"); //Đang giao
            await ctx.SaveChangesAsync();

            return(true);
        }
Exemplo n.º 3
0
 public async Task <IActionResult> EditDeliveryDate([FromBody] ExtendedOrderConfirmDeliveryDateVM orderConfirmation)
 {
     return(Ok(await orderService.EditDeliveryDate(orderConfirmation)));
 }
Exemplo n.º 4
0
 public async Task <bool> EditDeliveryDate(ExtendedOrderConfirmDeliveryDateVM orderConfirmation)
 {
     return(await orderRepository.EditDeliveryDate(orderConfirmation));
 }