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()); } } }
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)); } } }