Esempio n. 1
0
        /// <summary>
        /// 角色修改
        /// </summary>
        /// <returns></returns>
        public ActionResult EditRole(Model.P_Role model)
        {
            int res = new P_RoleBLL().Modify(model, "DepID", "Name", "Remark", "IsActive", "SN");

            if (res > 0)
            {
                return(this.JsonResult(Utility.E_JsonResult.OK, "编辑权限成功!", null, null));
            }
            else
            {
                return(this.JsonResult(Utility.E_JsonResult.Error, "编辑权限失败~!", null, null));
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 新增角色
        /// </summary>
        /// <returns></returns>
        public ActionResult AddRole(Model.P_Role model)
        {
            model.IsActive = true;

            int res = new P_RoleBLL().Add(model);

            if (res > 0)
            {
                return(this.JsonResult(Utility.E_JsonResult.OK, "新增权限成功!", null, null));
            }
            else
            {
                return(this.JsonResult(Utility.E_JsonResult.Error, "新增权限失败~!", null, null));
            }
        }