public List <Societe> Recuperer() { List <Societe> establishment = new List <Societe>(); string sel = "select * from Societes"; DataSet SetSociete = MaBD.Selection(sel); DataTable TableSociete = SetSociete.Tables[0]; foreach (DataRow RowSociete in TableSociete.Rows) { establishment.Add(new Societe(RowSociete)); } return(establishment); }
public ObservableCollection <Proprietaire> Recuperer() { ObservableCollection <Proprietaire> establishment = new ObservableCollection <Proprietaire>(); string sel = "select * from proprietaires"; DataSet SetProprietaire = MaBD.Selection(sel); DataTable TableProprietaire = SetProprietaire.Tables[0]; foreach (DataRow RowProprietaire in TableProprietaire.Rows) { establishment.Add(new Proprietaire(RowProprietaire)); } return(establishment); }