private IEnumerable <Team> GetTeamsByRoundPrivate(int roundId) { Round round = DalRound.GetRound(roundId); if (round == null) { return(new Team[0]); } if (string.IsNullOrWhiteSpace(round.TeamList)) { return(DalTeam.GetTeams()); } var teamIds = JsonConvert.DeserializeObject <int[]>(round.TeamList); if (teamIds == null) { return(new Team[0]); } if (teamIds.Length == 0) { return(DalTeam.GetTeams()); } return(DalTeam.GetTeams(teamIds)); }
public IEnumerable <Team> SearchByDefault(string text, int roundId) { Round round = DalRound.GetRound(roundId); if (round == null) { return(new Team[0]); } if (string.IsNullOrWhiteSpace(round.TeamList)) { return(SearchByDefault(text)); } var teamIds = JsonConvert.DeserializeObject <int[]>(round.TeamList); if (teamIds == null) { return(new Team[0]); } if (teamIds.Length == 0) { return(SearchByDefault(text)); } return(DalTeam.SearchByDefault(text, teamIds)); }
public IEnumerable <Team> GetTeams(IEnumerable <int> ids) { string cacheKey = GetStringKey("GetTeams", ids); IEnumerable <Team> result = Cache.GetOrCreate(cacheKey, () => { return(DalTeam.GetTeams(ids)); }); return(result); }
public IEnumerable <Team> SearchByTypeDefault(string text, int typeId) { if (string.IsNullOrWhiteSpace(text)) { return(new Team[0]); } return(DalTeam.SearchByTypeDefault(text, typeId)); }
//public long DeleteData() //{ // DalTeam dalTeam = new DalTeam(); // long status; // status = 0; // try // { // status = dalTeam.DeleteTeam(this); // dalTeam = null; // } // catch (Exception ex) // { // } // return status; //} //public void SelectData() //{ // DalTeam dalTeam = new DalTeam(); // ITeam iTeam; // iTeam = (ITeam)dalTeam.SelectTeam(this); // //_ShortName = iTeam.ShortName; // //_Name = iTeam.Name; // //_Address1 = iTeam.Address1; // //_Address2 = iTeam.Address2; // //_Address3 = iTeam.Address3; // //_Active = iTeam.Active; // dalTeam = null; //} public DataTable SelectAllData() { DataTable dtbl = new DataTable(); DalTeam dalTeam = new DalTeam(); dtbl = dalTeam.SelectAllTeam(this); dalTeam = null; return(dtbl); }
public long DeleteData() { _UserAction = 3; DalTeam dalTeam = new DalTeam(); long status; status = 0; try { status = dalTeam.DeleteTeam(this); dalTeam = null; } catch (Exception ex) { } return(status); }
public long UpdateData() { DalTeam dalTeam = new DalTeam(); long status; status = 0; try { _UserAction = 2; status = dalTeam.UpdateTeam(this); dalTeam = null; } catch (Exception ex) { } return(status); }
public Team GetTeam(int id) { return(DalTeam.GetTeam(id)); }
public int SaveTeam(Team entity) { return(DalTeam.SaveTeam(entity)); }
public IEnumerable <Team> GetTeams() { return(DalTeam.GetTeams()); }
public IEnumerable <Team> GetTeamsByTypeAndParent(int teamTypeId, int parentTeamId) { return(DalTeam.GetTeamsByTypeAndParent(teamTypeId, parentTeamId)); }
public IEnumerable <Team> GetTeamsByType(int teamTypeId) { return(DalTeam.GetTeamsByType(teamTypeId)); }