internal static ContactMasters PopulateelementsFromReader(IDataReader rdr, string ConnectionString) { ContactMasters list = new ContactMasters(); while (rdr.Read()) { ContactMaster obj = new ContactMaster(ConnectionString); PopulateelementFromReader(obj, rdr); list.Add(obj); } return list; }
/// <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 ContactMasters</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 1/11/2010 2:53:38 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// internal static ContactMasters PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper, string ConnectionString) { ContactMasters list = new ContactMasters(); if (rdr.Read()) { ContactMaster obj = new ContactMaster(ConnectionString); PopulateObjectFromReader(obj, rdr); list.Add(obj); while (rdr.Read()) { obj = new ContactMaster(ConnectionString); PopulateObjectFromReader(obj, rdr); list.Add(obj); } oDatabaseHelper.Dispose(); return list; } else { oDatabaseHelper.Dispose(); return null; } }