Beispiel #1
0
		public virtual string GetFieldList(Map map)
		{
			string list = GetFieldList();
			if (!string.IsNullOrEmpty(list))
			{
				list += string.Format(", {0}", ParentLinkFieldName);
			}
			
			return list;
		}
Beispiel #2
0
		public virtual void AddDataRow(DataTable table, IDataRecord record, IDataConverter dataConverter, Map map)
		{
			if (table != null && record != null)
			{
				DataRow row = table.NewRow();
			
				foreach (Field field in Fields)
				{
					row[field.Name] = dataConverter.GetEntityValue(record[field.Name], field.Type);
				}
				
				if (record.GetOrdinal(DateModifiedFieldName) > -1)
				{
					row[DateModifiedFieldName] = dataConverter.GetEntityValue(record[DateModifiedFieldName], typeof(DateTime));
				}
				
				if (map != null && record.GetOrdinal(ParentLinkFieldName) > -1)
				{
					row[ParentLinkFieldName] = dataConverter.GetEntityValue(record[ParentLinkFieldName], map.Root.Identifier.Type);
				}
				
				table.Rows.Add(row);
			}
		}
Beispiel #3
0
		public virtual DataTable GetDataTable(Map map)
		{
			DataTable table = GetDataTable(map.Name);
			table.Columns.Add(ParentLinkFieldName, map.Root.Identifier.Type);
			return table;
		}