Exemple #1
0
 public void GenerateScores()
 {
     int n = random.Next(1, 5);
      string[] playerNames = players.Split(',');
      foreach (string pName in playerNames)
      {
          for (int i = 0; i < n; i++)
          {
              BallKick bk = new BallKick();
              bk.Score = random.Next(100);
              bk.PlayerName = pName;
              bk.DateRegistered = new DateTime(DateTime.Now.Year, DateTime.Now.Month, random.Next(1, DateTime.Now.Day));
              KicksManager.SaveBallKick(bk);
          }
      }
 }
 public static void SaveBallKick(BallKick b)
 {
     Siaqodb database = DatabaseFactory.GetInstance();
     database.StoreObject(b);
 }