public ActionResult RoleMenuUpdate(RoleMenuEntryModel model) { try { this._roleService.RoleMenuUpdate(model); return(this.JsonResultSuccess()); } catch (Exception ex) { return(this.JsonResultError(ex)); } }
public void RoleMenuUpdate(RoleMenuEntryModel model) { this._memoryCacheManager.RemoveStartWith(MemoryCacheKey.CURRENT_USER_ROLE_MENU); var rm = this._repoRoleMenu.Find(model.id); rm.description = model.description; rm.displayOrder = model.displayOrder; rm.sourceMenuId = model.menuId; rm.updatedBy = this.GetCurrentUserId(); rm.updatedDate = DateTime.Now; this._repoRoleMenu.Update(rm); this._unitOfWork.Save(); }
public ActionResult RoleMenuAdd(RoleMenuEntryModel model) { try { this._roleService.RoleMenuAdd(model); var data = this._roleService.RoleMenuGetById(model.id); return(this.JsonResultSuccess(new { data })); } catch (Exception ex) { return(this.JsonResultError(ex)); } }
public void RoleMenuAdd(RoleMenuEntryModel model) { this._memoryCacheManager.RemoveStartWith(MemoryCacheKey.CURRENT_USER_ROLE_MENU); var menu = this._repoMenu.Find(model.menuId); Guid userId = this.GetCurrentUserId(); var ins = this._repoRoleMenu.Insert(new sys_RoleMenu() { roleId = model.roleId, sourceMenuId = model.menuId, description = model.description, parentRoleMenuId = model.parentMenuId, displayOrder = model.displayOrder, updatedBy = userId, }); this._unitOfWork.Save(); model.id = ins.id; }