/// <summary> /// Populate business objects from the data reader /// </summary> /// <param name="dataReader">data reader</param> /// <returns>list of clsContacts</returns> internal List <clsLate> PopulateObjectsFromReader(IDataReader dataReader) { List <clsLate> list = new List <clsLate>(); while (dataReader.Read()) { clsLate businessObject = new clsLate(); PopulateBusinessObjectFromReader(businessObject, dataReader); list.Add(businessObject); } return(list); }
internal void PopulateBusinessObjectFromReader2(clsLate businessObject, IDataReader dataReader) { businessObject.MONTH = dataReader.GetString(dataReader.GetOrdinal(clsLate.clsLateFields.MONTH.ToString())); businessObject.NUMBER_OF_LATE = dataReader.GetInt32(dataReader.GetOrdinal(clsLate.clsLateFields.NUMBER_OF_LATE.ToString())); }
/// <summary> /// Populate business object from data reader /// </summary> /// <param name="businessObject">business object</param> /// <param name="dataReader">data reader</param> internal void PopulateBusinessObjectFromReader(clsLate businessObject, IDataReader dataReader) { businessObject.FIRST_NAME = dataReader.GetString(dataReader.GetOrdinal(clsLate.clsLateFields.FIRST_NAME.ToString())); businessObject.STATUS = dataReader.GetInt32(dataReader.GetOrdinal(clsLate.clsLateFields.STATUS.ToString())); }