Пример #1
0
 public ActionResult Edit(Industry industry)
 {
     try
     {
         iService.UpdateIndustry(industry);
         return RedirectToAction("Index");
     }
     catch
     {
         return View();
     }
 }
Пример #2
0
 public bool UpdateIndustry(Industry industry)
 {
     try
     {
         industry.State = ObjectState.Modified;
         industryRep.AddOperation(industry);
         return true;
     }
     catch (Exception ex)
     {
         var msg = ex.Message;
         return false;
     }
 }