public static void DisplayModal(DateTime date, string trackCode, string horseName, int raceNumber)
 {
     if (!DateOfRace.RaceExistsInDb(trackCode, date, raceNumber))
     {
         MessageBox.Show("Sorry, race does not exist in the data base!");
     }
     else
     {
         var form = new ShowFractionsForTheDayForm(date, trackCode, horseName, raceNumber, null);
         form.ShowDialog();
     }
 }
 public static void DisplayModal(BrisPastPerformance pp)
 {
     DateTime date = pp.Date;
     string trackCode = pp.TrackCode;
     string horseName = pp.Parent.Name;
     int raceNumber = Convert.ToInt32(pp.RaceNumber);
     if (!DateOfRace.RaceExistsInDb(trackCode, date, raceNumber))
     {
         string caption = string.Format("{0}, {1}", trackCode, Utilities.GetFullDateString(Utilities.GetDateInYYYYMMDD(date)));
         MessageBox.Show("Sorry, race does not exist in the data base!", caption);
     }
     else
     {
         var form = new ShowFractionsForTheDayForm(date, trackCode, horseName, raceNumber, pp);
         form.ShowDialog();
     }
 }