Clean up, add DataRow Extension
This commit is contained in:
@@ -32,10 +32,10 @@ Namespace Templates
|
||||
|
||||
For Each oRow As DataRow In oTable.Rows
|
||||
Dim oTemplate As New Template With {
|
||||
.Name = GetRowItem(oRow, "NAME", String.Empty),
|
||||
.Description = GetRowItem(oRow, "DESCRIPTION", String.Empty),
|
||||
.FileName = GetRowItem(oRow, "FILE_NAME", String.Empty),
|
||||
.IsImport = GetRowItem(oRow, "IS_IMPORT", True)
|
||||
.Name = oRow.ItemEx("NAME", String.Empty),
|
||||
.Description = oRow.ItemEx("DESCRIPTION", String.Empty),
|
||||
.FileName = oRow.ItemEx("FILE_NAME", String.Empty),
|
||||
.IsImport = oRow.ItemEx("IS_IMPORT", True)
|
||||
}
|
||||
|
||||
oTemplates.Add(oTemplate)
|
||||
@@ -59,13 +59,13 @@ Namespace Templates
|
||||
|
||||
For Each oRow As DataRow In oTable.Rows
|
||||
Dim oTemplate As New MappingConfig With {
|
||||
.OrderKey = GetRowItem(oRow, "ORDER_KEY", String.Empty),
|
||||
.SourceName = GetRowItem(oRow, "SOURCE_NAME", String.Empty),
|
||||
.SourceItem = GetRowItem(oRow, "SOURCE_ITEM", String.Empty),
|
||||
.SourceRegex = GetRowItem(oRow, "SOURCE_REGEX", String.Empty),
|
||||
.DestinationName = GetRowItem(oRow, "DESTINATION_NAME", String.Empty),
|
||||
.DestinationItem = GetRowItem(oRow, "DESTINATION_ITEM", String.Empty),
|
||||
.DestinationValue = GetRowItem(oRow, "DESTINATION_VALUE", String.Empty)
|
||||
.OrderKey = oRow.ItemEx("ORDER_KEY", String.Empty),
|
||||
.SourceName = oRow.ItemEx("SOURCE_NAME", String.Empty),
|
||||
.SourceItem = oRow.ItemEx("SOURCE_ITEM", String.Empty),
|
||||
.SourceRegex = oRow.ItemEx("SOURCE_REGEX", String.Empty),
|
||||
.DestinationName = oRow.ItemEx("DESTINATION_NAME", String.Empty),
|
||||
.DestinationItem = oRow.ItemEx("DESTINATION_ITEM", String.Empty),
|
||||
.DestinationValue = oRow.ItemEx("DESTINATION_VALUE", String.Empty)
|
||||
}
|
||||
|
||||
oMappingConfigList.Add(oTemplate)
|
||||
@@ -89,19 +89,19 @@ Namespace Templates
|
||||
|
||||
For Each oRow As DataRow In oTable.Rows
|
||||
Dim oColumn As New ColumnConfig() With {
|
||||
.Template = GetRowItem(oRow, "TEMPLATE_NAME", String.Empty),
|
||||
.Table = GetRowItem(oRow, "XML_TABLE", String.Empty),
|
||||
.Name = GetRowItem(oRow, "XML_ITEM", String.Empty),
|
||||
.Type = ColumnConfig.ConvertType(GetRowItem(oRow, "DATA_TYPE", String.Empty)),
|
||||
.OrderKey = GetRowItem(oRow, "ORDER_KEY", 0),
|
||||
.IsReadOnly = GetRowItem(oRow, "IS_READ_ONLY", False),
|
||||
.IsVisible = GetRowItem(oRow, "IS_VISIBLE", True),
|
||||
.IsRequired = GetRowItem(oRow, "IS_REQUIRED", False),
|
||||
.IsHead = GetRowItem(oRow, "IS_HEAD", True),
|
||||
.Template = oRow.ItemEx("TEMPLATE_NAME", String.Empty),
|
||||
.Table = oRow.ItemEx("XML_TABLE", String.Empty),
|
||||
.Name = oRow.ItemEx("XML_ITEM", String.Empty),
|
||||
.Type = ColumnConfig.ConvertType(ItemEx(oRow, "DATA_TYPE", String.Empty)),
|
||||
.OrderKey = oRow.ItemEx("ORDER_KEY", 0),
|
||||
.IsReadOnly = oRow.ItemEx("IS_READ_ONLY", False),
|
||||
.IsVisible = oRow.ItemEx("IS_VISIBLE", True),
|
||||
.IsRequired = oRow.ItemEx("IS_REQUIRED", False),
|
||||
.IsHead = oRow.ItemEx("IS_HEAD", True),
|
||||
.[Function] = New ColumnConfig.ColumnFunction With {
|
||||
.Id = GetRowItem(oRow, "FUNCTION_ID", 0),
|
||||
.Name = GetRowItem(oRow, "FUNCTION_NAME", String.Empty),
|
||||
.Params = GetRowItem(oRow, "FUNCTION_PARAMETERS", String.Empty)
|
||||
.Id = oRow.ItemEx("FUNCTION_ID", 0),
|
||||
.Name = oRow.ItemEx("FUNCTION_NAME", String.Empty),
|
||||
.Params = oRow.ItemEx("FUNCTION_PARAMETERS", String.Empty)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user