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); }
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); }
public async Task <IActionResult> EditDeliveryDate([FromBody] ExtendedOrderConfirmDeliveryDateVM orderConfirmation) { return(Ok(await orderService.EditDeliveryDate(orderConfirmation))); }
public async Task <bool> EditDeliveryDate(ExtendedOrderConfirmDeliveryDateVM orderConfirmation) { return(await orderRepository.EditDeliveryDate(orderConfirmation)); }