/// <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 ExceptionLogs</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 07/27/2010 11:57:21 AM Created function /// /// </RevisionHistory> /// /// </remarks> /// internal static ExceptionLogs PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper,string connectionstring) { ExceptionLogs list = new ExceptionLogs(); if (rdr.Read()) { ExceptionLog obj = new ExceptionLog(connectionstring); PopulateObjectFromReader(obj, rdr); list.Add(obj); while (rdr.Read()) { obj = new ExceptionLog(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 ExceptionLogs</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 07/27/2010 11:57:21 AM Created function /// /// </RevisionHistory> /// /// </remarks> /// internal static ExceptionLogs PopulateObjectsFromReader(IDataReader rdr,string connectionstring) { ExceptionLogs list = new ExceptionLogs(); while (rdr.Read()) { ExceptionLog obj = new ExceptionLog(connectionstring); PopulateObjectFromReader(obj,rdr); list.Add(obj); } return list; }