Beispiel #1
0
 public ActionResult Edit(FrameworkRoleVM vm)
 {
     if (!ModelState.IsValid)
     {
         return(PartialView(vm));
     }
     else
     {
         vm.DoEdit();
         return(FFResult().CloseDialog().RefreshGrid());
     }
 }
Beispiel #2
0
 public IActionResult Edit(FrameworkRoleVM vm)
 {
     if (!ModelState.IsValid)
     {
         return(BadRequest(ModelState.GetErrorJson()));
     }
     else
     {
         vm.DoEdit(false);
         if (!ModelState.IsValid)
         {
             return(BadRequest(ModelState.GetErrorJson()));
         }
         else
         {
             return(Ok(vm.Entity));
         }
     }
 }