Ejemplo n.º 1
0
        public void LoadBoxScoreRange()
        {
            // DateTime processDate = GameDate;
            while (_oSeasonInfo.GameDate < DateTime.Today)
            {
                int NumOfMatchups = 0;
                try
                {
                    NumOfMatchups = LoadBoxScore(_oSeasonInfo.GameDate);
                }
                catch (Exception ex)
                {
                    throw new Exception(SysDAL.DALfunctions.StackTraceFormat(ex));
                }

                Console.WriteLine($"Processed {_oSeasonInfo.GameDate} - {DateTime.Now} - Matchups: {NumOfMatchups}");
                _oSeasonInfo.GetNextGameDate();
            }
        }
Ejemplo n.º 2
0
        public DateTime DefaultDate = Convert.ToDateTime("1/1/2000"); // kdtodo move to constants
        // Constructor
        public LoadBoxScores(string LeagueName, string strLoadDateTime, DateTime StartGameDate)
        {
            new LeagueInfoDO(LeagueName, _oLeagueDTO, _ConnectionString); // Init _oLeagueDTO
            _strLoadDateTime = strLoadDateTime;
            DateTime GameDate = BoxScoreDO.GetMaxBoxScoresGameDate(_ConnectionString, LeagueName, DefaultDate);

            if (GameDate == DefaultDate)
            {
                GameDate = StartGameDate;
            }
            else
            {
                GameDate = GameDate.AddDays(1);
            }

            _oSeasonInfo = new SeasonInfoDO(GameDate, _oLeagueDTO.LeagueName);
            if (_oSeasonInfo.oSeasonInfoDTO.Bypass)
            {
                _oSeasonInfo.GetNextGameDate();
            }
            //
            RotationDO.DeleteRestOfRotation(GameDate, LeagueName);
        }