예제 #1
0
 public Retrait(Int32 id, Int32 quantiteMedicament, DateTime dateRetrait, Medecin leMedecin, Medicament leMedicament, Utilisateur lUtilisateur)
 {
     this.id = id;
     this.quantiteMedicament = quantiteMedicament;
     this.dateRetrait        = dateRetrait;
     this.leMedecin          = leMedecin;
     this.leMedicament       = leMedicament;
     this.lUtilisateur       = lUtilisateur;
 }
예제 #2
0
        public static List <Medecin> getLesMedecins()
        {
            List <Medecin> laListe   = new List <Medecin>();
            SqlConnection  connexion = ouvrirConnexion();
            String         requete   = "select * from Medecin join Service on Medecin.idService = Service.id";
            SqlCommand     commande  = new SqlCommand(requete, connexion);
            SqlDataReader  resultat  = commande.ExecuteReader();

            while (resultat.Read())
            {
                Int32   id         = (Int32)resultat["id"];
                String  nom        = (String)resultat["Medecin.nom"];
                String  prenom     = (String)resultat["prenom"];
                String  mail       = (String)resultat["mail"];
                String  tel        = (String)resultat["numTel"];
                Int32   idService  = (Int32)resultat["Service.id"];
                String  nomService = (String)resultat["Service.nom"];
                Int32   etage      = (Int32)resultat["etage"];
                Service leService  = new Service(idService, nomService, etage);
                Medecin leMedecin  = new Medecin(id, nom, prenom, mail, tel, leService);
                laListe.Add(leMedecin);
            }
            return(laListe);
        }