public JsonResult CheckDuplicateUserName(string loginName) { bool flag; flag = _agentProvider.CheckDuplicateUsername(loginName); JsonResult res = new JsonResult { Data = flag }; return(res); }