/// <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 MailApprovals</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 12/17/2012 12:22:55 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// internal static MailApprovals PopulateObjectsFromReaderWithCheckingReader(IDataReader rdr, DatabaseHelper oDatabaseHelper, string ConnectionString) { MailApprovals list = new MailApprovals(); if (rdr.Read()) { MailApproval obj = new MailApproval(ConnectionString); PopulateObjectFromReader(obj, rdr); list.Add(obj); while (rdr.Read()) { obj = new MailApproval(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 MailApprovals</returns> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 12/17/2012 12:22:55 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// internal static MailApprovals PopulateObjectsFromReader(IDataReader rdr, string ConnectionString) { MailApprovals list = new MailApprovals(); while (rdr.Read()) { MailApproval obj = new MailApproval(ConnectionString); PopulateObjectFromReader(obj,rdr); list.Add(obj); } return list; }