Exemple #1
0
 public Departage(SqlConnection connection)
 {
     this.connection = connection;
     this.ppdao      = new ProchainePartieDAO(connection);
     this.padao      = new PariDAO(connection);
     this.paddao     = new PariDetailDAO(connection);
     this.jodao      = new JonctionDAO(connection);
 }
Exemple #2
0
        private Pari Map(SqlDataReader reader)
        {
            String          id       = reader["id"].ToString();
            Client          client   = new ClientDAO(connexion).SelectOne("WHERE id='" + reader["client"] + "'");
            ProchainePartie partie   = new ProchainePartieDAO(connexion).Select("WHERE id='" + reader["partie"] + "'").First();
            int             typePari = int.Parse(reader["typePari"].ToString());

            Models.Action action       = new ActionDAO(connexion).Select("WHERE id='" + reader["action"] + "'").First();
            int           equilibre    = int.Parse(reader["equilibre"].ToString());
            int           regleEgalite = int.Parse(reader["regleEgalite"].ToString());

            return(new Pari(id, client, partie, typePari, action, equilibre, regleEgalite));
        }