public IActionResult Add(Authority model) { var rst = new ReturnResult <bool>(); using var bll = new AuthorityBll(); if (model.id == 0) { rst = bll.Add(model); } else { rst = bll.Update(model); } return(Json(rst)); }
public override JsonResult Add([FromBody] Authority m) { var res = _bll.Add(m); if (!res.IsSuccess()) { return(Json(res)); } var roleId = base.SysConfig.AdminId; _authRoleBll.Add(new AuthorityRole() { RoleId = roleId, AuthorityId = res.returnValue }); return(Json(res)); }