Ejemplo n.º 1
0
 public JsonResult VerifyUserName(string field, string value)
 {
     AjaxResult result = new AjaxResult();
     try
     {
         userService = new UserService();
         if (!userService.VerifyUserInfo(field, value))
         {
             result.ExceptionInfo = "该用户名已经被注册!";
             result.ErrorCode = 103;
         }
     }
     catch (Exception ex)
     {
         LogService.Log("VerifyUserName", ex.ToString());
         result.ExceptionInfo = "出错了!";
         result.ErrorCode = 102;
     }
     return Json(result);
 }