public override bool Equals(object obj) { MainTeam a = obj as MainTeam; if (obj == null) { return(false); } return(a.MainTeamID == this.MainTeamID); }
public bool AddNewMainTeam(MainTeam t) { try { context.Teams.Add(t); context.SaveChanges(); return(true); } catch { return(false); } }
public bool InactivateMainTeam(int id) { MainTeam team = this.GetMainTeamByID(id); try { team.Active = false; context.SaveChanges(); return(true); } catch { return(false); } }
public bool RemoveLeagueTeams(int leagueid, MainTeam t) { League l = GetLeagueByID(leagueid); try { l.MainTeams.Remove(t); context.SaveChanges(); return(true); } catch { return(false); } }
public bool UpdateMainTeamWebsite(int id, string website) { MainTeam t = this.GetMainTeamByID(id); try { t.Website = website; context.SaveChanges(); return(true); } catch { return(false); } }
public bool AddTeamToLadder(int id, MainTeam t) { Ladder l = this.GetLadderById(id); try { l.MainTeams.Add(t); context.SaveChanges(); return(true); } catch { return(false); } }
public bool RemoveTeamFromLadder(int id, MainTeam t) { Ladder l = this.GetLadderById(id); try { l.MainTeams.Remove(t); context.SaveChanges(); return(true); } catch { return(false); } }
public bool AddLeagueTeams(int leagueid, MainTeam t) { League q = GetLeagueByID(leagueid); try { q.MainTeams.Add(t); context.SaveChanges(); return(true); } catch { return(false); } }
public bool UpdateGamerMainTeam(int gamerID, MainTeam mt) { Gamer g = this.GetGamerById(gamerID); g.MainTeam = mt; try { context.SaveChanges(); return(true); } catch { return(false); } }
public int CompareTo(object obj) { MainTeam team = obj as MainTeam; return(this.TeamName.CompareTo(team.TeamName)); }