/// <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 ListContactMasters</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 11/6/2009 11:39:08 AM Created function /// /// </RevisionHistory> /// /// </remarks> /// internal static ListContactMasters PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper, string ConnectionString) { ListContactMasters list = new ListContactMasters(); if (rdr.Read()) { ListContactMaster obj = new ListContactMaster(ConnectionString); PopulateObjectFromReader(obj, rdr); list.Add(obj); while (rdr.Read()) { obj = new ListContactMaster(ConnectionString); 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 ListContactMasters</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 11/6/2009 11:39:08 AM Created function /// /// </RevisionHistory> /// /// </remarks> /// internal static ListContactMasters PopulateObjectsFromReader(IDataReader rdr, string ConnectionString) { ListContactMasters list = new ListContactMasters(); while (rdr.Read()) { ListContactMaster obj = new ListContactMaster(ConnectionString); PopulateObjectFromReader(obj,rdr); list.Add(obj); } return list; }