/// <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 LinkDetails</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 12/16/2009 3:09:15 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// internal static LinkDetails PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper, string ConnectionString) { LinkDetails list = new LinkDetails(); if (rdr.Read()) { LinkDetail obj = new LinkDetail(ConnectionString); PopulateObjectFromReader(obj, rdr); list.Add(obj); while (rdr.Read()) { obj = new LinkDetail(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 LinkDetails</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 12/16/2009 3:09:15 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// internal static LinkDetails PopulateObjectsFromReader(IDataReader rdr, string ConnectionString) { LinkDetails list = new LinkDetails(); while (rdr.Read()) { LinkDetail obj = new LinkDetail(ConnectionString); PopulateObjectFromReader(obj, rdr); list.Add(obj); } return list; }