Beispiel #1
0
 private scores GetIndividualRaceScores(List<Greyhound> race)
 {
     _dba = new GHRaceDBAccessService();
     scores sc = new scores();
     sc.Scores = new List<score>();
     foreach (var item in race)
     {
         Greyhound g = _dba.GetGreyhound(item.Name);
         if (g != null)
         {
             sc.Scores.Add(new score
             {
                 Comments = g.Results.First().Comments,
                 scoreField1 = true,
                 NoData = false,
                 GradesUsed = "A1, A2, A3, A4",
                 scoreField2 = FILLERTEXT,
                 scoreField3 = FILLERTEXT,
                 scoreField4 = FILLERTEXT,
                 scoreField5 = FILLERTEXT,
                 scoreField6 = FILLERTEXT,
                 Name = g.Name,
                 Score = random.Next(1, 1000),
                 scoreField7 = FILLERTEXT,
                 Trap = g.Results.First().Trap
             });
         }
     }
     return sc;
 }
Beispiel #2
0
 public HomeController(IRetrieveRaceData retrieveRaceData, ICommonUtilities utils)
 {
     _retrieveRaceData = retrieveRaceData;
     _utils = utils;
     _dba = new GHRaceDBAccessService();
 }