Ejemplo n.º 1
0
        public ActionResult Finalize(int gameId)
        {
            var game = _gameService.GetGame(gameId);

            _gameService.CalculateGameStatistics(gameId);
            _gameService.CalculatePlayerRivalryStatistics(gameId);
            _playerService.CalculatePlayerStatistics(game.Date.Month, game.Date.Year, true);
            _holeService.CalculateHoleStatistics(game.Date.Month, game.Date.Year);
            _rankingService.CalculateRankings(game.Date.Month, game.Date.Year);

            return(RedirectToAction("Details", new { id = gameId }));
        }
Ejemplo n.º 2
0
        public ActionResult CalculateHoleStatistics(int month, int year)
        {
            if (month == 0 && year == 0)
            {
                _holeService.CalculateHoleStatistics();
            }
            else
            {
                _holeService.CalculateHoleStatistics(month, year);
            }

            return(RedirectToAction("Index"));
        }