public JsonResult CheckUserName() { var result = false; var queryStr = Request.Params["userName"]; var queryString = Request.QueryString["Mobile"]; if (queryStr != null) { var svc = new PassportService(); result = svc.CheckUserName(queryStr.ToString()); } if (queryString != null) { var svc = new PassportService(); result = svc.CheckUserName(queryString.ToString()); } return(new JsonNetResult(result)); }