示例#1
0
 public ActionResult Edit(GroupViewModel viewModel)
 {
     try
     {
         if (ModelState.IsValid)
         {
             GroupBL.Update(viewModel);
             return(RedirectToAction("../Company/Company"));
         }
         else
         {
             throw new Exception();
         }
     }
     catch
     {
         ModelState.AddModelError("", "Unable to save changes. Try again, and if the problem persists see your system administrator.");
         throw;
     }
 }