public virtual string GetFieldList(Map map) { string list = GetFieldList(); if (!string.IsNullOrEmpty(list)) { list += string.Format(", {0}", ParentLinkFieldName); } return list; }
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); } }
public virtual DataTable GetDataTable(Map map) { DataTable table = GetDataTable(map.Name); table.Columns.Add(ParentLinkFieldName, map.Root.Identifier.Type); return table; }