Exemple #1
0
        /// <summary>
        /// 添加用户的角色信息
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public string AddUserRole(HttpContext context)
        {
            string roleIds   = context.Request.Params["roleIds"];
            string userId    = context.Request.Params["userId"];
            string fName     = context.Request.Params["fName"];
            string roleNames = context.Request.Params["roleNames"];

            bool result = userBll.AddUserRole(roleIds, userId);

            if (result)
            {
                string optContent = string.Format("{0}修改赋予角色:{1}", fName, roleNames);
                AddSysLog("赋予角色", optContent);

                return(SuccessResult("修改成功"));
            }

            return(ErrorResult(JsonRpcErrorEnum.AddError, "修改失败"));
        }