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