Ejemplo n.º 1
0
 // POST: Customer/Delete/5
 public ActionResult CustomerDelete(int id, CustomerViewModel model)
 {
     try
     {
         _customerBl.Remove(id);
         return RedirectToAction("CustomerIndex");
     }
     catch
     {
         return View("Error");
     }
 }
Ejemplo n.º 2
0
 public ActionResult CustomerEdit(int id, CustomerViewModel model)
 {
     try
     {
         var customer = Mapper.Map<CustomerBusinessModel>(model);
         _customerBl.Update(customer);
         return RedirectToAction("CustomerIndex");
     }
     catch
     {
         return View("Error");
     }
 }