private void ShowPreviousTour() { var tours = League.Tours; int indexOfTour = Array.IndexOf(tours, Tour); IndexCarer.Decrement(ref indexOfTour, 0); if (tours.Length > 0) { using (var repository = new GameRepository(DatabaseSourceDefinitor.ConnectionString)) { GamesInTour = repository.GetGamesInTour(tours[indexOfTour].Id); } Tour = tours[indexOfTour]; } }
private void ShowPreviousSeason() { int indexOfLeague = Array.IndexOf(Leagues, League); IndexCarer.Decrement(ref indexOfLeague, 0); if (Leagues.Length > 0) { League = Leagues[indexOfLeague]; Tour = League.Tours[0]; using (var repository = new GameRepository(DatabaseSourceDefinitor.ConnectionString)) { GamesInTour = repository.GetGamesInTour(Tour.Id); } League.Calculate(); TeamsStat = League.TeamStats; } }