Esempio n. 1
0
        private void LoadCurrentRaceInfo(DateTime date, string trackCode, int raceNumber)
        {
            _currentRaceInfo = null;
            string sql = string.Format(
                @"SELECT RACE_ID, DISTANCE, ABOUT_DISTANCE_FLAG, SURFACE, TRACK_CODE, TRACK_CONDITION FROM RACE_DESCRIPTION
                WHERE DATE_OF_THE_RACE = '{0}' AND TRACK_CODE = '{1}' AND RACE_NUMBER = {2}", Utilities.GetDateInYYYYMMDD(date), trackCode, raceNumber);

            using (var dbr = new DbReader())
            {
                if (dbr.Open(sql))
                {
                    while (dbr.MoveToNextRow())
                    {
                        _currentRaceInfo = new RaceInfo();
                        _currentRaceInfo.AboutFlag = dbr.GetValue<string>("ABOUT_DISTANCE_FLAG");
                        _currentRaceInfo.Distance = dbr.GetValue<double>("DISTANCE");
                        _currentRaceInfo.RaceId = dbr.GetValue<int>("RACE_ID");
                        _currentRaceInfo.Surface = dbr.GetValue<string>("SURFACE");
                        _currentRaceInfo.TrackCondition = dbr.GetValue<string>("TRACK_CONDITION");
                        _currentRaceInfo.TrackCode = trackCode;

                    }
                }
            }
        }
 private void SetCurrentRaceInfo(RaceInfo ri)
 {
     _winners = null;
     _currentRaceInfo = ri;
     LoadWinners();
 }
Esempio n. 3
0
 public void Clear()
 {
     _timeComparisonCtrl.Clear();
     _currentRaceInfo = null;
     _labelHorseName.Text = "";
 }