public ActionResult Update(UserClaimItemModel userClaimItemModel) { try { if (IsUpdate(userClaimItemModel.OperationResult)) { if (IsValid(userClaimItemModel.OperationResult, userClaimItemModel.UserClaim)) { UserClaim userClaim = (UserClaim)userClaimItemModel.UserClaim.ToData(); if (Application.Update(userClaimItemModel.OperationResult, userClaim)) { if (userClaimItemModel.IsSave) { return(JsonResultSuccess(userClaimItemModel.OperationResult, Url.Action("Update", "UserClaim", new { Id = userClaim.Id }, Request.Url.Scheme))); } else { return(JsonResultSuccess(userClaimItemModel.OperationResult)); } } } } } catch (Exception exception) { userClaimItemModel.OperationResult.ParseException(exception); } userClaimItemModel.ActivityOperations = ActivityOperations; return(JsonResultOperationResult(userClaimItemModel.OperationResult)); }
public ActionResult Create(string masterEntity = null, string masterKey = null) { UserClaimItemModel userClaimItemModel = new UserClaimItemModel(ActivityOperations, "Create", masterEntity, masterKey); try { if (IsCreate(userClaimItemModel.OperationResult)) { return(ZPartialView("CRUD", userClaimItemModel)); } } catch (Exception exception) { userClaimItemModel.OperationResult.ParseException(exception); } return(JsonResultOperationResult(userClaimItemModel.OperationResult)); }
public ActionResult Delete(UserClaimItemModel userClaimItemModel) { try { if (IsDelete(userClaimItemModel.OperationResult)) { if (Application.Delete(userClaimItemModel.OperationResult, (UserClaim)userClaimItemModel.UserClaim.ToData())) { return(JsonResultSuccess(userClaimItemModel.OperationResult)); } } } catch (Exception exception) { userClaimItemModel.OperationResult.ParseException(exception); } userClaimItemModel.ActivityOperations = ActivityOperations; return(JsonResultOperationResult(userClaimItemModel.OperationResult)); }
public ActionResult Delete(int id, string masterEntity = null, string masterKey = null) { UserClaimItemModel userClaimItemModel = new UserClaimItemModel(ActivityOperations, "Delete", masterEntity, masterKey); try { if (IsDelete(userClaimItemModel.OperationResult)) { UserClaim userClaim = Application.GetById(userClaimItemModel.OperationResult, new object[] { id }); if (userClaim != null) { userClaimItemModel.UserClaim = new UserClaimViewModel(userClaim); return(ZPartialView("CRUD", userClaimItemModel)); } } } catch (Exception exception) { userClaimItemModel.OperationResult.ParseException(exception); } return(JsonResultOperationResult(userClaimItemModel.OperationResult)); }