Beispiel #1
0
        /// <summary>
        /// Loads a collection of Salutation objects from the database.
        /// </summary>
        /// <returns>A collection containing all of the Salutation objects in the database.</returns>
        public static SalutationCollection LoadCollection(string spName, SqlParameter[] parms)
        {
            SalutationCollection result = new SalutationCollection();

            using (SqlDataReader reader = SqlHelper.Default.ExecuteReader(spName, parms))
            {
                while (reader.Read())
                {
                    Salutation tmp = new Salutation();
                    tmp.LoadFromReader(reader);
                    result.Add(tmp);
                }
            }
            return(result);
        }