Esempio n. 1
0
        /// <summary>
        /// Populates the fields for multiple objects from the columns found in an open reader.
        /// </summary>
        ///
        /// <param name="rdr" type="IDataReader">An object that implements the IDataReader interface</param>
        ///
        /// <returns>Object of BDTaxTypeCollection</returns>
        ///
        /// <remarks>
        ///
        /// <RevisionHistory>
        /// Author				Date			Description
        /// DLGenerator			12/26/2014 2:45:51 AM		Created function
        ///
        /// </RevisionHistory>
        ///
        /// </remarks>
        ///
        internal static BDTaxTypeCollection PopulateObjectsFromReader(IDataReader rdr)
        {
            BDTaxTypeCollection list = new BDTaxTypeCollection();

            while (rdr.Read())
            {
                BDTaxType obj = new BDTaxType();
                PopulateObjectFromReader(obj, rdr);
                list.Add(obj);
            }
            return(list);
        }
Esempio n. 2
0
        /// <summary>
        /// Populates the fields for multiple objects from the columns found in an open reader.
        /// </summary>
        ///
        /// <param name="rdr" type="IDataReader">An object that implements the IDataReader interface</param>
        ///
        /// <returns>Object of BDTaxTypeCollection</returns>
        ///
        /// <remarks>
        ///
        /// <RevisionHistory>
        /// Author				Date			Description
        /// DLGenerator			12/26/2014 2:45:51 AM		Created function
        ///
        /// </RevisionHistory>
        ///
        /// </remarks>
        ///
        internal static BDTaxTypeCollection PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper)
        {
            BDTaxTypeCollection list = new BDTaxTypeCollection();

            if (rdr.Read())
            {
                BDTaxType obj = new BDTaxType();
                PopulateObjectFromReader(obj, rdr);
                list.Add(obj);
                while (rdr.Read())
                {
                    obj = new BDTaxType();
                    PopulateObjectFromReader(obj, rdr);
                    list.Add(obj);
                }
                oDatabaseHelper.Dispose();
                return(list);
            }
            else
            {
                oDatabaseHelper.Dispose();
                return(null);
            }
        }