Exemple #1
0
 public ActionResult Create(VOS_UserVM vm)
 {
     vm.Entity.IsValid = true;
     if (!IsSuperAdministrator)
     {
         vm.Entity.OrganizationID = GetOrganizationID;
     }
     if (!ModelState.IsValid)
     {
         ViewBag.IsShow = IsSuperAdministrator;
         return(PartialView(vm));
     }
     else
     {
         vm.DoAdd();
         if (!ModelState.IsValid)
         {
             vm.DoReInit();
             return(PartialView(vm));
         }
         else
         {
             return(FFResult().CloseDialog().RefreshGrid());
         }
     }
 }
Exemple #2
0
 public ActionResult Edit(VOS_UserVM vm)
 {
     if (!ModelState.IsValid)
     {
         return(PartialView(vm));
     }
     else
     {
         vm.DoEdit();
         if (!ModelState.IsValid)
         {
             vm.DoReInit();
             return(PartialView(vm));
         }
         else
         {
             return(FFResult().CloseDialog().RefreshGridRow(vm.Entity.ID));
         }
     }
 }