Ejemplo n.º 1
0
 public ActionResult GridUpdate([ModelBinder(typeof(DevExpressEditorsBinder))] CapaActionModel model, string clientAction)
 {
     model.CapaId = this.CapaId;
     if (this.ModelState.IsValid)
     {
         if (clientAction == "Add")
         {
             ServiceSystem.Add(EnscoConstants.EntityModel.CapaAction, model, true);
         }
         else if (clientAction == "Delete")
         {
             ServiceSystem.Delete(EnscoConstants.EntityModel.CapaAction, model, true);
         }
         else
         {
             ServiceSystem.Save(EnscoConstants.EntityModel.CapaAction, model, true);
         }
     }
     else
     {
         this.SaveModelStateErrors();
     }
     this.GetRolePermission(new string[] { this.CapaId.ToString(), model.Type });
     return(PartialView("GridPartial", this.GetActionDataTable(model.Type)));
 }