public override Exemplaire Creer(DataRow row) { int numeroExemplaire = (int)row["numExemplaire"]; string codeExemplaire = row["codExemplaire"] as string; string commentaire = row["commentExemplaire"] as string; Exemplaire exemplaire = new Exemplaire(numeroExemplaire, codeExemplaire); Bibliotheque bibliotheque = Bibliotheque.Rechercher(row["codBibliotheque"] as string); exemplaire.Bibliotheque = Bibliotheque.ousine.Creer(row); exemplaire.Emplacement = Emplacement.ousine.Creer(row); exemplaire.Disponible = (bool)row["disponible"]; exemplaire.Livre = Livre.ousine.Creer(row); return(exemplaire); }
private void RetourIhm_Load(object sender, EventArgs e) { try { bibliotheque = Bibliotheque.Rechercher(Properties.Settings.Default.codBibliotheque); } catch (SqlException) { MessageBox.Show("Erreur de connexion !"); } if (bibliotheque == null) { lblBibliotheque.Text = string.Empty; } else { lblBibliotheque.Text = bibliotheque.Libelle; } }