protected CollectionBase GenerateCustomFieldCollectionFromReader(IDataReader returnData) { CustomFieldCollection cfCollection = new CustomFieldCollection(); while (returnData.Read()) { CustomField cf = new CustomField((int)returnData["CustomFieldId"], (int)returnData["ProjectId"], (string)returnData["CustomFieldName"], (ValidationDataType)returnData["CustomFieldDataType"], (bool)returnData["CustomFieldRequired"], (string)returnData["CustomFieldValue"]); cfCollection.Add(cf); } return(cfCollection); }