/// <summary> /// returns the collection of BDE from database /// </summary> /// <returns>the collection of BDE from database</returns> public Collection <BDE> GetBDEList() { var bdeList = new Collection <BDE>(); var user = Singleton <User> .GetInstance(); DataTable dt = db.Select($"SELECT * FROM bde"); foreach (DataRow dr in dt.Rows) { var acc = GetAccountFromID(int.Parse(dr["accountid"].ToString())); BDE bde = new BDE(int.Parse(dr["idBDE"].ToString()), dr["name"].ToString(), dr["departement"].ToString(), dr["imageUrl"].ToString(), acc); bdeList.Add(bde); } return(bdeList); }