예제 #1
0
 public OrderForManageRead GetManageOrder(OrderForManage order)
 {
     var manageOrder = _context.Orders.Find(o => o.Id == order.Id && o.Customer.PhoneNumber == order.PhoneNumber).FirstOrDefault();
     if (manageOrder != null)
     {
         return new OrderForManageRead
         {
             Id = manageOrder.Id,
             WorkStartDate = manageOrder.WorkStartDate,
             WorkEndDate = manageOrder.WorkEndDate,
             Status = manageOrder.Status,
         };
     }
     return null;
 }
예제 #2
0
 public ActionResult ManageOrder(OrderForManage order)
 {
     var manageOrder = OrderService.GetManageOrder(order);
     if (manageOrder == null)
     {
         ModelState.AddModelError("", "Данного заказа не существует.");
         return View(order);
     }
     return View("ReadOrder", manageOrder);
 }