public ActionResult Edit(Order Order)
 {
     if (ModelState.IsValid)
     {
         _OrderService.UpdateOrder(Order);
         return RedirectToAction("Index");
     }
     return View(_orderModel.GetModel(Order));
 }
Exemple #2
0
 public OrderModel GetModel(Order entity)
 {
     return new OrderModel()
                {
                    OrderId = entity.OrderId,
                    CustomerName = entity.CustomerName,
                    DateTime = entity.DateTime,
                    AdditionalDiscount = entity.AdditionalDiscount,
                };
 }
 public void UpdateOrder(Order Order)
 {
     _OrderRepository.Update(Order);
     _unitOfWork.Commit();
 }
 public void CreateOrder(Order Order)
 {
     _OrderRepository.Add(Order);
     _unitOfWork.Commit();
 }