Example #1
0
        /// <summary>
        /// Liste tous les types de la base
        /// </summary>
        /// <returns>Types contenu en base</returns>
        public Types Lister()
        {
            Types liste = new Types();

            con.Open();
            try
            {
                IDbCommand com = con.CreateCommand();
                com.CommandText = "SELECT * FROM Type";
                IDataReader reader = com.ExecuteReader();
                while (reader.Read())
                {
                    Metier.Type d = reader2Type(reader);
                    liste.Ajouter(d);
                }
            }
            finally
            {
                con.Close();
            }
            return(liste);
        }