コード例 #1
0
        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];
            }
        }
コード例 #2
0
        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;
            }
        }