public JsonResult ValidateTeamName(string TeamName, string TeamID) { if (TeamID == "undefined") { if (_validateService.CheckTeamName(TeamName)) { return(Json(" is in use", JsonRequestBehavior.AllowGet)); } return(Json(true, JsonRequestBehavior.AllowGet)); } if (_validateService.CheckTeamName(TeamName) && _validateService.CheckTeam(TeamName, TeamID)) { return(Json(" is in use", JsonRequestBehavior.AllowGet)); } return(Json(true, JsonRequestBehavior.AllowGet)); }