public static Specialite GetSpecialiteDuMedecin(Medecin med)
        {
            Specialite spe = Passerelle.GetSpeMedecin(med.Id);

            med.Specialite = spe;
            return(spe);
        }
 public Rapport(int Id, DateTime Date, string Motif, String Bilan, Visiteur Visiteur, Medecin Medecin)
 {
     id       = Id;
     date     = Date;
     motif    = Motif;
     bilan    = Bilan;
     visiteur = Visiteur;
     medecin  = Medecin;
 }
        private static Medecin MapperLigneMedecin(MySqlDataReader reader)
        {
            string nom, prenom, adresse, tel, id;
            int    departement;

            id          = reader["id"].ToString();
            nom         = (string)reader["nom"];
            prenom      = (string)reader["prenom"];
            adresse     = (string)reader["adresse"];
            tel         = (string)reader["tel"];
            departement = (int)reader["departement"];

            Medecin med = new Medecin(id, nom, prenom, adresse, tel, departement);

            return(med);
        }
        public static Medecin GetMedecin(string idMedecin)
        {
            Medecin         medecin = null;
            MySqlConnection cnx     = InitConnection();

            if (cnx != null)
            {
                string       query = "select * from medecin where id = @idMedecin";
                MySqlCommand cmd   = new MySqlCommand(query, cnx);
                cmd.Parameters.AddWithValue("@idMedecin", idMedecin);
                MySqlDataReader reader = cmd.ExecuteReader();
                if (reader.HasRows)
                {
                    while (reader.Read())
                    {
                        medecin = MapperLigneMedecin(reader);
                    }
                }
                reader.Close();
            }

            return(medecin);
        }