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); }
private PariDetail Map(SqlDataReader reader) { String id = reader["id"].ToString(); Pari pari = new PariDAO(connexion).SelectOne("WHERE id='" + reader["pari"] + "'"); Equipe equipe = new EquipeDAO(connexion).Select("WHERE id='" + reader["equipe"] + "'").First(); int compensation = int.Parse(reader["compensation"].ToString()); float montant = float.Parse(reader["montant"].ToString()); float ecartMax = float.Parse(reader["ecartMax"].ToString()); float ecart = float.Parse(reader["ecart"].ToString()); float montantEcart = float.Parse(reader["montantEcart"].ToString()); return(new PariDetail(id, pari, equipe, compensation, montant, ecartMax, ecart, montantEcart)); }