public ActionResult AddUserIntoRole(int id, int roleId) { ControllerResult result = ControllerResult.SuccResult; string errorMsg = string.Empty; bool addResult = roleService.AddUserIntoRole(id, roleId, out errorMsg); if (!addResult) { result = ControllerResult.FailResult; result.ErroMsg = errorMsg; } else { LogUserAction("对用户ID为{0}进行了角色设置操作,角色为{1}".Fmt(id, roleId)); } return(Content(result.ToJson())); }