/// <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 AdvancedFieldMaps</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 7/4/2012 2:40:13 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// internal static AdvancedFieldMaps PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper) { AdvancedFieldMaps list = new AdvancedFieldMaps(); if (rdr.Read()) { AdvancedFieldMap obj = new AdvancedFieldMap(); PopulateObjectFromReader(obj, rdr); list.Add(obj); while (rdr.Read()) { obj = new AdvancedFieldMap(); PopulateObjectFromReader(obj, rdr); list.Add(obj); } oDatabaseHelper.Dispose(); return list; } else { oDatabaseHelper.Dispose(); return null; } }
/// <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 AdvancedFieldMaps</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 7/4/2012 2:40:13 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// internal static AdvancedFieldMaps PopulateObjectsFromReader(IDataReader rdr) { AdvancedFieldMaps list = new AdvancedFieldMaps(); while (rdr.Read()) { AdvancedFieldMap obj = new AdvancedFieldMap(); PopulateObjectFromReader(obj,rdr); list.Add(obj); } return list; }