Compare commits

...

65 Commits

Author SHA1 Message Date
Jonathan Jenne
4e3b08038a Version 1.4.4.3 2024-01-15 08:23:25 +01:00
Jonathan Jenne
7c683cf13e Don't run price procedure in transaction 2024-01-15 08:23:16 +01:00
Jonathan Jenne
6eedcc687f Version 1.4.4.2 2023-11-07 10:51:19 +01:00
Jonathan Jenne
62708c02ef Fix table loading 2023-11-07 10:51:00 +01:00
Jonathan Jenne
4a6a8ded7c Version 1.4.4.1 2023-11-07 10:19:49 +01:00
Jonathan Jenne
25e9713c2c Remove Language, Filesystem modules 2023-11-07 10:19:30 +01:00
Jonathan Jenne
a0e5b4aa0b Version 1.4.4.0 2023-11-07 10:02:12 +01:00
Jonathan Jenne
dc4955db17 Only process active articles 2023-11-07 10:02:04 +01:00
Jonathan Jenne
34c8ecbee5 Fix logging in DocumentLoader 2023-11-07 10:01:22 +01:00
Jonathan Jenne
c1fa500f36 Improve Logging for frmConfig 2023-11-07 10:00:47 +01:00
Jonathan Jenne
f67368c1d9 Version 1.4.3.0 2023-10-25 16:08:17 +02:00
Jonathan Jenne
a5ae2118b3 Fix Language Module deprecation, Fix updated Tables, Fix missing null check for Config form 2023-10-25 16:07:57 +02:00
Jonathan Jenne
0fe344eefb Version 1.4.2.0 2023-10-04 14:13:01 +02:00
Jonathan Jenne
a68697a9e2 Disable export button while exporting 2023-10-04 14:12:39 +02:00
Jonathan Jenne
7cd4aa80cd Fix version 2023-09-14 08:41:52 +02:00
Jonathan Jenne
47e7de3c69 Version 1.4.1.0 2023-09-14 08:41:22 +02:00
Jonathan Jenne
77e760f9b4 Update Modules 2023-09-13 16:13:10 +02:00
Jonathan Jenne
7b3a36336a Version 1.4.0.0 2023-06-26 11:29:26 +02:00
Jonathan Jenne
68e4c59e63 Add support for multiple functions per field, add ADDRESS function 2023-06-26 11:27:51 +02:00
Jonathan Jenne
7846e660b9 Set lookupMandator to disabled on first start 2023-06-05 09:47:05 +02:00
Jonathan Jenne
dddb1dc53a Add error when price calculation was not successful 2023-05-24 15:16:10 +02:00
Jonathan Jenne
47407ac79a Version 1.3.9.9: Disable mandator before files are loaded 2023-05-24 13:59:14 +02:00
Jonathan Jenne
22bb9b14a1 Version 1.3.9.8 2023-03-27 10:45:48 +02:00
Jonathan Jenne
90029ab0f2 Handle same element occurring twice in a node, add warning 2023-03-27 10:45:07 +02:00
Jonathan Jenne
0eb8eaad2d Version 1.3.9.7 2022-11-29 10:47:00 +01:00
Jonathan Jenne
9094f8abe8 Update NLog to Version 5 2022-11-29 10:46:36 +01:00
Jonathan Jenne
7c0ccb7184 Version 1.3.9.6 2022-10-10 11:45:48 +02:00
Jonathan Jenne
2da202a2a7 Improve logging 2022-10-10 11:45:25 +02:00
Jonathan Jenne
16ace2c242 Show last modified date for templates 2022-10-10 11:45:08 +02:00
Jonathan Jenne
8a1bb6911f Version 1.3.9.5 2022-10-10 09:35:51 +02:00
Jonathan Jenne
a63bf73ca6 Fix dependencies, improve logging 2022-10-10 09:35:28 +02:00
Jonathan Jenne
6325fd7e68 Version 1.3.9.4 2022-09-05 11:28:41 +02:00
Jonathan Jenne
371305fb41 fix column names in config 2022-09-05 11:28:19 +02:00
Jonathan Jenne
608b077671 setup fix 2022-09-05 11:28:04 +02:00
Jonathan Jenne
34bc0004d2 Version 1.3.9.3 2022-07-04 12:55:38 +02:00
Jonathan Jenne
7363a8036e Remove backup project files 2022-07-04 12:55:31 +02:00
Jonathan Jenne
73bc1517f3 Add logging for ApplyItemFiltersForExport, fix xpath bug 2022-07-04 12:54:37 +02:00
Jonathan Jenne
dc14c80d59 Version 1.3.9.2 2022-07-04 11:50:05 +02:00
Jonathan Jenne
916e12cae7 Fix EAN, only change xml if a valid value was found 2022-07-04 11:49:37 +02:00
Jonathan Jenne
05dab8d045 Version 1.3.9.1 2022-07-04 09:13:05 +02:00
Jonathan Jenne
f0a340f742 Add configuration to autoload data on form open 2022-07-04 09:10:38 +02:00
Jonathan Jenne
a0217d0582 Version 1.3.9 2022-07-01 11:37:38 +02:00
Jonathan Jenne
fe4038f1c8 Add Filters, Fix Column Names, Improve Config 2022-07-01 11:37:11 +02:00
Jonathan Jenne
10565fb1da WIP: Filters 2022-06-28 16:25:39 +02:00
Jonathan Jenne
42b1ca72a6 Disable Input Directory for export 2022-06-28 15:55:29 +02:00
Jonathan Jenne
616e35f885 Version 1.3.8 2022-06-20 15:03:30 +02:00
Jonathan Jenne
adad5501f3 Consolidate parameter format and logic 2022-06-20 15:00:49 +02:00
Jonathan Jenne
b3140c48c5 Version 1.3.7 2022-06-10 11:49:01 +02:00
Jonathan Jenne
a8ca303f5e Support import without printing documents 2022-06-10 11:48:41 +02:00
Jonathan Jenne
5f335b4fee Version 1.3.6 2022-06-03 15:22:53 +02:00
Jonathan Jenne
beb0ee8ae5 simplify getdocumentfromdatarow 2022-05-25 10:45:54 +02:00
Jonathan Jenne
143823aae2 First attempt at fixing documenttype dependent export status 2022-05-24 16:10:34 +02:00
Jonathan Jenne
b460618548 Version 1.3.5 2022-05-13 15:18:00 +02:00
Jonathan Jenne
0258560221 show all errors in import grids 2022-05-13 15:16:52 +02:00
Jonathan Jenne
dc657c32a5 fix bug in Runningnumber versioning, improve handling of optional fields with functions 2022-05-13 15:03:25 +02:00
Jonathan Jenne
e168c65ca9 Version 1.3.4 2022-05-13 13:54:46 +02:00
Jonathan Jenne
bc8289e1b7 Improve logging 2022-05-13 13:54:24 +02:00
Jonathan Jenne
cd1cdfe19a add clipboard handler for all grids 2022-05-13 13:54:11 +02:00
Jonathan Jenne
ddaacfe75c disable NOCOUNT after executing pricedure 2022-05-13 13:53:18 +02:00
Jonathan Jenne
a5c2b93bfe Version 1.3.3 2022-05-12 15:28:56 +02:00
Jonathan Jenne
5dc851be7d Fix loading/mandator selection 2022-05-12 15:28:38 +02:00
Jonathan Jenne
e4345f3b76 Autoload template, ask for reload on selecting mandator 2022-05-12 13:03:31 +02:00
Jonathan Jenne
46d3dfbd47 Logging 2022-05-05 16:35:22 +02:00
Jonathan Jenne
f540c1dc17 Version 1.3.1.0 2022-05-05 10:32:02 +02:00
Jonathan Jenne
63527561ea Update execution of price function 2022-05-05 10:30:48 +02:00
53 changed files with 5014 additions and 2953 deletions

View File

@@ -6,4 +6,5 @@ Public Class Config
Public Property LastUsedMandator As String = "" Public Property LastUsedMandator As String = ""
Public Property Debug As Boolean = False Public Property Debug As Boolean = False
Public Property AutomaticPriceCalculation As Boolean = True Public Property AutomaticPriceCalculation As Boolean = True
Public Property AutomaticLoadingOnFormOpen As Boolean = False
End Class End Class

View File

@@ -9,6 +9,7 @@
Public Const FUNCTION_SQL = "SQL" Public Const FUNCTION_SQL = "SQL"
Public Const FUNCTION_FIELD = "FIELD" Public Const FUNCTION_FIELD = "FIELD"
Public Const FUNCTION_RUNNINGNUMBER = "RUNNINGNUMBER" Public Const FUNCTION_RUNNINGNUMBER = "RUNNINGNUMBER"
Public Const FUNCTION_ADDRESS = "ADDRESS"
Public Const PLACEHOLDER_CONST = "CONST" Public Const PLACEHOLDER_CONST = "CONST"
Public Const PLACEHOLDER_FIELD = "FIELD" Public Const PLACEHOLDER_FIELD = "FIELD"
@@ -65,6 +66,8 @@
MissingValue MissingValue
AccountNotFound AccountNotFound
ArticleNotFound ArticleNotFound
PriceNotCalculated
MissingParameter
End Enum End Enum
Public Class FieldError Public Class FieldError
@@ -81,6 +84,7 @@
MandatorNotFound MandatorNotFound
MissingXmlAttribute MissingXmlAttribute
AttributeValidationFailed AttributeValidationFailed
PriceNotCalculated
End Enum End Enum
Public Class DocumentError Public Class DocumentError

View File

@@ -1,5 +1,6 @@
Imports System.IO Imports System.IO
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Base
Imports MultiTool.Common.Templates Imports MultiTool.Common.Templates
Namespace Documents Namespace Documents
@@ -7,12 +8,12 @@ Namespace Documents
Inherits BaseClass Inherits BaseClass
Private ReadOnly Template As Template Private ReadOnly Template As Template
Private ReadOnly FileEx As DigitalData.Modules.Filesystem.File Private ReadOnly FileEx As FilesystemEx
Public Sub New(pLogConfig As LogConfig, pTemplate As Template) Public Sub New(pLogConfig As LogConfig, pTemplate As Template)
MyBase.New(pLogConfig) MyBase.New(pLogConfig)
Template = pTemplate Template = pTemplate
FileEx = New DigitalData.Modules.Filesystem.File(LogConfig) FileEx = New FilesystemEx(LogConfig)
End Sub End Sub
Public Function CleanImportedDocuments(pDocuments As List(Of Document)) As Boolean Public Function CleanImportedDocuments(pDocuments As List(Of Document)) As Boolean

View File

@@ -8,6 +8,8 @@ Imports MultiTool.Common.Winline
Imports MultiTool.Common.Winline.Entities Imports MultiTool.Common.Winline.Entities
Imports MultiTool.Common.Constants Imports MultiTool.Common.Constants
Imports DigitalData.Modules.Database Imports DigitalData.Modules.Database
Imports DevExpress.Utils.CommonDialogs
Imports DigitalData.Modules.Base
Namespace Documents Namespace Documents
Public Class DocumentLoader Public Class DocumentLoader
@@ -88,7 +90,7 @@ Namespace Documents
Public Async Function LoadFile(pFileInfo As FileInfo, pTemplate As Template, pMandator As Mandator) As Task(Of Document) Public Async Function LoadFile(pFileInfo As FileInfo, pTemplate As Template, pMandator As Mandator) As Task(Of Document)
Logger.Debug("Creating new Document object for file [{0}]", pFileInfo.Name) Logger.Debug("Creating new Document object for file [{0}]", pFileInfo.Name)
Dim oDocument As Document = New Document With { Dim oDocument As New Document With {
.File = pFileInfo, .File = pFileInfo,
.Schema = pTemplate .Schema = pTemplate
} }
@@ -97,8 +99,8 @@ Namespace Documents
oDocument = LoadDocumentData(oDocument, pTemplate, TemplateConfig) oDocument = LoadDocumentData(oDocument, pTemplate, TemplateConfig)
Catch ex As Exception Catch ex As Exception
Throw ex
Logger.Error(ex) Logger.Error(ex)
Throw ex
End Try End Try
@@ -106,8 +108,8 @@ Namespace Documents
oDocument = Await MatchDataFromWinLine(oDocument, Winline.Mandators, pMandator, pTemplate) oDocument = Await MatchDataFromWinLine(oDocument, Winline.Mandators, pMandator, pTemplate)
Catch ex As Exception Catch ex As Exception
Throw ex
Logger.Error(ex) Logger.Error(ex)
Throw ex
End Try End Try
@@ -115,8 +117,8 @@ Namespace Documents
oDocument = MarkRequiredFields(oDocument) oDocument = MarkRequiredFields(oDocument)
Catch ex As Exception Catch ex As Exception
Throw ex
Logger.Error(ex) Logger.Error(ex)
Throw ex
End Try End Try
@@ -223,12 +225,16 @@ Namespace Documents
Where(Function(t) t.Name = oTopLevelElement.Name). Where(Function(t) t.Name = oTopLevelElement.Name).
FirstOrDefault() FirstOrDefault()
Logger.Debug("Creating fields from [{0}] columns for Table [{1}]", oTable.Columns, oTable.Name) Logger.Debug("Creating fields from [{0}] columns for Table [{1}]", oTable.Columns.Count, oTable.Name)
For Each oColumn In oTable.Columns For Each oColumn In oTable.Columns
Dim oSubElement = oSubElements. Dim oQuery = oSubElements.Where(Function(e) e.Name = oColumn.Name)
Where(Function(e) e.Name = oColumn.Name). Dim oElementCount = oQuery.Count()
SingleOrDefault() Dim oSubElement = oQuery.FirstOrDefault()
If oElementCount > 1 Then
Logger.Warn("Found [{0}] elements for column [{1}]. Using first occurrence.")
End If
If oSubElement IsNot Nothing Then If oSubElement IsNot Nothing Then
Dim oRequired = oColumn.IsRequired Dim oRequired = oColumn.IsRequired
@@ -283,7 +289,7 @@ Namespace Documents
End Function End Function
Public Function GetFieldValueFromColumn(pColumn As Template.Column, pSortKey As Integer) As DocumentRow.FieldValue Public Function GetFieldValueFromColumn(pColumn As Template.Column, pSortKey As Integer) As DocumentRow.FieldValue
Return New DocumentRow.FieldValue With { Return New DocumentRow.FieldValue(LogConfig) With {
.DataType = pColumn.DataType, .DataType = pColumn.DataType,
.IsRequired = pColumn.IsRequired, .IsRequired = pColumn.IsRequired,
.IsVirtual = pColumn.Config.IsVirtual, .IsVirtual = pColumn.Config.IsVirtual,
@@ -345,6 +351,12 @@ Namespace Documents
Private Function ApplySQLFunctionForImport(pDocument As Document, pSQLConfig As List(Of FieldConfig)) As Document Private Function ApplySQLFunctionForImport(pDocument As Document, pSQLConfig As List(Of FieldConfig)) As Document
For Each oSQLConfigItem In pSQLConfig For Each oSQLConfigItem In pSQLConfig
For Each oFunction In oSQLConfigItem.Functions
If Not oFunction.Name = FUNCTION_SQL Then
Continue For
End If
' FieldList is a list of fields that will be changed ' FieldList is a list of fields that will be changed
' Example: Setting SQL for Article StorageLocation will invoke the sql for each row ' Example: Setting SQL for Article StorageLocation will invoke the sql for each row
Dim oRowList = pDocument.Rows. Dim oRowList = pDocument.Rows.
@@ -352,7 +364,8 @@ Namespace Documents
ToList() ToList()
For Each oRow As DocumentRow In oRowList For Each oRow As DocumentRow In oRowList
Dim oSQL = oSQLConfigItem.Function.Params
Dim oSQL = oFunction.Params
Dim oField = oRow.Fields. Dim oField = oRow.Fields.
Where(Function(field) field.Key = oSQLConfigItem.Name). Where(Function(field) field.Key = oSQLConfigItem.Name).
SingleOrDefault() SingleOrDefault()
@@ -364,7 +377,11 @@ Namespace Documents
If oValue IsNot Nothing Then If oValue IsNot Nothing Then
oField.Value.SetExternalValue(oValue) oField.Value.SetExternalValue(oValue)
End If End If
Next Next
Next
Next Next
Return pDocument Return pDocument
@@ -379,6 +396,7 @@ Namespace Documents
''' </summary> ''' </summary>
Public Async Function MaybeApplyPriceFunctions(pDocument As Document, pMandator As Mandator, pTemplate As Template) As Task(Of Document) Public Async Function MaybeApplyPriceFunctions(pDocument As Document, pMandator As Mandator, pTemplate As Template) As Task(Of Document)
If pDocument.HasErrors Then If pDocument.HasErrors Then
pDocument.AddDocumentError(DocumentErrorType.PriceNotCalculated, "Der Preis konnte für mindestens eine Zeile nicht ermittelt werden, weil es noch Fehler im Dokument gibt")
Return pDocument Return pDocument
End If End If
@@ -395,19 +413,29 @@ Namespace Documents
Continue For Continue For
End If End If
Dim oFunctionName = oColumn.Config.FunctionName For Each oFunction As FieldConfig.ColumnFunction In oColumn.Config.Functions
Dim oFunctionParams = oColumn.Config.FunctionParams
Dim oFunctionName = oFunction.Name
Dim oFunctionParams = oFunction.Params
If oFunctionName = String.Empty Then
Continue For
End If
Logger.Debug("Running Function: [{0}]", oFunctionName) Logger.Debug("Running Function: [{0}]", oFunctionName)
Logger.Debug("With Parameters: [{0}]", oFunctionParams) Logger.Debug("With Parameters: [{0}]", oFunctionParams)
Dim oParamsDict = ParseFunctionParamsAsDict(oFunctionParams)
Dim oParamsDict = Parameters.Parse(oFunctionParams)
If oFunctionName = Constants.FUNCTION_PRICE Then If oFunctionName = Constants.FUNCTION_PRICE Then
Await SetPrice(oRow, oField.Key, oParamsDict, pDocument, pMandator, pTemplate) Await SetPrice(oRow, oField.Key, oParamsDict, pDocument, pMandator, pTemplate)
End If End If
Next Next
Next Next
Next
Return pDocument Return pDocument
End Function End Function
@@ -421,26 +449,48 @@ Namespace Documents
Exit For Exit For
End If End If
Dim oColumn = oTable.Columns.Where(Function(c) c.Name = oField.Key).SingleOrDefault() Dim oItemName As String = oField.Key
Dim oColumn = oTable.Columns.Where(Function(c) c.Name = oItemName).SingleOrDefault()
If oColumn Is Nothing Then If oColumn Is Nothing Then
Continue For Continue For
End If End If
Dim oFunctionName = oColumn.Config.FunctionName For Each oFunction As FieldConfig.ColumnFunction In oColumn.Config.Functions
Dim oFunctionParams = oColumn.Config.FunctionParams
Dim oParamsDict = ParseFunctionParamsAsDict(oFunctionParams)
If oFunctionName = FUNCTION_GLN Then Dim oFunctionName = oFunction.Name
SetAccountByGLN(oRow, pMandator, oField.Key, Nothing, oParamsDict) Dim oFunctionParams = oFunction.Params
' The code below needs a defined function
If oFunctionName = String.Empty Then
Continue For
End If End If
If oFunctionName = FUNCTION_EAN Then Dim oParamsDict = Parameters.Parse(oFunctionParams)
SetArticleByEAN(oRow, pMandator, oField.Key)
' The main identifier will be checked for String.empty and not required.
' This makes sure that optional fields do not generate errors.
Dim oIdentifier As DocumentRow.FieldValue = oRow.Fields.GetOrDefault(oItemName)
If oIdentifier.Original = String.Empty And oIdentifier.IsRequired = False Then
Continue For
End If End If
If oFunctionName = FUNCTION_RUNNINGNUMBER Then Select Case oFunctionName
Await SetVersionedRunningNumber(pDocument, oRow, pMandator, oField.Key, oParamsDict) Case FUNCTION_GLN
End If SetAccountByGLN(oRow, pMandator, oItemName, Nothing, oParamsDict)
Case FUNCTION_EAN
SetArticleByEAN(oRow, pMandator, oItemName)
Case FUNCTION_RUNNINGNUMBER
Await SetVersionedRunningNumber(pDocument, oRow, pMandator, oItemName, oParamsDict)
Case FUNCTION_ADDRESS
Await SetAddressByAccountNumber(pDocument, oRow, pMandator, oItemName, oParamsDict)
End Select
Next
Next Next
Next Next
@@ -466,11 +516,13 @@ Namespace Documents
End If End If
Dim oFunctionName = oColumn.Config.FunctionName For Each oFunction As FieldConfig.ColumnFunction In oColumn.Config.Functions
Dim oFunctionParams = oColumn.Config.FunctionParams
Dim oParamsDict = ParseFunctionParamsAsDict(oFunctionParams)
If oFunctionName = Constants.FUNCTION_FIELD Then Dim oFunctionName = oFunction.Name
Dim oFunctionParams = oFunction.Params
Dim oParamsDict = Parameters.Parse(oFunctionParams)
If oFunctionName = FUNCTION_FIELD Then
Try Try
Logger.Debug("Applying function FIELD to field [{0}]", oField.Key) Logger.Debug("Applying function FIELD to field [{0}]", oField.Key)
@@ -491,7 +543,7 @@ Namespace Documents
If IsNothing(oReferencedField) = False Then If IsNothing(oReferencedField) = False Then
Dim oRawValue = oReferencedField.Value?.GetValue(oSubKey) Dim oRawValue = oReferencedField.Value?.GetValue(oSubKey)
Dim oValue As String = Utils.NotNull(oRawValue, String.Empty) Dim oValue As String = ObjectEx.NotNull(oRawValue, String.Empty)
If oValue <> String.Empty Then If oValue <> String.Empty Then
oField.Value.SetExternalValue(oValue) oField.Value.SetExternalValue(oValue)
@@ -509,6 +561,9 @@ Namespace Documents
End Try End Try
End If End If
Next Next
Next
Next Next
Return pDocument Return pDocument
@@ -606,18 +661,25 @@ Namespace Documents
Logger.Info("Price for Item [{0}] set to [{1}]", pPriceField, oArticlePrice) Logger.Info("Price for Item [{0}] set to [{1}]", pPriceField, oArticlePrice)
Else Else
Logger.Warn("Price for Item [{0}] could not be found!", pPriceField) Logger.Warn("Price for Item [{0}] could not be found!", pPriceField)
oPriceItem.AddFieldError(FieldErrorType.PriceNotCalculated, "Der Preis für diese Position konnte nicht ermittelt werden.")
End If End If
End Function End Function
Private Sub SetArticleByEAN(pRow As DocumentRow, pMandator As Mandator, pArticleField As String) Private Sub SetArticleByEAN(pRow As DocumentRow, pMandator As Mandator, pArticleField As String)
Dim oNumberItem As DocumentRow.FieldValue = pRow.Fields.GetOrDefault(pArticleField) Dim oNumberItem As DocumentRow.FieldValue = pRow.Fields.GetOrDefault(pArticleField)
If oNumberItem Is Nothing Then
Exit Sub
End If
Dim oArticleNumber = Winline.TryGetArticleNumber(oNumberItem.Original, pMandator) Dim oArticleNumber = Winline.TryGetArticleNumber(oNumberItem.Original, pMandator)
If oArticleNumber IsNot Nothing Then If oArticleNumber IsNot Nothing Then
oNumberItem.SetExternalValue(oArticleNumber) oNumberItem.SetExternalValue(oArticleNumber)
Logger.Info("EAN [{0}] resolved to ArticleNumber [{1}]", oNumberItem.Original, oArticleNumber)
Else Else
'oNumberItem.Error = FieldErrorType.ArticleNotFound
oNumberItem.AddFieldError(FieldErrorType.ArticleNotFound, $"EAN in Attribut '{pArticleField}' konnte nicht aufgelöst werden.") oNumberItem.AddFieldError(FieldErrorType.ArticleNotFound, $"EAN in Attribut '{pArticleField}' konnte nicht aufgelöst werden.")
Logger.Warn("EAN [{0}] could not be resolved ArticleNumber", oNumberItem.Original)
End If End If
End Sub End Sub
@@ -633,8 +695,8 @@ Namespace Documents
End If End If
' Try to find an account that matches the GLN ' Try to find an account that matches the GLN
Dim oAlternateField = pParams.GetOrDefault("AltField", String.Empty) Dim oAlternateField As String = pParams.GetOrDefault("AltField", String.Empty)
Dim oAccount = Winline.TryGetAccount(oNumberItem.Original, pMandator, "c260", oAlternateField) Dim oAccount As Account = Winline.TryGetAccount(oNumberItem.Original, pMandator, "c260", oAlternateField)
' If an account was found, set it for External and Final value ' If an account was found, set it for External and Final value
If oAccount IsNot Nothing Then If oAccount IsNot Nothing Then
@@ -650,12 +712,9 @@ Namespace Documents
'}) '})
End If End If
Else Else
' If no account was found and the field is required, ' If no account was found, mark it as error.
' mark it as error. Otherwise, do nothing.
If oNumberItem.IsRequired Then
'oNumberItem.Error = FieldErrorType.AccountNotFound
oNumberItem.AddFieldError(FieldErrorType.AccountNotFound, $"GLN in Attribut '{pNumberField}' konnte nicht aufgelöst werden.") oNumberItem.AddFieldError(FieldErrorType.AccountNotFound, $"GLN in Attribut '{pNumberField}' konnte nicht aufgelöst werden.")
End If
End If End If
Catch ex As Exception Catch ex As Exception
Logger.Error(ex) Logger.Error(ex)
@@ -663,7 +722,7 @@ Namespace Documents
End Try End Try
End Sub End Sub
Public Async Function SetVersionedRunningNumber(pDocument As Document, pRow As DocumentRow, pMandator As Mandator, pRunningNumberField As String, pParams As Dictionary(Of String, String)) As Task Public Async Function SetVersionedRunningNumber(pDocument As Document, pRow As DocumentRow, pMandator As Mandator, pNumberField As String, pParams As Dictionary(Of String, String)) As Task
Try Try
Const PARAMETER_ACCOUNT = "Account" Const PARAMETER_ACCOUNT = "Account"
Dim oAccountField As String = pParams.GetOrDefault(PARAMETER_ACCOUNT, Nothing) Dim oAccountField As String = pParams.GetOrDefault(PARAMETER_ACCOUNT, Nothing)
@@ -671,9 +730,10 @@ Namespace Documents
Logger.Warn("Parameter '{0}' not found for Function RUNNINGNUMBER", PARAMETER_ACCOUNT) Logger.Warn("Parameter '{0}' not found for Function RUNNINGNUMBER", PARAMETER_ACCOUNT)
End If End If
Dim oRunningNumberItem As DocumentRow.FieldValue = pRow.Fields.GetOrDefault(pRunningNumberField) Dim oRunningNumberItem As DocumentRow.FieldValue = pRow.Fields.GetOrDefault(pNumberField)
Dim oRunningNumber = oRunningNumberItem.Final Dim oRunningNumber = oRunningNumberItem.Original
' We use the Final value to work with the actual account number, not the GLN
Dim oAccountNumberItem As DocumentRow.FieldValue = pRow.Fields.GetOrDefault(oAccountField) Dim oAccountNumberItem As DocumentRow.FieldValue = pRow.Fields.GetOrDefault(oAccountField)
Dim oAccountNumber = oAccountNumberItem.Final Dim oAccountNumber = oAccountNumberItem.Final
@@ -689,26 +749,67 @@ Namespace Documents
End Try End Try
End Function End Function
Private Function ParseFunctionParamsAsDict(pParams As String) As Dictionary(Of String, String) Public Function SetAddressByAccountNumber(pDocument As Document, pRow As DocumentRow, pMandator As Mandator, pAccountField As String, pParams As Dictionary(Of String, String)) As Task
Try Try
Dim oParamsDict As New Dictionary(Of String, String) Const PARAMETER_NAME = "Name"
Const PARAMETER_STREET = "Street"
Const PARAMETER_ZIP = "Zip"
Const PARAMETER_CITY = "City"
If pParams <> String.Empty Then
Dim oParamList = pParams.Split("|").ToList() Dim oAccountNumberItem As DocumentRow.FieldValue = pRow.Fields.GetOrDefault(pAccountField)
For Each oParam In oParamList Dim oAccountNumber = oAccountNumberItem.Final
Dim oParamSplit = oParam.Split("=")
If oParamSplit.Count = 2 Then Dim oNameField As String = pParams.GetOrDefault(PARAMETER_NAME, Nothing)
oParamsDict.Add(oParamSplit(0), oParamSplit(1)) Dim oNameFieldItem As DocumentRow.FieldValue = pRow.Fields.GetOrDefault(oNameField)
End If If oNameField Is Nothing Then
Next Logger.Warn("Parameter '{0}' not found for Function ADDRESS", PARAMETER_NAME)
oAccountNumberItem.AddFieldError(FieldErrorType.MissingParameter, $"Parameter '{PARAMETER_NAME}' wurde nicht gefüllt.")
End If End If
Return oParamsDict Dim oStreetField As String = pParams.GetOrDefault(PARAMETER_STREET, Nothing)
Dim oStreetFieldItem As DocumentRow.FieldValue = pRow.Fields.GetOrDefault(oStreetField)
If oStreetField Is Nothing Then
Logger.Warn("Parameter '{0}' not found for Function ADDRESS", PARAMETER_STREET)
oAccountNumberItem.AddFieldError(FieldErrorType.MissingParameter, $"Parameter '{PARAMETER_STREET}' wurde nicht gefüllt.")
End If
Dim oZipField As String = pParams.GetOrDefault(PARAMETER_ZIP, Nothing)
Dim oZipFieldItem As DocumentRow.FieldValue = pRow.Fields.GetOrDefault(oZipField)
If oZipField Is Nothing Then
Logger.Warn("Parameter '{0}' not found for Function ADDRESS", PARAMETER_ZIP)
oAccountNumberItem.AddFieldError(FieldErrorType.MissingParameter, $"Parameter '{PARAMETER_ZIP}' wurde nicht gefüllt.")
End If
Dim oCityField As String = pParams.GetOrDefault(PARAMETER_CITY, Nothing)
Dim oCityFieldItem As DocumentRow.FieldValue = pRow.Fields.GetOrDefault(oCityField)
If oCityField Is Nothing Then
Logger.Warn("Parameter '{0}' not found for Function ADDRESS", PARAMETER_CITY)
oAccountNumberItem.AddFieldError(FieldErrorType.MissingParameter, $"Parameter '{PARAMETER_CITY}' wurde nicht gefüllt.")
End If
Dim oAccount = Winline.Accounts.Where(Function(a) a.Id = oAccountNumber And a.Mandator.Equals(pMandator)).SingleOrDefault()
If oAccount Is Nothing Then
Logger.Warn("Account with Id [{0}] in Mandator [{1}] could not be found.", oAccountNumber, pMandator.Id)
End If
oNameFieldItem.SetExternalValue(oAccount.Name)
oStreetFieldItem.SetExternalValue(oAccount.StreetName)
oZipFieldItem.SetExternalValue(oAccount.ZipCode)
oCityFieldItem.SetExternalValue(oAccount.CityName)
Catch ex As Exception Catch ex As Exception
Logger.Error(ex) Logger.Error(ex)
Return New Dictionary(Of String, String) Throw ex
End Try End Try
Return Task.CompletedTask
End Function End Function
End Class End Class
End Namespace End Namespace

View File

@@ -1,4 +1,5 @@
Imports System.Text.RegularExpressions Imports System.Text.RegularExpressions
Imports DigitalData.Modules.Logging
Imports MultiTool.Common.Constants Imports MultiTool.Common.Constants
Namespace Documents Namespace Documents
@@ -67,6 +68,7 @@ Namespace Documents
Private _Final As String = "" Private _Final As String = ""
Private _External As String = "" Private _External As String = ""
Private _Original As String = "" Private _Original As String = ""
Private Logger As Logger
Public Property DataType As ColumnType = ColumnType.String Public Property DataType As ColumnType = ColumnType.String
@@ -95,7 +97,8 @@ Namespace Documents
Public Property PreferExternalValue As Boolean = True Public Property PreferExternalValue As Boolean = True
Public Property SortKey As Integer = 0 Public Property SortKey As Integer = 0
Public Sub New() Public Sub New(pLogConfig As LogConfig)
Logger = pLogConfig.GetLogger()
End Sub End Sub
Public Function GetValue(pValueType As String) As String Public Function GetValue(pValueType As String) As String
@@ -137,12 +140,14 @@ Namespace Documents
' Set the external value as the final value, overriding the original / previous external value ' Set the external value as the final value, overriding the original / previous external value
' if the external value should be preferred ' if the external value should be preferred
If PreferExternalValue = True Then If PreferExternalValue = True Then
Logger.Debug("Setting Final value to [{0}] because PreferExternalValue is True", pValue)
_Final = pValue _Final = pValue
End If End If
' If there is no Original value (because the field is virtual), ' If there is no Original value (because the field is virtual),
' set the external value as the final value regardless of the PreferExternalValue setting ' set the external value as the final value regardless of the PreferExternalValue setting
If Original = String.Empty Then If _Original = String.Empty Then
Logger.Debug("Setting Final value to [{0}] because Original value is empty", pValue)
_Final = pValue _Final = pValue
End If End If
End Sub End Sub

View File

@@ -1,146 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{DD1AC3B9-7595-4D3C-B9BB-97C46A480FA0}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>ImporterShared</RootNamespace>
<AssemblyName>ImporterShared</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>Windows</MyType>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>ImporterShared.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>ImporterShared.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>Off</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup>
<Reference Include="AutoMapper, Version=10.0.0.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
<HintPath>..\packages\AutoMapper.10.1.1\lib\net461\AutoMapper.dll</HintPath>
</Reference>
<Reference Include="DevExpress.DataAccess.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DigitalData.Modules.Database">
<HintPath>..\..\DDMonorepo\Modules.Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Filesystem">
<HintPath>..\..\DDMonorepo\Modules.Filesystem\bin\Debug\DigitalData.Modules.Filesystem.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Language">
<HintPath>..\..\DDMonorepo\Modules.Language\bin\Release\DigitalData.Modules.Language.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Logging">
<HintPath>..\..\DDMonorepo\Modules.Logging\bin\Release\DigitalData.Modules.Logging.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.7.10\lib\net45\NLog.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
</ItemGroup>
<ItemGroup>
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Data" />
<Import Include="System.Diagnostics" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
<Import Include="System.Threading.Tasks" />
</ItemGroup>
<ItemGroup>
<Compile Include="BaseClass.vb" />
<Compile Include="Config.vb" />
<Compile Include="Documents\Document.vb" />
<Compile Include="Documents\DocumentMatch.vb" />
<Compile Include="Documents\DocumentType.vb" />
<Compile Include="Documents\DocumentLoader.vb" />
<Compile Include="IEnumerableEx.vb" />
<Compile Include="My Project\AssemblyInfo.vb" />
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="Mapper.vb" />
<Compile Include="Schemas\Orders\Input.vb" />
<Compile Include="Schemas\Orders\Output.vb" />
<Compile Include="Schemas\Orders\ReportSource.vb" />
<Compile Include="Serializer.vb" />
<Compile Include="Winline\Account.vb" />
<Compile Include="Winline\Data.vb" />
<Compile Include="Winline\Mandator.vb" />
<Compile Include="Winline\WebService.vb" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput>
</None>
<None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project>

View File

@@ -10,8 +10,9 @@
<AssemblyName>MultiTool.Common</AssemblyName> <AssemblyName>MultiTool.Common</AssemblyName>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<MyType>Windows</MyType> <MyType>Windows</MyType>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@@ -50,31 +51,29 @@
<Reference Include="DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <Reference Include="DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.DataAccess.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" /> <Reference Include="DevExpress.DataAccess.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Printing.v21.2.Core, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" /> <Reference Include="DevExpress.Printing.v21.2.Core, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DigitalData.Modules.Base"> <Reference Include="DigitalData.Modules.Base, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\DDMonorepo\Modules.Base\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Config">
<HintPath>..\..\DDMonorepo\Modules.Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Database">
<HintPath>..\..\DDMonorepo\Modules.Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Filesystem">
<HintPath>..\..\DDMonorepo\Modules.Filesystem\bin\Debug\DigitalData.Modules.Filesystem.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Interfaces">
<HintPath>..\..\DDMonorepo\Modules.Interfaces\bin\Debug\DigitalData.Modules.Interfaces.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Language, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\DDMonorepo\Modules.Language\bin\Debug\DigitalData.Modules.Language.dll</HintPath> <HintPath>..\..\DDModules\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
</Reference> </Reference>
<Reference Include="DigitalData.Modules.Logging"> <Reference Include="DigitalData.Modules.Config, Version=1.1.4.1, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\DDMonorepo\Modules.Logging\bin\Release\DigitalData.Modules.Logging.dll</HintPath> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\DDModules\Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Database, Version=2.2.7.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\DDModules\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Interfaces, Version=1.7.1.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\DDModules\Interfaces\bin\Debug\DigitalData.Modules.Interfaces.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Logging, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.7.10\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.5.1.0\lib\net46\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
@@ -128,8 +127,11 @@
<DependentUpon>Settings.settings</DependentUpon> <DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput> <DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile> </Compile>
<Compile Include="Parameters.vb" />
<Compile Include="Patterns.vb" /> <Compile Include="Patterns.vb" />
<Compile Include="Report\ReportGenerator.vb" /> <Compile Include="Report\ReportGenerator.vb" />
<Compile Include="Templates\FilterConfig.vb" />
<Compile Include="Templates\FilterConfigItem.vb" />
<Compile Include="Templates\GeneralConfig.vb" /> <Compile Include="Templates\GeneralConfig.vb" />
<Compile Include="Templates\MandatorConfig.vb" /> <Compile Include="Templates\MandatorConfig.vb" />
<Compile Include="Templates\MandatorConfigItem.vb" /> <Compile Include="Templates\MandatorConfigItem.vb" />

View File

@@ -1,175 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{DD1AC3B9-7595-4D3C-B9BB-97C46A480FA0}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>MultiTool.Shared</RootNamespace>
<AssemblyName>MultiTool.Shared</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>Windows</MyType>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>MultiTool.Shared.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>MultiTool.Shared.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>Off</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup>
<Reference Include="AutoMapper, Version=10.0.0.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
<HintPath>..\packages\AutoMapper.10.1.1\lib\net461\AutoMapper.dll</HintPath>
</Reference>
<Reference Include="DevExpress.Data.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.DataAccess.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.Printing.v19.2.Core, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DigitalData.Modules.Config">
<HintPath>..\..\DDMonorepo\Modules.Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Database">
<HintPath>..\..\DDMonorepo\Modules.Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Filesystem">
<HintPath>..\..\DDMonorepo\Modules.Filesystem\bin\Debug\DigitalData.Modules.Filesystem.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Interfaces">
<HintPath>..\..\DDMonorepo\Modules.Interfaces\bin\Debug\DigitalData.Modules.Interfaces.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Language">
<HintPath>..\..\DDMonorepo\Modules.Language\bin\Release\DigitalData.Modules.Language.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Logging">
<HintPath>..\..\DDMonorepo\Modules.Logging\bin\Release\DigitalData.Modules.Logging.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.7.10\lib\net45\NLog.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
</ItemGroup>
<ItemGroup>
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Data" />
<Import Include="System.Diagnostics" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
<Import Include="System.Threading.Tasks" />
</ItemGroup>
<ItemGroup>
<Compile Include="BaseClass.vb" />
<Compile Include="Config.vb" />
<Compile Include="Constants.vb" />
<Compile Include="DataRowEx.vb" />
<Compile Include="Documents\Document.vb" />
<Compile Include="Documents\DocumentRow.vb" />
<Compile Include="Documents\DocumentType.vb" />
<Compile Include="Documents\DocumentLoader.vb" />
<Compile Include="Exceptions.vb" />
<Compile Include="Helpers.vb" />
<Compile Include="IDictionaryEx.vb" />
<Compile Include="IEnumerableEx.vb" />
<Compile Include="Mapper.vb" />
<Compile Include="My Project\AssemblyInfo.vb" />
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="Report\ReportGenerator.vb" />
<Compile Include="Templates\GeneralConfig.vb" />
<Compile Include="Templates\MandatorConfig.vb" />
<Compile Include="Templates\MandatorConfigItem.vb" />
<Compile Include="Templates\MappingConfig.vb" />
<Compile Include="Templates\MappingConfigItem.vb" />
<Compile Include="Report\ReportHead.vb" />
<Compile Include="Report\ReportPosition.vb" />
<Compile Include="Report\ReportSource.vb" />
<Compile Include="Winline\Entities\Response.vb" />
<Compile Include="Templates\Template.vb" />
<Compile Include="Templates\TemplateLoader.vb" />
<Compile Include="Serializer.vb" />
<Compile Include="Templates\TemplateConfig.vb" />
<Compile Include="Winline\Entities\Account.vb" />
<Compile Include="Winline\WinlineData.vb" />
<Compile Include="Winline\Entities\Article.vb" />
<Compile Include="Winline\Entities\Contact.vb" />
<Compile Include="Winline\Entities\DocumentKind.vb" />
<Compile Include="Winline\Entities\Mandator.vb" />
<Compile Include="Templates\TemplateConfigItem.vb" />
<Compile Include="Winline\WebServiceData.vb" />
<Compile Include="XmlData.vb" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput>
</None>
<None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project>

View File

@@ -12,8 +12,8 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyDescription("")> <Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")> <Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("MultiTool.Common")> <Assembly: AssemblyProduct("MultiTool.Common")>
<Assembly: AssemblyCopyright("Copyright © 2022")> <Assembly: AssemblyCopyright("Copyright © 2024")>
<Assembly: AssemblyTrademark("")> <Assembly: AssemblyTrademark("1.0.0.0")>
<Assembly: ComVisible(False)> <Assembly: ComVisible(False)>
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' indem Sie "*" wie unten gezeigt eingeben: ' indem Sie "*" wie unten gezeigt eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.2.0.0")> <Assembly: AssemblyVersion("1.0.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")> <Assembly: AssemblyFileVersion("1.0.0.0")>

View File

@@ -22,7 +22,7 @@ Namespace My.Resources
'''<summary> '''<summary>
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
'''</summary> '''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0"), _ <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _

View File

@@ -15,7 +15,7 @@ Option Explicit On
Namespace My Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0"), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase Inherits Global.System.Configuration.ApplicationSettingsBase

View File

@@ -0,0 +1,49 @@
Imports DigitalData.Modules.Logging
Public Class Parameters
''' <summary>
''' Parse a list of parameters and return a directory of the parsed parameters.
''' </summary>
''' <remarks>The special case of SQL Parameters is NOT handled by this function.</remarks>
Public Shared Function Parse(pParameters As String) As Dictionary(Of String, String)
Try
Dim oParamsDict As New Dictionary(Of String, String)
If pParameters <> String.Empty Then
Dim oParamList = pParameters.Split("|").ToList()
For Each oParam In oParamList
Dim oParamSplit = oParam.Split("=")
If oParamSplit.Count = 2 Then
oParamsDict.Add(oParamSplit(0), oParamSplit(1))
End If
Next
End If
Return oParamsDict
Catch ex As Exception
Return New Dictionary(Of String, String)
End Try
End Function
Public Shared Function TryGet(pParameters As String, pName As String) As Tuple(Of String, String)
Try
Dim pParamDict = Parse(pParameters)
If pParamDict.Count = 0 Then
Return Nothing
End If
If Not pParamDict.ContainsKey(pName) Then
Return Nothing
End If
Dim oValue = pParamDict.Item(pName)
Return New Tuple(Of String, String)(pName, oValue)
Catch ex As Exception
Return Nothing
End Try
End Function
End Class

View File

@@ -1,5 +1,6 @@
Imports System.Text.RegularExpressions Imports System.Text.RegularExpressions
Imports DevExpress.XtraReports Imports DevExpress.XtraReports
Imports DigitalData.Modules.Base
Imports DigitalData.Modules.Database Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports MultiTool.Common.Documents Imports MultiTool.Common.Documents
@@ -14,7 +15,7 @@ Public Class ReportGenerator(Of TReport As IReport)
Private ReadOnly TemplateConfig As TemplateConfig Private ReadOnly TemplateConfig As TemplateConfig
Private ReadOnly GeneralConfig As GeneralConfig Private ReadOnly GeneralConfig As GeneralConfig
Private ReadOnly Patterns As Patterns Private ReadOnly Patterns As Patterns
Private ReadOnly FileEx As DigitalData.Modules.Filesystem.File Private ReadOnly FileEx As FilesystemEx
Public Sub New(pLogConfig As LogConfig, pDatabase As MSSQLServer, pTemplateConfig As TemplateConfig, pGeneralConfig As GeneralConfig) Public Sub New(pLogConfig As LogConfig, pDatabase As MSSQLServer, pTemplateConfig As TemplateConfig, pGeneralConfig As GeneralConfig)
MyBase.New(pLogConfig) MyBase.New(pLogConfig)
@@ -22,7 +23,7 @@ Public Class ReportGenerator(Of TReport As IReport)
GeneralConfig = pGeneralConfig GeneralConfig = pGeneralConfig
TemplateConfig = pTemplateConfig TemplateConfig = pTemplateConfig
Patterns = New Patterns(pLogConfig, pGeneralConfig) Patterns = New Patterns(pLogConfig, pGeneralConfig)
FileEx = New DigitalData.Modules.Filesystem.File(LogConfig) FileEx = New FilesystemEx(LogConfig)
End Sub End Sub
Public Function GetReportFilePath(pDocument As Document, pTemplate As Template) Public Function GetReportFilePath(pDocument As Document, pTemplate As Template)
@@ -112,7 +113,8 @@ Public Class ReportGenerator(Of TReport As IReport)
ToList() ToList()
For Each oRow As DocumentRow In oRowList For Each oRow As DocumentRow In oRowList
Dim oSQL = oSQLConfigItem.Function.Params For Each oFunction In oSQLConfigItem.Functions
Dim oSQL = oFunction.Params
Dim oField = oRow.Fields. Dim oField = oRow.Fields.
Where(Function(field) field.Key = oSQLConfigItem.Name). Where(Function(field) field.Key = oSQLConfigItem.Name).
SingleOrDefault() SingleOrDefault()
@@ -126,6 +128,7 @@ Public Class ReportGenerator(Of TReport As IReport)
End If End If
Next Next
Next Next
Next
Return pDocument Return pDocument
End Function End Function

View File

@@ -3,6 +3,7 @@ Imports DigitalData.Modules.Language
Namespace Templates Namespace Templates
Public Class FieldConfig Public Class FieldConfig
Public Property Id As Integer
Public Property Name As String Public Property Name As String
Public Property Table As String Public Property Table As String
Public Property Type As ColumnType Public Property Type As ColumnType
@@ -16,19 +17,7 @@ Namespace Templates
Public Property IsVirtual As Boolean Public Property IsVirtual As Boolean
Public Property PreferExternalValue As Boolean Public Property PreferExternalValue As Boolean
Public Property [Function] As ColumnFunction Public Property Functions As New List(Of ColumnFunction)
Public ReadOnly Property FunctionName As String
Get
Return Utils.NotNull([Function]?.Name, String.Empty)
End Get
End Property
Public ReadOnly Property FunctionParams As String
Get
Return Utils.NotNull([Function]?.Params, String.Empty)
End Get
End Property
Public Class ColumnFunction Public Class ColumnFunction
Public Id As XmlFunction Public Id As XmlFunction

View File

@@ -0,0 +1,5 @@
Namespace Templates
Public Class FilterConfig
Public Property Items As New List(Of FilterConfigItem)
End Class
End Namespace

View File

@@ -0,0 +1,10 @@
Namespace Templates
Public Class FilterConfigItem
Public Property Guid As Integer
Public Property SQLCommand As String
Public Property TableId As Integer
Public Property TableName As String
Public Property ColumnId As Integer
Public Property ColumnName As String
End Class
End Namespace

View File

@@ -1,4 +1,4 @@
Imports DigitalData.Modules.Language Imports DigitalData.Modules.Base
Imports MultiTool.Common.Winline.WinlineData Imports MultiTool.Common.Winline.WinlineData
Namespace Templates Namespace Templates
@@ -22,6 +22,11 @@ Namespace Templates
Public Property OutputDirectory As String Public Property OutputDirectory As String
Public Property ArchiveDirectory As String Public Property ArchiveDirectory As String
''' <summary>
''' Last modified date of the template file
''' </summary>
Public Property LastModified As Date
Public ReadOnly Property DocType As DocumentType Public ReadOnly Property DocType As DocumentType
Get Get
Dim oDocType As String = GetParameter("DOCTYPE") Dim oDocType As String = GetParameter("DOCTYPE")
@@ -35,6 +40,19 @@ Namespace Templates
End Get End Get
End Property End Property
Public ReadOnly Property PrintDocument As Boolean
Get
Dim oPrintDocument = GetParameter("PRINT")
Dim oDefaultValue = True
If oPrintDocument IsNot Nothing Then
oDefaultValue = IIf(oPrintDocument = "0", False, True)
End If
Return oDefaultValue
End Get
End Property
Public ReadOnly Property DocTypeCategory As DocumentTypeCategory Public ReadOnly Property DocTypeCategory As DocumentTypeCategory
Get Get
Select Case DocType Select Case DocType
@@ -77,11 +95,11 @@ Namespace Templates
Public Function GetParameter(pName As String) As String Public Function GetParameter(pName As String) As String
Dim oParam1 As String = Utils.NotNull(Parameter1, String.Empty) Dim oParam1 As String = ObjectEx.NotNull(Parameter1, String.Empty)
Dim oParam2 As String = Utils.NotNull(Parameter2, String.Empty) Dim oParam2 As String = ObjectEx.NotNull(Parameter2, String.Empty)
Dim oParamValue1 = TryGetParameter(oParam1) Dim oParamValue1 = Parameters.TryGet(oParam1, pName)
Dim oParamValue2 = TryGetParameter(oParam2) Dim oParamValue2 = Parameters.TryGet(oParam2, pName)
If oParamValue1 IsNot Nothing AndAlso oParamValue1.Item1 = pName Then If oParamValue1 IsNot Nothing AndAlso oParamValue1.Item1 = pName Then
Return oParamValue1.Item2 Return oParamValue1.Item2
@@ -94,20 +112,6 @@ Namespace Templates
Return Nothing Return Nothing
End Function End Function
Private Function TryGetParameter(pParameterString As String) As Tuple(Of String, String)
If pParameterString <> String.Empty Then
Dim oSplit = pParameterString.Split("=").ToList()
If oSplit.Count = 2 Then
Return New Tuple(Of String, String)(oSplit.First, oSplit.Last)
Else
Return Nothing
End If
Else
Return Nothing
End If
End Function
''' <summary> ''' <summary>
''' Table from XSD ''' Table from XSD
''' </summary> ''' </summary>

View File

@@ -11,7 +11,7 @@ Namespace Templates
Public ReadOnly Property SqlItems As List(Of FieldConfig) Public ReadOnly Property SqlItems As List(Of FieldConfig)
Get Get
Return Items. Return Items.
Where(Function(item) item.Function.Name = Constants.FUNCTION_SQL). Where(Function(item) item.Functions.Any(Function(f) f.Name = Constants.FUNCTION_SQL)).
ToList() ToList()
End Get End Get
End Property End Property

View File

@@ -1,7 +1,7 @@
Imports System.IO Imports System.IO
Imports DigitalData.Modules.Database Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Language Imports DigitalData.Modules.Base
Namespace Templates Namespace Templates
Public Class TemplateLoader Public Class TemplateLoader
@@ -10,12 +10,16 @@ Namespace Templates
Private ReadOnly ns As XNamespace = "http://www.w3.org/2001/XMLSchema" Private ReadOnly ns As XNamespace = "http://www.w3.org/2001/XMLSchema"
Public Property TemplateList As List(Of Template) Public Property TemplateList As List(Of Template)
Public Property TemplateConfiguration As New TemplateConfig Public Property TemplateConfiguration As New TemplateConfig
Public Property MappingConfiguration As New MappingConfig Public Property MappingConfiguration As New MappingConfig
Public Property MandatorConfiguration As New MandatorConfig Public Property MandatorConfiguration As New MandatorConfig
Public Property GeneralConfiguration As New GeneralConfig Public Property GeneralConfiguration As New GeneralConfig
Public Property FilterConfiguration As New FilterConfig
Private Const SQL_VWMT_ITEMS = "SELECT * FROM [DD_ECM].[dbo].[VWMT_ITEMS]" Private Const SQL_TBMT_FILTERS = "SELECT * FROM [DD_ECM].[dbo].[VWMT_FILTERS]"
Private Const SQL_VWMT_ITEMS = "SELECT * FROM [DD_ECM].[dbo].[VWMT_ITEMS] ORDER BY TEMPLATE_NAME, TABLE_NAME"
Private Const SQL_VWMT_FUNCTIONS = "SELECT * FROM [DD_ECM].[dbo].[VWMT_FUNCTIONS] ORDER BY ITEM_ID, SEQUENCE"
Private Const SQL_VWMT_MAPPING = "SELECT * FROM [DD_ECM].[dbo].[VWMT_MAPPING]" Private Const SQL_VWMT_MAPPING = "SELECT * FROM [DD_ECM].[dbo].[VWMT_MAPPING]"
Private Const SQL_TBMT_MANDATORS = "SELECT * FROM [DD_ECM].[dbo].[TBMT_MANDATORS] ORDER BY ORDER_KEY" Private Const SQL_TBMT_MANDATORS = "SELECT * FROM [DD_ECM].[dbo].[TBMT_MANDATORS] ORDER BY ORDER_KEY"
Private Const SQL_TBMT_CONFIG = "SELECT * FROM [DD_ECM].[dbo].[TBMT_CONFIG]" Private Const SQL_TBMT_CONFIG = "SELECT * FROM [DD_ECM].[dbo].[TBMT_CONFIG]"
@@ -25,6 +29,34 @@ Namespace Templates
MyBase.New(pLogConfig, pMSSQL) MyBase.New(pLogConfig, pMSSQL)
End Sub End Sub
Public Async Function LoadFilterConfiguration() As Task(Of Boolean)
Try
Dim oTable As DataTable = Await Database.GetDatatableAsync(SQL_TBMT_FILTERS)
Dim oFilters As New List(Of FilterConfigItem)
For Each oRow As DataRow In oTable.Rows
Dim oFilter As New FilterConfigItem With {
.Guid = oRow.Item("GUID"),
.SQLCommand = oRow.ItemEx("SQL_COMMAND", String.Empty),
.TableId = oRow.ItemEx("TABLE_ID", 0),
.TableName = oRow.ItemEx("TABLE_NAME", String.Empty),
.ColumnId = oRow.ItemEx("ITEM_ID", 0),
.ColumnName = oRow.ItemEx("ITEM_NAME", String.Empty)
}
oFilters.Add(oFilter)
Next
FilterConfiguration.Items = oFilters
Return True
Catch ex As Exception
Logger.Error(ex)
Return False
End Try
End Function
Public Async Function LoadTemplates() As Task(Of Boolean) Public Async Function LoadTemplates() As Task(Of Boolean)
Try Try
Dim oTable As DataTable = Await Database.GetDatatableAsync(SQL_TBMT_TEMPLATES) Dim oTable As DataTable = Await Database.GetDatatableAsync(SQL_TBMT_TEMPLATES)
@@ -42,6 +74,8 @@ Namespace Templates
.Parameter2 = oRow.ItemEx("PARAMETER_2", String.Empty) .Parameter2 = oRow.ItemEx("PARAMETER_2", String.Empty)
} }
Logger.Debug("Loading Template [{0}]", oTemplate.Name)
oTemplates.Add(oTemplate) oTemplates.Add(oTemplate)
Next Next
@@ -158,9 +192,10 @@ Namespace Templates
For Each oRow As DataRow In oTable.Rows For Each oRow As DataRow In oTable.Rows
Dim oColumn As New FieldConfig() With { Dim oColumn As New FieldConfig() With {
.Id = oRow.ItemEx("ITEM_ID", 0),
.Template = oRow.ItemEx("TEMPLATE_NAME", String.Empty), .Template = oRow.ItemEx("TEMPLATE_NAME", String.Empty),
.Table = oRow.ItemEx("XML_TABLE", String.Empty), .Table = oRow.ItemEx("TABLE_NAME", String.Empty),
.Name = oRow.ItemEx("XML_ITEM", String.Empty), .Name = oRow.ItemEx("ITEM_NAME", String.Empty),
.Type = FieldConfig.ConvertType(ItemEx(oRow, "DATA_TYPE", String.Empty)), .Type = FieldConfig.ConvertType(ItemEx(oRow, "DATA_TYPE", String.Empty)),
.OrderKey = oRow.ItemEx("ORDER_KEY", 0), .OrderKey = oRow.ItemEx("ORDER_KEY", 0),
.IsReadOnly = oRow.ItemEx("IS_READ_ONLY", False), .IsReadOnly = oRow.ItemEx("IS_READ_ONLY", False),
@@ -169,13 +204,11 @@ Namespace Templates
.IsVirtual = oRow.ItemEx("IS_VIRTUAL", False), .IsVirtual = oRow.ItemEx("IS_VIRTUAL", False),
.IsHead = oRow.ItemEx("IS_HEAD", True), .IsHead = oRow.ItemEx("IS_HEAD", True),
.PreferExternalValue = oRow.ItemEx("PREFER_EXTERNAL", True), .PreferExternalValue = oRow.ItemEx("PREFER_EXTERNAL", True),
.[Function] = New FieldConfig.ColumnFunction With { .Functions = New List(Of FieldConfig.ColumnFunction)
.Id = oRow.ItemEx("FUNCTION_ID", 0),
.Name = oRow.ItemEx("FUNCTION_NAME", String.Empty),
.Params = oRow.ItemEx("FUNCTION_PARAMETERS", String.Empty)
}
} }
Logger.Debug("Creating Template Item for Table [{0}]: [{1}]", oColumn.Table, oColumn.Name)
oItems.Add(oColumn) oItems.Add(oColumn)
Next Next
@@ -192,6 +225,37 @@ Namespace Templates
End Try End Try
End Function End Function
Public Async Function LoadTemplateFunctions() As Task(Of Boolean)
Try
Dim oTable As DataTable = Await Database.GetDatatableAsync(SQL_VWMT_FUNCTIONS)
Dim oItems As New List(Of FieldConfig)
For Each oRow As DataRow In oTable.Rows
Dim oTemplateItemId = oRow.ItemEx("ITEM_ID", 0)
Dim oTemplateItem = TemplateConfiguration.Items.SingleOrDefault(Function(i) i.Id = oTemplateItemId)
If oTemplateItem Is Nothing Then
Logger.Warn("Function configuration could not be assigned to an existing template item, item id was [{0}]", oTemplateItemId)
Continue For
End If
oTemplateItem.Functions.Add(New FieldConfig.ColumnFunction With {
.Id = oRow.ItemEx("FUNCTION_ID", 0),
.Name = oRow.ItemEx("FUNCTION_NAME", String.Empty),
.Params = oRow.ItemEx("FUNCTION_PARAMETERS", String.Empty)
})
Next
Return True
Catch ex As Exception
Logger.Error(ex)
Return False
End Try
End Function
Public Function UpdateTemplateFromFile(pTemplate As Template, pInputDirectory As String) As Template Public Function UpdateTemplateFromFile(pTemplate As Template, pInputDirectory As String) As Template
Dim oFullPath = Path.Combine(pInputDirectory, pTemplate.FileName) Dim oFullPath = Path.Combine(pInputDirectory, pTemplate.FileName)
@@ -236,6 +300,7 @@ Namespace Templates
Public Function UpdateTemplateTablesFromDatabase(pTemplate As Template, pTemplateConfig As TemplateConfig) As Template Public Function UpdateTemplateTablesFromDatabase(pTemplate As Template, pTemplateConfig As TemplateConfig) As Template
If pTemplateConfig Is Nothing Then If pTemplateConfig Is Nothing Then
Logger.Warn("Template config is empty. Skipping.")
Return pTemplate Return pTemplate
End If End If
@@ -269,7 +334,7 @@ Namespace Templates
Dim oTable = pTemplate.Tables.Where(Function(table) table.Name = oItem.Table).FirstOrDefault() Dim oTable = pTemplate.Tables.Where(Function(table) table.Name = oItem.Table).FirstOrDefault()
If oTable Is Nothing Then If oTable Is Nothing Then
Logger.Warn("Table [{0}] for item [{1}] does exist in this Template!", oItem.Table, oItem.Name) Logger.Warn("Table [{0}] for item [{1}] does not exist in this Template!", oItem.Table, oItem.Name)
Continue For Continue For
End If End If

View File

@@ -1,4 +1,6 @@
Namespace Winline.Entities Imports MultiTool.Common.Winline.WinlineData
Namespace Winline.Entities
Public Class ExportDocument Public Class ExportDocument
Public Property Schema As Templates.Template Public Property Schema As Templates.Template
@@ -18,7 +20,7 @@
Public Property GrossAmount As Double Public Property GrossAmount As Double
Public Property IsSelected As Boolean = False Public Property IsSelected As Boolean = False
Public Property IsExported As Boolean = False Public Property IsExported As Boolean
Public Property FilenameExport As String Public Property FilenameExport As String
Public Property ExportedWhen As Date Public Property ExportedWhen As Date

View File

@@ -1,8 +1,9 @@
Imports System.Net.Http Imports System.Collections.Specialized
Imports System.Net.Http
Imports System.Text Imports System.Text
Imports System.Xml Imports System.Xml
Imports DigitalData.Modules.Database Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Filesystem Imports DigitalData.Modules.Base
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports MultiTool.Common.Documents Imports MultiTool.Common.Documents
Imports MultiTool.Common.Exceptions Imports MultiTool.Common.Exceptions
@@ -15,19 +16,21 @@ Namespace Winline
Inherits BaseClass Inherits BaseClass
Private ReadOnly Config As WebServiceConfig Private ReadOnly Config As WebServiceConfig
Private ReadOnly Filters As FilterConfig
Private ReadOnly Serializer As Serializer Private ReadOnly Serializer As Serializer
Private ReadOnly Winline As WinlineData Private ReadOnly Winline As WinlineData
Private ReadOnly FileEx As File Private ReadOnly FileEx As FilesystemEx
Private ReadOnly Patterns As Patterns Private ReadOnly Patterns As Patterns
Public Event WebServiceProgress As EventHandler(Of String) Public Event WebServiceProgress As EventHandler(Of String)
Public Sub New(pLogConfig As LogConfig, pDatabase As MSSQLServer, pWinline As WinlineData, pWebserviceConfig As WebServiceConfig, pGeneralConfig As GeneralConfig) Public Sub New(pLogConfig As LogConfig, pDatabase As MSSQLServer, pWinline As WinlineData, pWebserviceConfig As WebServiceConfig, pGeneralConfig As GeneralConfig, pFilterConfig As FilterConfig)
MyBase.New(pLogConfig, pDatabase) MyBase.New(pLogConfig, pDatabase)
Serializer = New Serializer(pLogConfig) Serializer = New Serializer(pLogConfig)
Config = pWebserviceConfig Config = pWebserviceConfig
Filters = pFilterConfig
Patterns = New Patterns(pLogConfig, pGeneralConfig) Patterns = New Patterns(pLogConfig, pGeneralConfig)
FileEx = New File(LogConfig) FileEx = New FilesystemEx(LogConfig)
Winline = pWinline Winline = pWinline
End Sub End Sub
@@ -48,10 +51,10 @@ Namespace Winline
''' <exception cref="TaskCanceledException"></exception> ''' <exception cref="TaskCanceledException"></exception>
''' <returns>True if request was successful.</returns> ''' <returns>True if request was successful.</returns>
Public Async Function TransferDocumentToWinline(pDocument As Documents.Document, pTemplate As Template, pMandator As Mandator, Optional pIsTest As Boolean = False) As Task(Of Boolean) Public Async Function TransferDocumentToWinline(pDocument As Documents.Document, pTemplate As Template, pMandator As Mandator, Optional pIsTest As Boolean = False) As Task(Of Boolean)
Dim oBytes As Byte() = GetBytesFromDocument(pDocument)
Dim oWS = Config Dim oWS = Config
RaiseEvent WebServiceProgress(Me, "Einstellungen laden") RaiseEvent WebServiceProgress(Me, "Einstellungen laden")
Logger.Debug("Loading setting and creating directories")
' --- Build all teh filenamez and pathz ' --- Build all teh filenamez and pathz
Dim oBaseFileName As String = FileEx.GetDateTimeString() Dim oBaseFileName As String = FileEx.GetDateTimeString()
@@ -72,12 +75,20 @@ Namespace Winline
Dim oImportRelativeFilePath = IO.Path.Combine(oRelativePath, oFileName) Dim oImportRelativeFilePath = IO.Path.Combine(oRelativePath, oFileName)
RaiseEvent WebServiceProgress(Me, "Dateien schreiben") RaiseEvent WebServiceProgress(Me, "Dateien schreiben")
Logger.Debug("Writing request file to [{oOutputFilePath}]")
' If configured, prevent printing the document and instead create it as a draft in the "Nicht gedruckt" section
If pTemplate.PrintDocument = False Then
pDocument.PrintVoucher = 0
End If
' --- Serialize Data into XML string ' --- Serialize Data into XML string
Dim oBytes As Byte() = GetBytesFromDocument(pDocument)
IO.File.WriteAllBytes(oOutputFilePath, oBytes) IO.File.WriteAllBytes(oOutputFilePath, oBytes)
' --- Copy file to Winline Import Directory ' --- Copy file to Winline Import Directory
Try Try
Logger.Debug("Copying request file to [{oImportAbsoluteFilePath}]")
IO.File.Copy(oOutputFilePath, oImportAbsoluteFilePath, True) IO.File.Copy(oOutputFilePath, oImportAbsoluteFilePath, True)
Catch ex As Exception Catch ex As Exception
Logger.Error(ex) Logger.Error(ex)
@@ -87,6 +98,7 @@ Namespace Winline
' --- Prepare URL and HTTP Client ' --- Prepare URL and HTTP Client
Dim oTemplateType = pDocument.TemplateType Dim oTemplateType = pDocument.TemplateType
Dim oTemplateName = pDocument.TemplateName Dim oTemplateName = pDocument.TemplateName
Logger.Debug("Using Template [{0}/{1}]", oTemplateName, oTemplateType)
' ActionCode: Should this be a test or not? ' ActionCode: Should this be a test or not?
' 0 = Test call ' 0 = Test call
@@ -95,13 +107,26 @@ Namespace Winline
If pIsTest = True Then If pIsTest = True Then
oActionCode = 0 oActionCode = 0
End If End If
Logger.Debug("Using ActionCode [{0}]", oActionCode)
' Byref: Should data be supplied as file or as string? ' Byref: Should data be supplied as file or as string?
' 0 = As String ' 0 = As String
' 1 = As File (relative to Winline Server directory) ' 1 = As File (relative to Winline Server directory)
Dim oByref = 1 Dim oByref = 1
Dim oURL As String = $"{oWS.BaseUrl}/ewlservice/import?User={oWS.Username}&Password={oWS.Password}&Company={pMandator.Id}&Type={oTemplateType}&Vorlage={oTemplateName}&ActionCode={oActionCode}&Byref={oByref}&Data={oImportRelativeFilePath}" Dim oParams As New NameValueCollection() From {
{"User", oWS.Username},
{"Password", oWS.Password},
{"Company", pMandator.Id},
{"Type", oTemplateType},
{"Vorlage", oTemplateName},
{"ActionCode", oActionCode},
{"Byref", oByref},
{"Data", oImportRelativeFilePath}
}
Dim oURL As String = $"{oWS.BaseUrl}/ewlservice/import{ToQueryString(oParams)}"
'Dim oURL As String = $"{oWS.BaseUrl}/ewlservice/import?User={oWS.Username}&Password={oWS.Password}&Company={pMandator.Id}&Type={oTemplateType}&Vorlage={oTemplateName}&ActionCode={oActionCode}&Byref={oByref}&Data={oImportRelativeFilePath}"
Dim oClient As New HttpClient With { Dim oClient As New HttpClient With {
.Timeout = TimeSpan.FromSeconds(Constants.HTTP_REQUEST_TIMEOUT_IN_SECONDS) .Timeout = TimeSpan.FromSeconds(Constants.HTTP_REQUEST_TIMEOUT_IN_SECONDS)
} }
@@ -113,6 +138,8 @@ Namespace Winline
' --- Bring the action! ' --- Bring the action!
Try Try
Dim oResponse As HttpResponseMessage = Await oClient.GetAsync(oURL) Dim oResponse As HttpResponseMessage = Await oClient.GetAsync(oURL)
Logger.Debug("HTTP Response recevied!")
Await HandleImportResponse(oResponse, pTemplate, oBaseFileName) Await HandleImportResponse(oResponse, pTemplate, oBaseFileName)
Return True Return True
@@ -133,8 +160,12 @@ Namespace Winline
RaiseEvent WebServiceProgress(Me, "Antwort verarbeiten") RaiseEvent WebServiceProgress(Me, "Antwort verarbeiten")
Logger.Debug("Response ContentType: [{0}]", oContentType)
Select Case oContentType Select Case oContentType
Case "text/xml" Case "text/xml"
Logger.Debug("Got XML Response. Checking.")
WriteResponseFile(oOutputDirectory, oResponseBody, $"{pTemplate.Name}-{pBaseFileName}-Response.xml") WriteResponseFile(oOutputDirectory, oResponseBody, $"{pTemplate.Name}-{pBaseFileName}-Response.xml")
Dim oBytes As Byte() = Encoding.UTF8.GetBytes(oResponseBody) Dim oBytes As Byte() = Encoding.UTF8.GetBytes(oResponseBody)
@@ -146,8 +177,8 @@ Namespace Winline
For Each oDetails As Templates.Entities.MESOWebServiceResultResultDetails In oResponseObject.ResultDetails For Each oDetails As Templates.Entities.MESOWebServiceResultResultDetails In oResponseObject.ResultDetails
If oDetails.Success = True Then If oDetails.Success = True Then
Logger.Info("KeyValue: [{0}]", oDetails.KeyValue) Logger.Debug("KeyValue: [{0}]", oDetails.KeyValue)
Logger.Info("VoucherNumber: [{0}]", oDetails.VoucherNumber) Logger.Debug("VoucherNumber: [{0}]", oDetails.VoucherNumber)
Else Else
Logger.Warn("ErrorCode: [{0}]", oDetails.ErrorCode) Logger.Warn("ErrorCode: [{0}]", oDetails.ErrorCode)
Logger.Warn("ErrorText: [{0}]", oDetails.ErrorText) Logger.Warn("ErrorText: [{0}]", oDetails.ErrorText)
@@ -159,17 +190,23 @@ Namespace Winline
If oResponseObject.OverallSuccess = False Then If oResponseObject.OverallSuccess = False Then
Dim oMessage = $"Request to Webservice was unsuccessful:{vbNewLine}{vbNewLine}{String.Join(vbNewLine, oErrorStrings.ToArray)}" Dim oMessage = $"Request to Webservice was unsuccessful:{vbNewLine}{vbNewLine}{String.Join(vbNewLine, oErrorStrings.ToArray)}"
Logger.Warn("Overall Success was [false]")
Throw New WebServiceException(oMessage) Throw New WebServiceException(oMessage)
End If End If
End Using End Using
Case "text/html" Case "text/html"
Logger.Debug("Got TEXT/HTML Response. Throwing.")
WriteResponseFile(oOutputDirectory, oResponseBody, $"{pTemplate.Name}-{pBaseFileName}-Response.xml") WriteResponseFile(oOutputDirectory, oResponseBody, $"{pTemplate.Name}-{pBaseFileName}-Response.xml")
Throw New WebServiceException(oResponseBody) Throw New WebServiceException(oResponseBody)
Case Else Case Else
Logger.Debug("Unknown Response ContentType: [{0}]", oContentType)
Throw New WebServiceException(oResponseBody) Throw New WebServiceException(oResponseBody)
End Select End Select
End Function End Function
@@ -216,7 +253,7 @@ Namespace Winline
#End Region #End Region
#Region "Export" #Region "Export"
Async Function ExportDocumentFromWinline(pDocument As Entities.ExportDocument, pTemplate As Template, pMandator As Mandator, Optional pIsTest As Boolean = False) As Task(Of Boolean) Async Function ExportDocumentFromWinline(pDocument As ExportDocument, pTemplate As Template, pMandator As Mandator, Optional pIsTest As Boolean = False) As Task(Of Boolean)
Dim oWS = Config Dim oWS = Config
Logger.Info("Exporting document from Winline") Logger.Info("Exporting document from Winline")
@@ -285,17 +322,27 @@ Namespace Winline
RaiseEvent WebServiceProgress(Me, "Antwort verarbeiten") RaiseEvent WebServiceProgress(Me, "Antwort verarbeiten")
Logger.Debug("Postprocessing response.") Logger.Debug("Processing response with type '{0}'", oContentType)
oResponseBody = ApplyItemFunctionsForExport(pDocument, pTemplate, pMandator, oResponseBody)
Select Case oContentType Select Case oContentType
Case "text/xml" Case "text/xml"
Dim oXmlResponse = oResponseBody
Dim oDoc = ConvertStringToDocument(oXmlResponse)
Logger.Debug("Applying Item Filters")
oDoc = ApplyItemFiltersForExport(pDocument, pTemplate, pMandator, oDoc)
Logger.Debug("Applying Item Functions")
oDoc = ApplyItemFunctionsForExport(pDocument, pTemplate, pMandator, oDoc)
Dim oXml = ConvertDocumentToString(oDoc)
' Webservice ' Webservice
WriteResponseFile(pTemplate.OutputWebserviceDirectory, oResponseBody, $"{pTemplate.Name}-{pBaseFileName}-Response.xml") WriteResponseFile(pTemplate.OutputWebserviceDirectory, oXml, $"{pTemplate.Name}-{pBaseFileName}-Response.xml")
' XML ' XML
WriteResponseFile(pTemplate.OutputXmlFileDirectory, oResponseBody, $"{pTemplate.Name}-{pBaseFileName}.xml") WriteResponseFile(pTemplate.OutputXmlFileDirectory, oXml, $"{pTemplate.Name}-{pBaseFileName}.xml")
' Archive ' Archive
WriteResponseFile(FileEx.CreateDateDirectory(pTemplate.ArchiveDirectory), oResponseBody, $"{pTemplate.Name}-{pBaseFileName}.xml") WriteResponseFile(FileEx.CreateDateDirectory(pTemplate.ArchiveDirectory), oXml, $"{pTemplate.Name}-{pBaseFileName}.xml")
Case "text/html" Case "text/html"
WriteResponseFile(pTemplate.OutputWebserviceDirectory, oResponseBody, $"{pTemplate.Name}-{pBaseFileName}-Response.txt") WriteResponseFile(pTemplate.OutputWebserviceDirectory, oResponseBody, $"{pTemplate.Name}-{pBaseFileName}-Response.txt")
@@ -307,41 +354,53 @@ Namespace Winline
End Select End Select
End Function End Function
Private Function ApplyItemFunctionsForExport(pDocument As Entities.ExportDocument, pTemplate As Template, pMandator As Mandator, oResponseBody As String) As String Private Function ConvertStringToDocument(pXmlString As String) As XmlDocument
Dim oDoc As New XmlDocument() Dim oDoc As New XmlDocument()
oDoc.LoadXml(oResponseBody) oDoc.LoadXml(pXmlString)
Return oDoc
End Function
Private Function ConvertDocumentToString(pXmlDocument As XmlDocument) As String
Dim oArray As Byte()
Using oStream As New IO.MemoryStream
pXmlDocument.Save(oStream)
oArray = oStream.ToArray()
End Using
Return System.Text.Encoding.UTF8.GetString(oArray)
End Function
Private Function ApplyItemFunctionsForExport(pDocument As Entities.ExportDocument, pTemplate As Template, pMandator As Mandator, oXMLDocument As XmlDocument) As XmlDocument
For Each oTable In pTemplate.Tables For Each oTable In pTemplate.Tables
Logger.Debug("Processing Table [{0}]", oTable.Name) Logger.Debug("Processing Table [{0}]", oTable.Name)
For Each oItem As Template.Column In oTable.Columns For Each oColumn As Template.Column In oTable.Columns
Dim oTableName As String = oTable.Name Dim oTableName As String = oTable.Name
Dim oItemName As String = oItem.Name Dim oItemName As String = oColumn.Name
If oItem.Config.Function Is Nothing Then
Continue For
End If
Logger.Debug("Processing item [{0}]", oItemName) Logger.Debug("Processing item [{0}]", oItemName)
Dim oFunction = oItem.Config.Function.Name For Each oFunction As FieldConfig.ColumnFunction In oColumn.Config.Functions
Dim oFunctionName = oFunction.Name
Dim oFunctionParams = oFunction.Params
Dim oPath = $"//MESOWebService/{oTableName}/{oItemName}" Dim oPath = $"//MESOWebService/{oTableName}/{oItemName}"
Dim oNodes As XmlNodeList = oDoc.SelectNodes(oPath) Dim oNodes As XmlNodeList = oXMLDocument.SelectNodes(oPath)
Logger.Debug("Calling function [{0}] on note [{1}]", oFunction, oPath) Logger.Debug("Calling function [{0}] on node [{1}]", oFunctionName, oPath)
For Each oNode As XmlNode In oNodes For Each oNode As XmlNode In oNodes
If oItem.Config.Function.Name = "GLN" Then If oFunctionName = Constants.FUNCTION_GLN Then
Dim oGLN = Winline.TryGetGLN(oNode.InnerText, pMandator) Dim oGLN = Winline.TryGetGLN(oNode.InnerText, pMandator)
If oGLN Is Nothing Then If oGLN Is Nothing Then
Throw New MissingAttributeException("GLN") Throw New MissingAttributeException(Constants.FUNCTION_GLN)
End If End If
oNode.InnerText = oGLN oNode.InnerText = oGLN
ElseIf oItem.Config.Function.Name = "EAN" Then ElseIf oFunctionName = Constants.FUNCTION_EAN Then
Dim oEAN = Winline.TryGetEAN(oNode.InnerText, pMandator) Dim oEAN = Winline.TryGetEAN(oNode.InnerText, pMandator)
If oEAN Is Nothing Then If oEAN Is Nothing Then
@@ -350,16 +409,17 @@ Namespace Winline
' we dont throw here, but leave the original value in case of a failure. ' we dont throw here, but leave the original value in case of a failure.
' Throw New Exceptions.MissingAttributeException("EAN") ' Throw New Exceptions.MissingAttributeException("EAN")
Logger.Warn("EAN could not be retrieved for Node {0}. Skipping.", oNode.Name) Logger.Warn("EAN could not be retrieved for Node {0}. Skipping.", oNode.Name)
Continue For
End If End If
oNode.InnerText = oEAN oNode.InnerText = oEAN
ElseIf oItem.Config.Function.Name = "SQL" Then ElseIf oFunctionName = Constants.FUNCTION_SQL Then
Dim oSQL = Patterns.ReplaceForExport(pDocument, pMandator, oItem.Config.Function.Params) Dim oSQL = Patterns.ReplaceForExport(pDocument, pMandator, oFunctionParams)
Dim oValue = Database.GetScalarValue(oSQL) Dim oValue = Database.GetScalarValue(oSQL)
If oValue Is Nothing Then If oValue Is Nothing Then
Throw New MissingAttributeException("SQL") Throw New MissingAttributeException(Constants.FUNCTION_SQL)
End If End If
oNode.InnerText = oValue oNode.InnerText = oValue
@@ -367,17 +427,76 @@ Namespace Winline
End If End If
Next Next
Next Next
Next
Next Next
Dim oArray As Byte() Return oXMLDocument
Using oStream As New IO.MemoryStream End Function
oDoc.Save(oStream)
oArray = oStream.ToArray()
End Using
Dim oXml = Text.Encoding.UTF8.GetString(oArray) Private Function ApplyItemFiltersForExport(pDocument As ExportDocument, pTemplate As Template, pMandator As Mandator, oXMLDocument As XmlDocument) As XmlDocument
oResponseBody = oXml Dim oTableNames = pDocument.Schema.Tables.
Return oResponseBody Select(Function(table) table.Name).
ToList()
Dim oFilters = Filters.Items.
Where(Function(filter) oTableNames.Contains(filter.TableName)).
ToList()
Logger.Info("Applying [{0}] filters before exporting.", oFilters.Count)
For Each oFilter As FilterConfigItem In oFilters
Dim oTableName = oFilter.TableName
Logger.Debug("Applying filter for Table [{0}]", oTableName)
If String.IsNullOrEmpty(oFilter.SQLCommand) Then
Logger.Warn("SQL Command for filter is empty. Continuing.")
Continue For
End If
Logger.Debug("Executing SQL Command: [{0}]", oFilter.SQLCommand)
Dim oSQLResult = Database.GetDatatable(oFilter.SQLCommand)
If oSQLResult Is Nothing Then
Logger.Warn("SQL Command for filter returned nothing: {0}. Continuing.", oFilter.SQLCommand)
Continue For
End If
Dim oResultList = oSQLResult.AsEnumerable.
Select(Function(row) row.ItemEx(0, String.Empty).Trim).
ToList()
Logger.Debug("Filterlist contains [{0}] items", oResultList.Count)
Dim oTableNodes = oXMLDocument.SelectNodes($"//{oTableName}")
Logger.Debug("Table contains [{0}] elements", oTableNodes.Count)
For Each oElementNode As XmlNode In oTableNodes
Dim oPath As String = $"./{oFilter.ColumnName}"
Dim oSubNode = oElementNode.SelectSingleNode(oPath)
If oSubNode Is Nothing Then
Logger.Warn("Column [{0}] was not found in element.", oFilter.ColumnName)
Continue For
End If
Dim oNodeValue = oSubNode.InnerText.Trim
Logger.Debug("Element Value is [{0}]", oNodeValue)
If Not oResultList.Contains(oNodeValue) Then
Logger.Warn("Element for Column [{0}] was not found in filterlist.", oFilter.ColumnName)
Continue For
End If
Logger.Info("Removing node [{0}] containing value [{1}]", oPath, oNodeValue)
oElementNode.ParentNode.RemoveChild(oElementNode)
Next
Next
Return oXMLDocument
End Function End Function
#End Region #End Region
@@ -419,6 +538,27 @@ Namespace Winline
Return False Return False
End Try End Try
End Function End Function
Private Function ToQueryString(ByVal nvc As NameValueCollection) As String
Dim sb As StringBuilder = New StringBuilder("?")
Dim first As Boolean = True
For Each key As String In nvc.AllKeys
For Each value As String In nvc.GetValues(key)
If Not first Then
sb.Append("&")
End If
sb.AppendFormat("{0}={1}", Uri.EscapeDataString(key), Uri.EscapeDataString(value))
first = False
Next
Next
Return sb.ToString()
End Function
End Class End Class
End Namespace End Namespace

View File

@@ -1,13 +1,13 @@
Imports System.Text.RegularExpressions Imports System.Text.RegularExpressions
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Database Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Language Imports DigitalData.Modules.Base
Imports DigitalData.Modules.Filesystem
Imports MultiTool.Common.Winline.Entities Imports MultiTool.Common.Winline.Entities
Imports MultiTool.Common.Constants Imports MultiTool.Common.Constants
Imports MultiTool.Common.Templates Imports MultiTool.Common.Templates
Imports MultiTool.Common.Exceptions Imports MultiTool.Common.Exceptions
Imports MultiTool.Common.Documents Imports MultiTool.Common.Documents
Imports System.Data.SqlClient
Namespace Winline Namespace Winline
Public Class WinlineData Public Class WinlineData
@@ -17,7 +17,7 @@ Namespace Winline
Private ReadOnly Property MandatorConfig As MandatorConfig Private ReadOnly Property MandatorConfig As MandatorConfig
Private ReadOnly Property MappingConfig As MappingConfig Private ReadOnly Property MappingConfig As MappingConfig
Private ReadOnly Property Patterns As Patterns Private ReadOnly Property Patterns As Patterns
Private ReadOnly Property FileEx As File Private ReadOnly Property FileEx As FilesystemEx
Public Property Articles As New List(Of Article) Public Property Articles As New List(Of Article)
Public Property Accounts As New List(Of Account) Public Property Accounts As New List(Of Account)
@@ -33,7 +33,7 @@ Namespace Winline
Config = pConfig Config = pConfig
MandatorConfig = pMandatorConfig MandatorConfig = pMandatorConfig
MappingConfig = pMappingConfig MappingConfig = pMappingConfig
FileEx = New File(pLogConfig) FileEx = New FilesystemEx(pLogConfig)
Years = LoadEconomicYears() Years = LoadEconomicYears()
End Sub End Sub
@@ -90,7 +90,8 @@ Namespace Winline
[c075] -- EAN [c075] -- EAN
FROM [{pMandator.Server}].[{pMandator.Database}].[dbo].[v021] FROM [{pMandator.Server}].[{pMandator.Database}].[dbo].[v021]
WHERE WHERE
mesocomp = '{pMandator.Id}' AND mesoyear = {oYear}" c038 IS NULL -- Nur Aktive Artikel
AND mesocomp = '{pMandator.Id}' AND mesoyear = {oYear}"
Dim oTable = Await Database.GetDatatableAsync(oSQL) Dim oTable = Await Database.GetDatatableAsync(oSQL)
Dim oArticles As New List(Of Article) Dim oArticles As New List(Of Article)
@@ -415,6 +416,9 @@ Namespace Winline
Dim oDateTo = pDocumentDate Dim oDateTo = pDocumentDate
Dim oSQL As String = $" Dim oSQL As String = $"
SET SHOWPLAN_ALL OFF;
SET NOCOUNT ON;
SET ARITHABORT ON;
EXEC [{pMandator.Database}].[dbo].[PRCUST_GET_ACCOUNT_PRICE_CONDITION_VALUES] EXEC [{pMandator.Database}].[dbo].[PRCUST_GET_ACCOUNT_PRICE_CONDITION_VALUES]
@pAccountNr = '{pAccountNumber}', @pAccountNr = '{pAccountNumber}',
@pGroupNr = '*', @pGroupNr = '*',
@@ -430,9 +434,14 @@ Namespace Winline
@pPrintDebug = 0, @pPrintDebug = 0,
@pLog2DB = {oDebug}, @pLog2DB = {oDebug},
@pComment = 'Multitool/{pTemplate.Name}', @pComment = 'Multitool/{pTemplate.Name}',
@pResultType = 'CalcPricing' @pResultType = 'CalcPricing';
SET NOCOUNT OFF;
" "
Dim oTable As DataTable = Await Database.GetDatatableAsync(oSQL)
Dim oTable As DataTable
Using oConnection As SqlConnection = Database.GetConnection()
oTable = Await Database.GetDatatableWithConnectionObjectAsync(oSQL, oConnection, MSSQLServer.TransactionMode.NoTransaction)
End Using
If oTable.Rows.Count = 0 Then If oTable.Rows.Count = 0 Then
Logger.Debug("Price for article [{0}] and Account [{1}] was not found in Mandator: [{2}]", pArticle, pAccountNumber, pMandator.Id) Logger.Debug("Price for article [{0}] and Account [{1}] was not found in Mandator: [{2}]", pArticle, pAccountNumber, pMandator.Id)
@@ -512,6 +521,12 @@ Namespace Winline
Public Function TryGetArticleNumber(pEAN As String, pMandator As Mandator) As String Public Function TryGetArticleNumber(pEAN As String, pMandator As Mandator) As String
Try Try
If pEAN = String.Empty Then
Logger.Warn("Could not get ArticleNumber, EAN is empty.")
Return Nothing
End If
Dim oYear As Integer = Config.GetWinLineYear() Dim oYear As Integer = Config.GetWinLineYear()
Dim oSQL As String = $" Dim oSQL As String = $"
SELECT SELECT
@@ -522,11 +537,11 @@ Namespace Winline
FROM [{pMandator.Database}].[dbo].[v021] FROM [{pMandator.Database}].[dbo].[v021]
WHERE WHERE
[c075] = '{pEAN}' [c075] = '{pEAN}'
AND [c038] IS NULL -- Aktiv AND [c038] IS NULL -- Nur Aktive Artikel
AND [mesocomp] = '{pMandator.Id}' AND [mesoyear] = {oYear}" AND [mesocomp] = '{pMandator.Id}' AND [mesoyear] = {oYear}"
Dim oTable As DataTable = Database.GetDatatable(oSQL) Dim oTable As DataTable = Database.GetDatatable(oSQL)
' EAN not found in this Mandator, continue to next one ' EAN not found in this Mandator
If oTable.Rows.Count = 0 Then If oTable.Rows.Count = 0 Then
Logger.Debug("EAN [{0}] was not found in Mandator: [{1}]", pEAN, pMandator.Id) Logger.Debug("EAN [{0}] was not found in Mandator: [{1}]", pEAN, pMandator.Id)
Return Nothing Return Nothing
@@ -542,6 +557,8 @@ Namespace Winline
Dim oRow As DataRow = oTable.Rows.Item(0) Dim oRow As DataRow = oTable.Rows.Item(0)
Dim oArticleNumber As String = ItemEx(oRow, V21_MAINARTICLENUMBER, String.Empty) Dim oArticleNumber As String = ItemEx(oRow, V21_MAINARTICLENUMBER, String.Empty)
Logger.Info("Found ArticleNumber [{0}] in Column [{1}]", oArticleNumber, V21_MAINARTICLENUMBER)
Return oArticleNumber Return oArticleNumber
Catch ex As Exception Catch ex As Exception
@@ -560,7 +577,7 @@ Namespace Winline
FROM [{pMandator.Database}].[dbo].[v021] FROM [{pMandator.Database}].[dbo].[v021]
WHERE [c011] = '{pArticleNumber}' WHERE [c011] = '{pArticleNumber}'
AND [mesocomp] = '{pMandator.Id}' AND [mesoyear] = {oYear}" AND [mesocomp] = '{pMandator.Id}' AND [mesoyear] = {oYear}"
Dim oEAN As String = Database.GetScalarValue(oSQL) Dim oEAN As String = ObjectEx.NotNull(Database.GetScalarValue(oSQL), Nothing)
' EAN not found in this Mandator, continue to next one ' EAN not found in this Mandator, continue to next one
If oEAN Is Nothing Then If oEAN Is Nothing Then
@@ -625,6 +642,7 @@ Namespace Winline
[c123] -- Ersatzartikelnummer [c123] -- Ersatzartikelnummer
FROM [{pMandator.Database}].[dbo].[v021] FROM [{pMandator.Database}].[dbo].[v021]
WHERE [c011] = '{pArticleNumber}' WHERE [c011] = '{pArticleNumber}'
AND c038 IS NULL -- Nur Aktive Artikel
AND [mesocomp] = '{pMandator.Id}' AND [mesoyear] = {oYear}" AND [mesocomp] = '{pMandator.Id}' AND [mesoyear] = {oYear}"
Dim oTable As DataTable = Database.GetDatatable(oSQL) Dim oTable As DataTable = Database.GetDatatable(oSQL)
@@ -884,7 +902,7 @@ Namespace Winline
For Each oRow As DataRow In oTable.Rows For Each oRow As DataRow In oTable.Rows
Try Try
Dim oDocument = GetDocumentFromDataRow(oRow) Dim oDocument = GetDocumentFromDataRow(oRow, pDocumentType)
oDocument.Schema = pTemplate oDocument.Schema = pTemplate
oDocuments.Add(oDocument) oDocuments.Add(oDocument)
@@ -926,13 +944,13 @@ Namespace Winline
Dim oExistingCount = Await Database.GetScalarValueAsync(oSql) Dim oExistingCount = Await Database.GetScalarValueAsync(oSql)
If oExistingCount = 0 Then If oExistingCount = 0 Then
Logger.Debug("Running number [{0}] does not exist yet. Returning.") Logger.Debug("Running number [{0}] does not exist yet. Returning.", pRunningNumber)
Return pRunningNumber Return pRunningNumber
Else Else
Logger.Debug("Running number [{0}] already exists. Checking again.") Logger.Debug("Running number [{0}] already exists. Checking again.", pRunningNumber)
Dim oVersionResult = FileEx.GetVersionedString(pRunningNumber, "~"c) Dim oVersionResult = FileEx.GetVersionedString(pRunningNumber)
Dim oNewVersion = oVersionResult.Item2 + 1
Dim oFinalLength As Integer = oVersionResult.Item1.Count + oVersionResult.Item2.ToString.Count + 1 Dim oFinalLength As Integer = oVersionResult.Item1.Count + oNewVersion.ToString.Count + 1
If oFinalLength > RunningNumberMaximumLength Then If oFinalLength > RunningNumberMaximumLength Then
Logger.Warn("Running number is too long ({0} chars total) and cannot be versioned. Versioning needs at least 2 characters.", oFinalLength) Logger.Warn("Running number is too long ({0} chars total) and cannot be versioned. Versioning needs at least 2 characters.", oFinalLength)
@@ -940,7 +958,7 @@ Namespace Winline
Return pRunningNumber Return pRunningNumber
End If End If
Return Await GetVersionedRunningNumberAsync(pDocument, pMandator, pAccountNumber, $"{oVersionResult.Item1}~{oVersionResult.Item2}") Return Await GetVersionedRunningNumberAsync(pDocument, pMandator, pAccountNumber, $"{oVersionResult.Item1}~{oNewVersion}")
End If End If
Catch ex As MultiToolException Catch ex As MultiToolException
@@ -989,17 +1007,19 @@ Namespace Winline
End Try End Try
End Function End Function
Private Function GetDocumentFromDataRow(pDataRow As DataRow) As ExportDocument Private Function GetDocumentFromDataRow(pDataRow As DataRow, pDocumentType As DocumentType) As ExportDocument
Dim oAccountNumber = pDataRow.Item("ACCOUNT_NUMBER") Dim oAccountNumber = pDataRow.Item("ACCOUNT_NUMBER")
Dim oRunningNumber As String = pDataRow.Item("RUNNING_NUMBER") Dim oRunningNumber As String = pDataRow.Item("RUNNING_NUMBER")
Dim oDocumentType As Integer = pDataRow.Item("DOCUMENT_TYPE") Dim oDocumentType As Integer = pDataRow.Item("DOCUMENT_TYPE")
Dim oDocumentKind As Integer = pDataRow.Item("DOCUMENT_KIND") Dim oDocumentKind As Integer = pDataRow.Item("DOCUMENT_KIND")
Dim oGrossAmount As Double = pDataRow.Item("GROSS_AMOUNT") Dim oGrossAmount As Double = pDataRow.Item("GROSS_AMOUNT")
Dim oNetAmount As Double = pDataRow.Item("NET_AMOUNT") Dim oNetAmount As Double = pDataRow.Item("NET_AMOUNT")
Dim oExported As Boolean = pDataRow.ItemEx("ALREADY_EXPORTED", False)
Dim oExportedType As Integer = pDataRow.ItemEx("ALREADY_EXPORTED", 0)
Dim oExportedWho As String = pDataRow.ItemEx("EXPORTED_WHO", "") Dim oExportedWho As String = pDataRow.ItemEx("EXPORTED_WHO", "")
Dim oExportedWhen As Date = pDataRow.ItemEx(Of Date)("EXPORTED_WHEN", Nothing) Dim oExportedWhen As Date = pDataRow.ItemEx(Of Date)("EXPORTED_WHEN", Nothing)
Dim oExportFile As String = pDataRow.ItemEx("EXPORTED_FILE", "") Dim oExportedFile As String = pDataRow.ItemEx("EXPORTED_FILE", "")
Dim oIsExported As Boolean = GetIsExported(oExportedType, pDocumentType)
Dim oDocumentNumber As String = Nothing Dim oDocumentNumber As String = Nothing
Dim oDocumentDate As Date = Nothing Dim oDocumentDate As Date = Nothing
@@ -1018,14 +1038,17 @@ Namespace Winline
oDocumentNumber = pDataRow.Item("OFFER_NUMBER") oDocumentNumber = pDataRow.Item("OFFER_NUMBER")
oDocumentDate = pDataRow.Item("OFFER_DATE") oDocumentDate = pDataRow.Item("OFFER_DATE")
oDocumentDateColumn = "c027" oDocumentDateColumn = "c027"
Case 2, -2 Case 2, -2
oDocumentNumber = pDataRow.Item("ORDER_NUMBER") oDocumentNumber = pDataRow.Item("ORDER_NUMBER")
oDocumentDate = pDataRow.Item("ORDER_DATE") oDocumentDate = pDataRow.Item("ORDER_DATE")
oDocumentDateColumn = "c028" oDocumentDateColumn = "c028"
Case 3, -3 Case 3, -3
oDocumentNumber = pDataRow.Item("DELIVERY_NUMBER") oDocumentNumber = pDataRow.Item("DELIVERY_NUMBER")
oDocumentDate = pDataRow.Item("DELIVERY_DATE") oDocumentDate = pDataRow.Item("DELIVERY_DATE")
oDocumentDateColumn = "c029" oDocumentDateColumn = "c029"
Case 4, -4 Case 4, -4
oDocumentNumber = pDataRow.Item("INVOICE_NUMBER") oDocumentNumber = pDataRow.Item("INVOICE_NUMBER")
oDocumentDate = pDataRow.Item("INVOICE_DATE") oDocumentDate = pDataRow.Item("INVOICE_DATE")
@@ -1042,15 +1065,31 @@ Namespace Winline
.Kind = oKind, .Kind = oKind,
.GrossAmount = oGrossAmount, .GrossAmount = oGrossAmount,
.NetAmount = oNetAmount, .NetAmount = oNetAmount,
.IsExported = oExported,
.ExportedWhen = oExportedWhen, .ExportedWhen = oExportedWhen,
.ExportedWho = oExportedWho, .ExportedWho = oExportedWho,
.FilenameExport = oExportFile .FilenameExport = oExportedFile,
.IsExported = oIsExported
} }
Return oDocument Return oDocument
End Function End Function
Private Function GetIsExported(pExportedType As Integer, pDocumentType As DocumentType) As Boolean
Dim oIsExported = False
If pExportedType = 1 AndAlso (pDocumentType = DocumentType.IncomingOffer Or pDocumentType = DocumentType.OutgoingOffer) Then
oIsExported = True
ElseIf pExportedType = 2 AndAlso (pDocumentType = DocumentType.IncomingOrder Or pDocumentType = DocumentType.OutgoingOrder) Then
oIsExported = True
ElseIf pExportedType = 3 AndAlso (pDocumentType = DocumentType.IncomingDeliveryNote Or pDocumentType = DocumentType.OutgoingDeliveryNote) Then
oIsExported = True
ElseIf pExportedType = 4 AndAlso (pDocumentType = DocumentType.IncomingInvoice Or pDocumentType = DocumentType.OutgoingInvoice) Then
oIsExported = True
End If
Return oIsExported
End Function
''' <summary> ''' <summary>
''' Turns a database info like "SQLCWLDATEN on SERVER\INSTANCE" into a Tuple of two strings ''' Turns a database info like "SQLCWLDATEN on SERVER\INSTANCE" into a Tuple of two strings
''' </summary> ''' </summary>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="AutoMapper" version="10.1.1" targetFramework="net461" /> <package id="AutoMapper" version="10.1.1" targetFramework="net461" />
<package id="NLog" version="4.7.10" targetFramework="net461" /> <package id="NLog" version="5.1.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<configSections> <configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System"> <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System">
<section name="DevExpress.LookAndFeel.Design.AppSettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> <section name="DevExpress.LookAndFeel.Design.AppSettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</sectionGroup> </sectionGroup>
</configSections> </configSections>
<applicationSettings> <applicationSettings>
@@ -41,14 +41,22 @@
<value>PerMonitorV2</value> <value>PerMonitorV2</value>
</setting> </setting>
<setting name="CustomPaletteCollection" serializeAs="Xml"> <setting name="CustomPaletteCollection" serializeAs="Xml">
<value /> <value/>
</setting> </setting>
</DevExpress.LookAndFeel.Design.AppSettings> </DevExpress.LookAndFeel.Design.AppSettings>
</applicationSettings> </applicationSettings>
<connectionStrings> <connectionStrings>
<add name="MultiTool.Form.My.MySettings.DD_ECMConnectionString" connectionString="Data Source=SDD-VMP04-SQL17\SCHAUM;Initial Catalog=DD_ECM;Persist Security Info=True;User ID=sa;Password=dd" providerName="System.Data.SqlClient" /> <add name="MultiTool.Form.My.MySettings.DD_ECMConnectionString" connectionString="Data Source=SDD-VMP04-SQL17\SCHAUM;Initial Catalog=DD_ECM;Persist Security Info=True;User ID=sa;Password=dd" providerName="System.Data.SqlClient"/>
</connectionStrings> </connectionStrings>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
</startup> </startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration> </configuration>

File diff suppressed because it is too large Load Diff

View File

@@ -20,64 +20,67 @@ WHERE (GUID = @Original_GUID)</CommandText>
</DbCommand> </DbCommand>
</DeleteCommand> </DeleteCommand>
<InsertCommand> <InsertCommand>
<DbCommand CommandType="Text" ModifiedByUser="false"> <DbCommand CommandType="Text" ModifiedByUser="true">
<CommandText>INSERT INTO [TBMT_TEMPLATE_ITEMS] ([ORDER_KEY], [XML_NAME], [XML_TABLE_ID], [XML_TYPE_ID], [IS_READ_ONLY], [IS_VISIBLE], [IS_REQUIRED], [IS_VIRTUAL], [FUNCTION_ID], [FUNCTION_PARAMETERS], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (@ORDER_KEY, @XML_NAME, @XML_TABLE_ID, @XML_TYPE_ID, @IS_READ_ONLY, @IS_VISIBLE, @IS_REQUIRED, @IS_VIRTUAL, @FUNCTION_ID, @FUNCTION_PARAMETERS, @ADDED_WHO, @ADDED_WHEN, @CHANGED_WHO, @CHANGED_WHEN); <CommandText>INSERT INTO TBMT_TEMPLATE_ITEMS
(ORDER_KEY, NAME, TABLE_ID, TYPE_ID, IS_READ_ONLY, IS_VISIBLE, IS_REQUIRED, IS_VIRTUAL, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN)
VALUES (@ORDER_KEY,@NAME,@TABLE_ID,@TYPE_ID,@IS_READ_ONLY,@IS_VISIBLE,@IS_REQUIRED,@IS_VIRTUAL,@ADDED_WHO,@ADDED_WHEN,@CHANGED_WHO,@CHANGED_WHEN);
SELECT GUID, ORDER_KEY, XML_NAME, XML_TABLE_ID, XML_TYPE_ID, IS_READ_ONLY, IS_VISIBLE, IS_REQUIRED, IS_VIRTUAL, FUNCTION_ID, FUNCTION_PARAMETERS, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN FROM TBMT_TEMPLATE_ITEMS WHERE (GUID = SCOPE_IDENTITY())</CommandText> SELECT GUID, ORDER_KEY, XML_NAME, XML_TABLE_ID, XML_TYPE_ID, IS_READ_ONLY, IS_VISIBLE, IS_REQUIRED, IS_VIRTUAL, FUNCTION_ID, FUNCTION_PARAMETERS, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN FROM TBMT_TEMPLATE_ITEMS WHERE (GUID = SCOPE_IDENTITY())</CommandText>
<Parameters> <Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@ORDER_KEY" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ORDER_KEY" SourceColumnNullMapping="false" SourceVersion="Current" /> <Parameter AllowDbNull="false" AutogeneratedName="ORDER_KEY" ColumnName="ORDER_KEY" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ORDER_KEY" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ORDER_KEY" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@XML_NAME" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="XML_NAME" SourceColumnNullMapping="false" SourceVersion="Current" /> <Parameter AllowDbNull="false" AutogeneratedName="NAME" ColumnName="NAME" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="nvarchar(50)" DbType="String" Direction="Input" ParameterName="@NAME" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumn="NAME" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@XML_TABLE_ID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="XML_TABLE_ID" SourceColumnNullMapping="false" SourceVersion="Current" /> <Parameter AllowDbNull="false" AutogeneratedName="TABLE_ID" ColumnName="TABLE_ID" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@TABLE_ID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="TABLE_ID" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@XML_TYPE_ID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="XML_TYPE_ID" SourceColumnNullMapping="false" SourceVersion="Current" /> <Parameter AllowDbNull="false" AutogeneratedName="TYPE_ID" ColumnName="TYPE_ID" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@TYPE_ID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="TYPE_ID" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@IS_READ_ONLY" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="IS_READ_ONLY" SourceColumnNullMapping="false" SourceVersion="Current" /> <Parameter AllowDbNull="false" AutogeneratedName="IS_READ_ONLY" ColumnName="IS_READ_ONLY" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@IS_READ_ONLY" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="IS_READ_ONLY" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@IS_VISIBLE" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="IS_VISIBLE" SourceColumnNullMapping="false" SourceVersion="Current" /> <Parameter AllowDbNull="false" AutogeneratedName="IS_VISIBLE" ColumnName="IS_VISIBLE" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@IS_VISIBLE" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="IS_VISIBLE" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@IS_REQUIRED" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="IS_REQUIRED" SourceColumnNullMapping="false" SourceVersion="Current" /> <Parameter AllowDbNull="false" AutogeneratedName="IS_REQUIRED" ColumnName="IS_REQUIRED" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@IS_REQUIRED" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="IS_REQUIRED" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@IS_VIRTUAL" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="IS_VIRTUAL" SourceColumnNullMapping="false" SourceVersion="Current" /> <Parameter AllowDbNull="false" AutogeneratedName="IS_VIRTUAL" ColumnName="IS_VIRTUAL" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@IS_VIRTUAL" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="IS_VIRTUAL" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@FUNCTION_ID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="FUNCTION_ID" SourceColumnNullMapping="false" SourceVersion="Current" /> <Parameter AllowDbNull="false" AutogeneratedName="ADDED_WHO" ColumnName="ADDED_WHO" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="nvarchar(50)" DbType="String" Direction="Input" ParameterName="@ADDED_WHO" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumn="ADDED_WHO" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@FUNCTION_PARAMETERS" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="FUNCTION_PARAMETERS" SourceColumnNullMapping="false" SourceVersion="Current" /> <Parameter AllowDbNull="true" AutogeneratedName="ADDED_WHEN" ColumnName="ADDED_WHEN" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@ADDED_WHEN" Precision="0" ProviderType="DateTime" Scale="0" Size="8" SourceColumn="ADDED_WHEN" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@ADDED_WHO" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="ADDED_WHO" SourceColumnNullMapping="false" SourceVersion="Current" /> <Parameter AllowDbNull="true" AutogeneratedName="CHANGED_WHO" ColumnName="CHANGED_WHO" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="nvarchar(50)" DbType="String" Direction="Input" ParameterName="@CHANGED_WHO" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumn="CHANGED_WHO" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@ADDED_WHEN" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="ADDED_WHEN" SourceColumnNullMapping="false" SourceVersion="Current" /> <Parameter AllowDbNull="true" AutogeneratedName="CHANGED_WHEN" ColumnName="CHANGED_WHEN" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@CHANGED_WHEN" Precision="0" ProviderType="DateTime" Scale="0" Size="8" SourceColumn="CHANGED_WHEN" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@CHANGED_WHO" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CHANGED_WHO" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@CHANGED_WHEN" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="CHANGED_WHEN" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters> </Parameters>
</DbCommand> </DbCommand>
</InsertCommand> </InsertCommand>
<SelectCommand> <SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="false"> <DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>SELECT TBMT_TEMPLATE_ITEMS.GUID, TBMT_TEMPLATE_ITEMS.ORDER_KEY, TBMT_TEMPLATE_ITEMS.XML_NAME, TBMT_TEMPLATE_ITEMS.XML_TABLE_ID, TBMT_TEMPLATE_ITEMS.XML_TYPE_ID, <CommandText>SELECT TBMT_TEMPLATE_ITEMS.GUID, TBMT_TEMPLATE_ITEMS.ORDER_KEY, TBMT_TEMPLATE_ITEMS.NAME, TBMT_TEMPLATE_ITEMS.TABLE_ID, TBMT_TEMPLATE_ITEMS.TYPE_ID, TBMT_TEMPLATE_ITEMS.IS_READ_ONLY,
TBMT_TEMPLATE_ITEMS.IS_READ_ONLY, TBMT_TEMPLATE_ITEMS.IS_VISIBLE, TBMT_TEMPLATE_ITEMS.IS_REQUIRED, TBMT_TEMPLATE_ITEMS.IS_VIRTUAL, TBMT_TEMPLATE_ITEMS.FUNCTION_ID, TBMT_TEMPLATE_ITEMS.IS_VISIBLE, TBMT_TEMPLATE_ITEMS.IS_REQUIRED, TBMT_TEMPLATE_ITEMS.IS_VIRTUAL, TBMT_TEMPLATE_ITEMS.ACTIVE, TBMT_TEMPLATE_ITEMS.COMMENT,
TBMT_TEMPLATE_ITEMS.FUNCTION_PARAMETERS, TBMT_TEMPLATE_ITEMS.ACTIVE, TBMT_TEMPLATE_ITEMS.COMMENT, TBMT_TEMPLATE_ITEMS.ADDED_WHO, TBMT_TEMPLATE_ITEMS.ADDED_WHEN, TBMT_TEMPLATE_ITEMS.ADDED_WHO, TBMT_TEMPLATE_ITEMS.ADDED_WHEN, TBMT_TEMPLATE_ITEMS.CHANGED_WHO, TBMT_TEMPLATE_ITEMS.CHANGED_WHEN, TBTEMPLATES.NAME AS TEMPLATE_NAME,
TBMT_TEMPLATE_ITEMS.CHANGED_WHO, TBMT_TEMPLATE_ITEMS.CHANGED_WHEN, TBTEMPLATES.NAME AS TEMPLATE_NAME, TBTABLES.NAME AS TABLE_NAME TBTABLES.NAME AS TABLE_NAME, TBMT_TEMPLATE_ITEMS.PREFER_EXTERNAL
FROM TBMT_TEMPLATE_ITEMS INNER JOIN FROM TBMT_TEMPLATE_ITEMS INNER JOIN
TBMT_TABLES AS TBTABLES ON TBMT_TEMPLATE_ITEMS.XML_TABLE_ID = TBTABLES.GUID INNER JOIN TBMT_TABLES AS TBTABLES ON TBMT_TEMPLATE_ITEMS.TABLE_ID = TBTABLES.GUID INNER JOIN
TBMT_TEMPLATES AS TBTEMPLATES ON TBTABLES.TEMPLATE_ID = TBTEMPLATES.GUID</CommandText> TBMT_TEMPLATES AS TBTEMPLATES ON TBTABLES.TEMPLATE_ID = TBTEMPLATES.GUID
<Parameters /> WHERE (TBMT_TEMPLATE_ITEMS.TABLE_ID = @TABLE_ID)</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="TABLE_ID" ColumnName="TABLE_ID" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@TABLE_ID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="TABLE_ID" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand> </DbCommand>
</SelectCommand> </SelectCommand>
<UpdateCommand> <UpdateCommand>
<DbCommand CommandType="Text" ModifiedByUser="false"> <DbCommand CommandType="Text" ModifiedByUser="true">
<CommandText>UPDATE TBMT_TEMPLATE_ITEMS <CommandText>UPDATE TBMT_TEMPLATE_ITEMS
SET ORDER_KEY = @ORDER_KEY, XML_NAME = @XML_NAME, XML_TABLE_ID = @XML_TABLE_ID, XML_TYPE_ID = @XML_TYPE_ID, IS_READ_ONLY = @IS_READ_ONLY, IS_VISIBLE = @IS_VISIBLE, SET ORDER_KEY = @ORDER_KEY, NAME = @XML_NAME, TABLE_ID = @XML_TABLE_ID, TYPE_ID = @XML_TYPE_ID, IS_READ_ONLY = @IS_READ_ONLY, IS_VISIBLE = @IS_VISIBLE, IS_REQUIRED = @IS_REQUIRED,
IS_REQUIRED = @IS_REQUIRED, IS_VIRTUAL = @IS_VIRTUAL, FUNCTION_ID = @FUNCTION_ID, FUNCTION_PARAMETERS = @FUNCTION_PARAMETERS, ADDED_WHO = @ADDED_WHO, ADDED_WHEN = @ADDED_WHEN, IS_VIRTUAL = @IS_VIRTUAL, ADDED_WHO = @ADDED_WHO, ADDED_WHEN = @ADDED_WHEN, CHANGED_WHO = @CHANGED_WHO, CHANGED_WHEN = @CHANGED_WHEN, PREFER_EXTERNAL = @PREFER_EXTERNAL,
CHANGED_WHO = @CHANGED_WHO, CHANGED_WHEN = @CHANGED_WHEN ACTIVE = @ACTIVE
WHERE (GUID = @Original_GUID); WHERE (GUID = @Original_GUID);
SELECT GUID, ORDER_KEY, XML_NAME, XML_TABLE_ID, XML_TYPE_ID, IS_READ_ONLY, IS_VISIBLE, IS_REQUIRED, IS_VIRTUAL, FUNCTION_ID, FUNCTION_PARAMETERS, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN FROM TBMT_TEMPLATE_ITEMS WHERE (GUID = @GUID)</CommandText> SELECT GUID, ORDER_KEY, XML_NAME, XML_TABLE_ID, XML_TYPE_ID, IS_READ_ONLY, IS_VISIBLE, IS_REQUIRED, IS_VIRTUAL, FUNCTION_ID, FUNCTION_PARAMETERS, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN FROM TBMT_TEMPLATE_ITEMS WHERE (GUID = @GUID)</CommandText>
<Parameters> <Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="ORDER_KEY" ColumnName="ORDER_KEY" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ORDER_KEY" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ORDER_KEY" SourceColumnNullMapping="false" SourceVersion="Current" /> <Parameter AllowDbNull="false" AutogeneratedName="ORDER_KEY" ColumnName="ORDER_KEY" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ORDER_KEY" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="ORDER_KEY" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="XML_NAME" ColumnName="XML_NAME" DataSourceName="" DataTypeServer="nvarchar(50)" DbType="String" Direction="Input" ParameterName="@XML_NAME" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumn="XML_NAME" SourceColumnNullMapping="false" SourceVersion="Current" /> <Parameter AllowDbNull="false" AutogeneratedName="XML_NAME" ColumnName="NAME" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="nvarchar(50)" DbType="String" Direction="Input" ParameterName="@XML_NAME" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumn="NAME" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="XML_TABLE_ID" ColumnName="XML_TABLE_ID" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@XML_TABLE_ID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="XML_TABLE_ID" SourceColumnNullMapping="false" SourceVersion="Current" /> <Parameter AllowDbNull="false" AutogeneratedName="XML_TABLE_ID" ColumnName="TABLE_ID" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@XML_TABLE_ID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="TABLE_ID" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="XML_TYPE_ID" ColumnName="XML_TYPE_ID" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@XML_TYPE_ID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="XML_TYPE_ID" SourceColumnNullMapping="false" SourceVersion="Current" /> <Parameter AllowDbNull="false" AutogeneratedName="XML_TYPE_ID" ColumnName="TYPE_ID" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@XML_TYPE_ID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="TYPE_ID" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="IS_READ_ONLY" ColumnName="IS_READ_ONLY" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@IS_READ_ONLY" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="IS_READ_ONLY" SourceColumnNullMapping="false" SourceVersion="Current" /> <Parameter AllowDbNull="false" AutogeneratedName="IS_READ_ONLY" ColumnName="IS_READ_ONLY" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@IS_READ_ONLY" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="IS_READ_ONLY" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="IS_VISIBLE" ColumnName="IS_VISIBLE" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@IS_VISIBLE" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="IS_VISIBLE" SourceColumnNullMapping="false" SourceVersion="Current" /> <Parameter AllowDbNull="false" AutogeneratedName="IS_VISIBLE" ColumnName="IS_VISIBLE" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@IS_VISIBLE" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="IS_VISIBLE" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="IS_REQUIRED" ColumnName="IS_REQUIRED" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@IS_REQUIRED" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="IS_REQUIRED" SourceColumnNullMapping="false" SourceVersion="Current" /> <Parameter AllowDbNull="false" AutogeneratedName="IS_REQUIRED" ColumnName="IS_REQUIRED" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@IS_REQUIRED" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="IS_REQUIRED" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="IS_VIRTUAL" ColumnName="IS_VIRTUAL" DataSourceName="" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@IS_VIRTUAL" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="IS_VIRTUAL" SourceColumnNullMapping="false" SourceVersion="Current" /> <Parameter AllowDbNull="false" AutogeneratedName="IS_VIRTUAL" ColumnName="IS_VIRTUAL" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@IS_VIRTUAL" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="IS_VIRTUAL" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="FUNCTION_ID" ColumnName="FUNCTION_ID" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@FUNCTION_ID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="FUNCTION_ID" SourceColumnNullMapping="false" SourceVersion="Current" /> <Parameter AllowDbNull="false" AutogeneratedName="ADDED_WHO" ColumnName="ADDED_WHO" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="nvarchar(50)" DbType="String" Direction="Input" ParameterName="@ADDED_WHO" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumn="ADDED_WHO" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="FUNCTION_PARAMETERS" ColumnName="FUNCTION_PARAMETERS" DataSourceName="" DataTypeServer="nvarchar(MAX)" DbType="String" Direction="Input" ParameterName="@FUNCTION_PARAMETERS" Precision="0" ProviderType="NVarChar" Scale="0" Size="2147483647" SourceColumn="FUNCTION_PARAMETERS" SourceColumnNullMapping="false" SourceVersion="Current" /> <Parameter AllowDbNull="true" AutogeneratedName="ADDED_WHEN" ColumnName="ADDED_WHEN" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@ADDED_WHEN" Precision="0" ProviderType="DateTime" Scale="0" Size="8" SourceColumn="ADDED_WHEN" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="ADDED_WHO" ColumnName="ADDED_WHO" DataSourceName="" DataTypeServer="nvarchar(50)" DbType="String" Direction="Input" ParameterName="@ADDED_WHO" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumn="ADDED_WHO" SourceColumnNullMapping="false" SourceVersion="Current" /> <Parameter AllowDbNull="true" AutogeneratedName="CHANGED_WHO" ColumnName="CHANGED_WHO" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="nvarchar(50)" DbType="String" Direction="Input" ParameterName="@CHANGED_WHO" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumn="CHANGED_WHO" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="ADDED_WHEN" ColumnName="ADDED_WHEN" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@ADDED_WHEN" Precision="0" ProviderType="DateTime" Scale="0" Size="8" SourceColumn="ADDED_WHEN" SourceColumnNullMapping="false" SourceVersion="Current" /> <Parameter AllowDbNull="true" AutogeneratedName="CHANGED_WHEN" ColumnName="CHANGED_WHEN" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@CHANGED_WHEN" Precision="0" ProviderType="DateTime" Scale="0" Size="8" SourceColumn="CHANGED_WHEN" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="CHANGED_WHO" ColumnName="CHANGED_WHO" DataSourceName="" DataTypeServer="nvarchar(50)" DbType="String" Direction="Input" ParameterName="@CHANGED_WHO" Precision="0" ProviderType="NVarChar" Scale="0" Size="50" SourceColumn="CHANGED_WHO" SourceColumnNullMapping="false" SourceVersion="Current" /> <Parameter AllowDbNull="false" AutogeneratedName="PREFER_EXTERNAL" ColumnName="PREFER_EXTERNAL" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@PREFER_EXTERNAL" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="PREFER_EXTERNAL" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="CHANGED_WHEN" ColumnName="CHANGED_WHEN" DataSourceName="" DataTypeServer="datetime" DbType="DateTime" Direction="Input" ParameterName="@CHANGED_WHEN" Precision="0" ProviderType="DateTime" Scale="0" Size="8" SourceColumn="CHANGED_WHEN" SourceColumnNullMapping="false" SourceVersion="Current" /> <Parameter AllowDbNull="false" AutogeneratedName="ACTIVE" ColumnName="ACTIVE" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="bit" DbType="Boolean" Direction="Input" ParameterName="@ACTIVE" Precision="0" ProviderType="Bit" Scale="0" Size="1" SourceColumn="ACTIVE" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="Original_GUID" ColumnName="GUID" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Original_GUID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="GUID" SourceColumnNullMapping="false" SourceVersion="Original" /> <Parameter AllowDbNull="false" AutogeneratedName="Original_GUID" ColumnName="GUID" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Original_GUID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="GUID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="GUID" ColumnName="GUID" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@GUID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="GUID" SourceColumnNullMapping="false" SourceVersion="Original" /> <Parameter AllowDbNull="false" AutogeneratedName="GUID" ColumnName="GUID" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@GUID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="GUID" SourceColumnNullMapping="false" SourceVersion="Original" />
</Parameters> </Parameters>
</DbCommand> </DbCommand>
</UpdateCommand> </UpdateCommand>
@@ -85,16 +88,14 @@ SELECT GUID, ORDER_KEY, XML_NAME, XML_TABLE_ID, XML_TYPE_ID, IS_READ_ONLY, IS_VI
</MainSource> </MainSource>
<Mappings> <Mappings>
<Mapping SourceColumn="GUID" DataSetColumn="GUID" /> <Mapping SourceColumn="GUID" DataSetColumn="GUID" />
<Mapping SourceColumn="XML_NAME" DataSetColumn="XML_NAME" /> <Mapping SourceColumn="XML_NAME" DataSetColumn="NAME" />
<Mapping SourceColumn="XML_TYPE_ID" DataSetColumn="XML_TYPE_ID" /> <Mapping SourceColumn="XML_TYPE_ID" DataSetColumn="TYPE_ID" />
<Mapping SourceColumn="IS_READ_ONLY" DataSetColumn="IS_READ_ONLY" /> <Mapping SourceColumn="IS_READ_ONLY" DataSetColumn="IS_READ_ONLY" />
<Mapping SourceColumn="IS_VISIBLE" DataSetColumn="IS_VISIBLE" /> <Mapping SourceColumn="IS_VISIBLE" DataSetColumn="IS_VISIBLE" />
<Mapping SourceColumn="ORDER_KEY" DataSetColumn="ORDER_KEY" /> <Mapping SourceColumn="ORDER_KEY" DataSetColumn="ORDER_KEY" />
<Mapping SourceColumn="FUNCTION_ID" DataSetColumn="FUNCTION_ID" />
<Mapping SourceColumn="IS_REQUIRED" DataSetColumn="IS_REQUIRED" /> <Mapping SourceColumn="IS_REQUIRED" DataSetColumn="IS_REQUIRED" />
<Mapping SourceColumn="XML_TABLE_ID" DataSetColumn="XML_TABLE_ID" /> <Mapping SourceColumn="XML_TABLE_ID" DataSetColumn="TABLE_ID" />
<Mapping SourceColumn="IS_VIRTUAL" DataSetColumn="IS_VIRTUAL" /> <Mapping SourceColumn="IS_VIRTUAL" DataSetColumn="IS_VIRTUAL" />
<Mapping SourceColumn="FUNCTION_PARAMETERS" DataSetColumn="FUNCTION_PARAMETERS" />
<Mapping SourceColumn="ADDED_WHO" DataSetColumn="ADDED_WHO" /> <Mapping SourceColumn="ADDED_WHO" DataSetColumn="ADDED_WHO" />
<Mapping SourceColumn="ADDED_WHEN" DataSetColumn="ADDED_WHEN" /> <Mapping SourceColumn="ADDED_WHEN" DataSetColumn="ADDED_WHEN" />
<Mapping SourceColumn="CHANGED_WHO" DataSetColumn="CHANGED_WHO" /> <Mapping SourceColumn="CHANGED_WHO" DataSetColumn="CHANGED_WHO" />
@@ -103,6 +104,10 @@ SELECT GUID, ORDER_KEY, XML_NAME, XML_TABLE_ID, XML_TYPE_ID, IS_READ_ONLY, IS_VI
<Mapping SourceColumn="COMMENT" DataSetColumn="COMMENT" /> <Mapping SourceColumn="COMMENT" DataSetColumn="COMMENT" />
<Mapping SourceColumn="TEMPLATE_NAME" DataSetColumn="TEMPLATE_NAME" /> <Mapping SourceColumn="TEMPLATE_NAME" DataSetColumn="TEMPLATE_NAME" />
<Mapping SourceColumn="TABLE_NAME" DataSetColumn="TABLE_NAME" /> <Mapping SourceColumn="TABLE_NAME" DataSetColumn="TABLE_NAME" />
<Mapping SourceColumn="PREFER_EXTERNAL" DataSetColumn="PREFER_EXTERNAL" />
<Mapping SourceColumn="NAME" DataSetColumn="NAME" />
<Mapping SourceColumn="TABLE_ID" DataSetColumn="TABLE_ID" />
<Mapping SourceColumn="TYPE_ID" DataSetColumn="TYPE_ID" />
</Mappings> </Mappings>
<Sources /> <Sources />
</TableAdapter> </TableAdapter>
@@ -394,86 +399,173 @@ WHERE (TEMPLATE_ID IS NULL)</CommandText>
</DbSource> </DbSource>
</Sources> </Sources>
</TableAdapter> </TableAdapter>
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="TBMT_TABLESTableAdapter" GeneratorDataComponentClassName="TBMT_TABLESTableAdapter" Name="TBMT_TABLES" UserDataComponentName="TBMT_TABLESTableAdapter">
<MainSource>
<DbSource ConnectionRef="DD_ECMConnectionString (MySettings)" DbObjectName="DD_ECM.dbo.TBMT_TABLES" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
<DeleteCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>DELETE FROM [TBMT_TABLES] WHERE (([GUID] = @Original_GUID) AND ([TEMPLATE_ID] = @Original_TEMPLATE_ID) AND ([IS_HEAD] = @Original_IS_HEAD) AND ([ACTIVE] = @Original_ACTIVE) AND ((@IsNull_COMMENT = 1 AND [COMMENT] IS NULL) OR ([COMMENT] = @Original_COMMENT)) AND ([ADDED_WHO] = @Original_ADDED_WHO) AND ((@IsNull_ADDED_WHEN = 1 AND [ADDED_WHEN] IS NULL) OR ([ADDED_WHEN] = @Original_ADDED_WHEN)) AND ((@IsNull_CHANGED_WHO = 1 AND [CHANGED_WHO] IS NULL) OR ([CHANGED_WHO] = @Original_CHANGED_WHO)) AND ((@IsNull_CHANGED_WHEN = 1 AND [CHANGED_WHEN] IS NULL) OR ([CHANGED_WHEN] = @Original_CHANGED_WHEN)))</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_GUID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="GUID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_TEMPLATE_ID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="TEMPLATE_ID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Original_IS_HEAD" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="IS_HEAD" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Original_ACTIVE" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="ACTIVE" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_COMMENT" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="COMMENT" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_COMMENT" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="COMMENT" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_ADDED_WHO" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="ADDED_WHO" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_ADDED_WHEN" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ADDED_WHEN" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_ADDED_WHEN" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="ADDED_WHEN" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_CHANGED_WHO" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="CHANGED_WHO" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_CHANGED_WHO" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CHANGED_WHO" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_CHANGED_WHEN" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="CHANGED_WHEN" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_CHANGED_WHEN" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="CHANGED_WHEN" SourceColumnNullMapping="false" SourceVersion="Original" />
</Parameters>
</DbCommand>
</DeleteCommand>
<InsertCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>INSERT INTO [TBMT_TABLES] ([NAME], [TEMPLATE_ID], [IS_HEAD], [ACTIVE], [COMMENT], [ADDED_WHO], [ADDED_WHEN], [CHANGED_WHO], [CHANGED_WHEN]) VALUES (@NAME, @TEMPLATE_ID, @IS_HEAD, @ACTIVE, @COMMENT, @ADDED_WHO, @ADDED_WHEN, @CHANGED_WHO, @CHANGED_WHEN);
SELECT GUID, NAME, TEMPLATE_ID, IS_HEAD, ACTIVE, COMMENT, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN FROM TBMT_TABLES WHERE (GUID = SCOPE_IDENTITY())</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@NAME" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="NAME" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@TEMPLATE_ID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="TEMPLATE_ID" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@IS_HEAD" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="IS_HEAD" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@ACTIVE" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="ACTIVE" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@COMMENT" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="COMMENT" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@ADDED_WHO" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="ADDED_WHO" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@ADDED_WHEN" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="ADDED_WHEN" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@CHANGED_WHO" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CHANGED_WHO" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@CHANGED_WHEN" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="CHANGED_WHEN" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</InsertCommand>
<SelectCommand>
<DbCommand CommandType="Text" ModifiedByUser="true">
<CommandText>SELECT TBMT_TABLES.*
FROM TBMT_TABLES</CommandText>
<Parameters />
</DbCommand>
</SelectCommand>
<UpdateCommand>
<DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>UPDATE [TBMT_TABLES] SET [NAME] = @NAME, [TEMPLATE_ID] = @TEMPLATE_ID, [IS_HEAD] = @IS_HEAD, [ACTIVE] = @ACTIVE, [COMMENT] = @COMMENT, [ADDED_WHO] = @ADDED_WHO, [ADDED_WHEN] = @ADDED_WHEN, [CHANGED_WHO] = @CHANGED_WHO, [CHANGED_WHEN] = @CHANGED_WHEN WHERE (([GUID] = @Original_GUID) AND ([TEMPLATE_ID] = @Original_TEMPLATE_ID) AND ([IS_HEAD] = @Original_IS_HEAD) AND ([ACTIVE] = @Original_ACTIVE) AND ((@IsNull_COMMENT = 1 AND [COMMENT] IS NULL) OR ([COMMENT] = @Original_COMMENT)) AND ([ADDED_WHO] = @Original_ADDED_WHO) AND ((@IsNull_ADDED_WHEN = 1 AND [ADDED_WHEN] IS NULL) OR ([ADDED_WHEN] = @Original_ADDED_WHEN)) AND ((@IsNull_CHANGED_WHO = 1 AND [CHANGED_WHO] IS NULL) OR ([CHANGED_WHO] = @Original_CHANGED_WHO)) AND ((@IsNull_CHANGED_WHEN = 1 AND [CHANGED_WHEN] IS NULL) OR ([CHANGED_WHEN] = @Original_CHANGED_WHEN)));
SELECT GUID, NAME, TEMPLATE_ID, IS_HEAD, ACTIVE, COMMENT, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN FROM TBMT_TABLES WHERE (GUID = @GUID)</CommandText>
<Parameters>
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@NAME" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="NAME" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@TEMPLATE_ID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="TEMPLATE_ID" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@IS_HEAD" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="IS_HEAD" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@ACTIVE" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="ACTIVE" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@COMMENT" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="COMMENT" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@ADDED_WHO" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="ADDED_WHO" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@ADDED_WHEN" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="ADDED_WHEN" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@CHANGED_WHO" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CHANGED_WHO" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@CHANGED_WHEN" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="CHANGED_WHEN" SourceColumnNullMapping="false" SourceVersion="Current" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_GUID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="GUID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_TEMPLATE_ID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="TEMPLATE_ID" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Original_IS_HEAD" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="IS_HEAD" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Original_ACTIVE" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="ACTIVE" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_COMMENT" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="COMMENT" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_COMMENT" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="COMMENT" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_ADDED_WHO" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="ADDED_WHO" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_ADDED_WHEN" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ADDED_WHEN" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_ADDED_WHEN" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="ADDED_WHEN" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_CHANGED_WHO" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="CHANGED_WHO" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@Original_CHANGED_WHO" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="CHANGED_WHO" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@IsNull_CHANGED_WHEN" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="CHANGED_WHEN" SourceColumnNullMapping="true" SourceVersion="Original" />
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Original_CHANGED_WHEN" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="CHANGED_WHEN" SourceColumnNullMapping="false" SourceVersion="Original" />
<Parameter AllowDbNull="false" AutogeneratedName="GUID" ColumnName="GUID" DataSourceName="DD_ECM.dbo.TBMT_TABLES" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@GUID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="GUID" SourceColumnNullMapping="false" SourceVersion="Current" />
</Parameters>
</DbCommand>
</UpdateCommand>
</DbSource>
</MainSource>
<Mappings>
<Mapping SourceColumn="GUID" DataSetColumn="GUID" />
<Mapping SourceColumn="NAME" DataSetColumn="NAME" />
<Mapping SourceColumn="TEMPLATE_ID" DataSetColumn="TEMPLATE_ID" />
<Mapping SourceColumn="IS_HEAD" DataSetColumn="IS_HEAD" />
<Mapping SourceColumn="ACTIVE" DataSetColumn="ACTIVE" />
<Mapping SourceColumn="COMMENT" DataSetColumn="COMMENT" />
<Mapping SourceColumn="ADDED_WHO" DataSetColumn="ADDED_WHO" />
<Mapping SourceColumn="ADDED_WHEN" DataSetColumn="ADDED_WHEN" />
<Mapping SourceColumn="CHANGED_WHO" DataSetColumn="CHANGED_WHO" />
<Mapping SourceColumn="CHANGED_WHEN" DataSetColumn="CHANGED_WHEN" />
</Mappings>
<Sources />
</TableAdapter>
</Tables> </Tables>
<Sources /> <Sources />
</DataSource> </DataSource>
</xs:appinfo> </xs:appinfo>
</xs:annotation> </xs:annotation>
<xs:element name="DS_DD_ECM" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="DS_DD_ECM" msprop:Generator_UserDSName="DS_DD_ECM"> <xs:element name="DS_DD_ECM" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_UserDSName="DS_DD_ECM" msprop:Generator_DataSetName="DS_DD_ECM">
<xs:complexType> <xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="TBMT_TEMPLATE_ITEMS" msprop:Generator_TableClassName="TBMT_TEMPLATE_ITEMSDataTable" msprop:Generator_TableVarName="tableTBMT_TEMPLATE_ITEMS" msprop:Generator_RowChangedName="TBMT_TEMPLATE_ITEMSRowChanged" msprop:Generator_TablePropName="TBMT_TEMPLATE_ITEMS" msprop:Generator_RowDeletingName="TBMT_TEMPLATE_ITEMSRowDeleting" msprop:Generator_RowChangingName="TBMT_TEMPLATE_ITEMSRowChanging" msprop:Generator_RowEvHandlerName="TBMT_TEMPLATE_ITEMSRowChangeEventHandler" msprop:Generator_RowDeletedName="TBMT_TEMPLATE_ITEMSRowDeleted" msprop:Generator_RowClassName="TBMT_TEMPLATE_ITEMSRow" msprop:Generator_UserTableName="TBMT_TEMPLATE_ITEMS" msprop:Generator_RowEvArgName="TBMT_TEMPLATE_ITEMSRowChangeEvent"> <xs:element name="TBMT_TEMPLATE_ITEMS" msprop:Generator_RowEvHandlerName="TBMT_TEMPLATE_ITEMSRowChangeEventHandler" msprop:Generator_RowDeletedName="TBMT_TEMPLATE_ITEMSRowDeleted" msprop:Generator_RowDeletingName="TBMT_TEMPLATE_ITEMSRowDeleting" msprop:Generator_RowEvArgName="TBMT_TEMPLATE_ITEMSRowChangeEvent" msprop:Generator_TablePropName="TBMT_TEMPLATE_ITEMS" msprop:Generator_RowChangedName="TBMT_TEMPLATE_ITEMSRowChanged" msprop:Generator_RowChangingName="TBMT_TEMPLATE_ITEMSRowChanging" msprop:Generator_TableClassName="TBMT_TEMPLATE_ITEMSDataTable" msprop:Generator_RowClassName="TBMT_TEMPLATE_ITEMSRow" msprop:Generator_TableVarName="tableTBMT_TEMPLATE_ITEMS" msprop:Generator_UserTableName="TBMT_TEMPLATE_ITEMS">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element name="GUID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnGUID" msprop:Generator_ColumnPropNameInRow="GUID" msprop:Generator_ColumnPropNameInTable="GUIDColumn" msprop:Generator_UserColumnName="GUID" type="xs:int" /> <xs:element name="GUID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnPropNameInRow="GUID" msprop:Generator_ColumnPropNameInTable="GUIDColumn" msprop:Generator_ColumnVarNameInTable="columnGUID" msprop:Generator_UserColumnName="GUID" type="xs:int" />
<xs:element name="XML_NAME" msprop:Generator_ColumnVarNameInTable="columnXML_NAME" msprop:Generator_ColumnPropNameInRow="XML_NAME" msprop:Generator_ColumnPropNameInTable="XML_NAMEColumn" msprop:Generator_UserColumnName="XML_NAME"> <xs:element name="NAME" msprop:Generator_ColumnPropNameInRow="NAME" msprop:Generator_ColumnPropNameInTable="NAMEColumn" msprop:Generator_ColumnVarNameInTable="columnNAME" msprop:Generator_UserColumnName="NAME">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="50" /> <xs:maxLength value="50" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="XML_TYPE_ID" msprop:Generator_ColumnVarNameInTable="columnXML_TYPE_ID" msprop:Generator_ColumnPropNameInRow="XML_TYPE_ID" msprop:Generator_ColumnPropNameInTable="XML_TYPE_IDColumn" msprop:Generator_UserColumnName="XML_TYPE_ID" type="xs:int" /> <xs:element name="TYPE_ID" msprop:Generator_ColumnPropNameInRow="TYPE_ID" msprop:Generator_ColumnPropNameInTable="TYPE_IDColumn" msprop:Generator_ColumnVarNameInTable="columnTYPE_ID" msprop:Generator_UserColumnName="TYPE_ID" type="xs:int" />
<xs:element name="IS_READ_ONLY" msprop:Generator_ColumnVarNameInTable="columnIS_READ_ONLY" msprop:Generator_ColumnPropNameInRow="IS_READ_ONLY" msprop:Generator_ColumnPropNameInTable="IS_READ_ONLYColumn" msprop:Generator_UserColumnName="IS_READ_ONLY" type="xs:boolean" /> <xs:element name="IS_READ_ONLY" msprop:Generator_ColumnPropNameInRow="IS_READ_ONLY" msprop:Generator_ColumnPropNameInTable="IS_READ_ONLYColumn" msprop:Generator_ColumnVarNameInTable="columnIS_READ_ONLY" msprop:Generator_UserColumnName="IS_READ_ONLY" type="xs:boolean" />
<xs:element name="IS_VISIBLE" msprop:Generator_ColumnVarNameInTable="columnIS_VISIBLE" msprop:Generator_ColumnPropNameInRow="IS_VISIBLE" msprop:Generator_ColumnPropNameInTable="IS_VISIBLEColumn" msprop:Generator_UserColumnName="IS_VISIBLE" type="xs:boolean" /> <xs:element name="IS_VISIBLE" msprop:Generator_ColumnPropNameInRow="IS_VISIBLE" msprop:Generator_ColumnPropNameInTable="IS_VISIBLEColumn" msprop:Generator_ColumnVarNameInTable="columnIS_VISIBLE" msprop:Generator_UserColumnName="IS_VISIBLE" type="xs:boolean" />
<xs:element name="ORDER_KEY" msprop:Generator_ColumnVarNameInTable="columnORDER_KEY" msprop:Generator_ColumnPropNameInRow="ORDER_KEY" msprop:Generator_ColumnPropNameInTable="ORDER_KEYColumn" msprop:Generator_UserColumnName="ORDER_KEY" type="xs:int" /> <xs:element name="ORDER_KEY" msprop:Generator_ColumnPropNameInRow="ORDER_KEY" msprop:Generator_ColumnPropNameInTable="ORDER_KEYColumn" msprop:Generator_ColumnVarNameInTable="columnORDER_KEY" msprop:Generator_UserColumnName="ORDER_KEY" type="xs:int" />
<xs:element name="FUNCTION_ID" msprop:Generator_ColumnVarNameInTable="columnFUNCTION_ID" msprop:Generator_ColumnPropNameInRow="FUNCTION_ID" msprop:Generator_ColumnPropNameInTable="FUNCTION_IDColumn" msprop:Generator_UserColumnName="FUNCTION_ID" type="xs:int" minOccurs="0" /> <xs:element name="IS_REQUIRED" msprop:Generator_ColumnPropNameInRow="IS_REQUIRED" msprop:Generator_ColumnPropNameInTable="IS_REQUIREDColumn" msprop:Generator_ColumnVarNameInTable="columnIS_REQUIRED" msprop:Generator_UserColumnName="IS_REQUIRED" type="xs:boolean" />
<xs:element name="IS_REQUIRED" msprop:Generator_ColumnVarNameInTable="columnIS_REQUIRED" msprop:Generator_ColumnPropNameInRow="IS_REQUIRED" msprop:Generator_ColumnPropNameInTable="IS_REQUIREDColumn" msprop:Generator_UserColumnName="IS_REQUIRED" type="xs:boolean" /> <xs:element name="TABLE_ID" msprop:Generator_ColumnPropNameInRow="TABLE_ID" msprop:Generator_ColumnPropNameInTable="TABLE_IDColumn" msprop:Generator_ColumnVarNameInTable="columnTABLE_ID" msprop:Generator_UserColumnName="TABLE_ID" type="xs:int" />
<xs:element name="XML_TABLE_ID" msprop:Generator_ColumnVarNameInTable="columnXML_TABLE_ID" msprop:Generator_ColumnPropNameInRow="XML_TABLE_ID" msprop:Generator_ColumnPropNameInTable="XML_TABLE_IDColumn" msprop:Generator_UserColumnName="XML_TABLE_ID" type="xs:int" /> <xs:element name="IS_VIRTUAL" msprop:Generator_ColumnPropNameInRow="IS_VIRTUAL" msprop:Generator_ColumnPropNameInTable="IS_VIRTUALColumn" msprop:Generator_ColumnVarNameInTable="columnIS_VIRTUAL" msprop:Generator_UserColumnName="IS_VIRTUAL" type="xs:boolean" />
<xs:element name="IS_VIRTUAL" msprop:Generator_ColumnVarNameInTable="columnIS_VIRTUAL" msprop:Generator_ColumnPropNameInRow="IS_VIRTUAL" msprop:Generator_ColumnPropNameInTable="IS_VIRTUALColumn" msprop:Generator_UserColumnName="IS_VIRTUAL" type="xs:boolean" /> <xs:element name="ADDED_WHO" msprop:Generator_ColumnPropNameInRow="ADDED_WHO" msprop:Generator_ColumnPropNameInTable="ADDED_WHOColumn" msprop:Generator_ColumnVarNameInTable="columnADDED_WHO" msprop:Generator_UserColumnName="ADDED_WHO">
<xs:element name="FUNCTION_PARAMETERS" msprop:Generator_ColumnVarNameInTable="columnFUNCTION_PARAMETERS" msprop:Generator_ColumnPropNameInRow="FUNCTION_PARAMETERS" msprop:Generator_ColumnPropNameInTable="FUNCTION_PARAMETERSColumn" msprop:Generator_UserColumnName="FUNCTION_PARAMETERS" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2147483647" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="ADDED_WHO" msprop:Generator_ColumnVarNameInTable="columnADDED_WHO" msprop:Generator_ColumnPropNameInRow="ADDED_WHO" msprop:Generator_ColumnPropNameInTable="ADDED_WHOColumn" msprop:Generator_UserColumnName="ADDED_WHO">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="50" /> <xs:maxLength value="50" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="ADDED_WHEN" msprop:Generator_ColumnVarNameInTable="columnADDED_WHEN" msprop:Generator_ColumnPropNameInRow="ADDED_WHEN" msprop:Generator_ColumnPropNameInTable="ADDED_WHENColumn" msprop:Generator_UserColumnName="ADDED_WHEN" type="xs:dateTime" minOccurs="0" /> <xs:element name="ADDED_WHEN" msprop:Generator_ColumnPropNameInRow="ADDED_WHEN" msprop:Generator_ColumnPropNameInTable="ADDED_WHENColumn" msprop:Generator_ColumnVarNameInTable="columnADDED_WHEN" msprop:Generator_UserColumnName="ADDED_WHEN" type="xs:dateTime" minOccurs="0" />
<xs:element name="CHANGED_WHO" msprop:Generator_ColumnVarNameInTable="columnCHANGED_WHO" msprop:Generator_ColumnPropNameInRow="CHANGED_WHO" msprop:Generator_ColumnPropNameInTable="CHANGED_WHOColumn" msprop:Generator_UserColumnName="CHANGED_WHO" minOccurs="0"> <xs:element name="CHANGED_WHO" msprop:Generator_ColumnPropNameInRow="CHANGED_WHO" msprop:Generator_ColumnPropNameInTable="CHANGED_WHOColumn" msprop:Generator_ColumnVarNameInTable="columnCHANGED_WHO" msprop:Generator_UserColumnName="CHANGED_WHO" minOccurs="0">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="50" /> <xs:maxLength value="50" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="CHANGED_WHEN" msprop:Generator_ColumnVarNameInTable="columnCHANGED_WHEN" msprop:Generator_ColumnPropNameInRow="CHANGED_WHEN" msprop:Generator_ColumnPropNameInTable="CHANGED_WHENColumn" msprop:Generator_UserColumnName="CHANGED_WHEN" type="xs:dateTime" minOccurs="0" /> <xs:element name="CHANGED_WHEN" msprop:Generator_ColumnPropNameInRow="CHANGED_WHEN" msprop:Generator_ColumnPropNameInTable="CHANGED_WHENColumn" msprop:Generator_ColumnVarNameInTable="columnCHANGED_WHEN" msprop:Generator_UserColumnName="CHANGED_WHEN" type="xs:dateTime" minOccurs="0" />
<xs:element name="ACTIVE" msprop:Generator_ColumnVarNameInTable="columnACTIVE" msprop:Generator_ColumnPropNameInRow="ACTIVE" msprop:Generator_ColumnPropNameInTable="ACTIVEColumn" msprop:Generator_UserColumnName="ACTIVE" type="xs:boolean" /> <xs:element name="ACTIVE" msprop:Generator_ColumnPropNameInRow="ACTIVE" msprop:Generator_ColumnPropNameInTable="ACTIVEColumn" msprop:Generator_ColumnVarNameInTable="columnACTIVE" msprop:Generator_UserColumnName="ACTIVE" type="xs:boolean" />
<xs:element name="COMMENT" msprop:Generator_ColumnVarNameInTable="columnCOMMENT" msprop:Generator_ColumnPropNameInRow="COMMENT" msprop:Generator_ColumnPropNameInTable="COMMENTColumn" msprop:Generator_UserColumnName="COMMENT" minOccurs="0"> <xs:element name="COMMENT" msprop:Generator_ColumnPropNameInRow="COMMENT" msprop:Generator_ColumnPropNameInTable="COMMENTColumn" msprop:Generator_ColumnVarNameInTable="columnCOMMENT" msprop:Generator_UserColumnName="COMMENT" minOccurs="0">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="100" /> <xs:maxLength value="100" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="TEMPLATE_NAME" msprop:Generator_ColumnVarNameInTable="columnTEMPLATE_NAME" msprop:Generator_ColumnPropNameInRow="TEMPLATE_NAME" msprop:Generator_ColumnPropNameInTable="TEMPLATE_NAMEColumn" msprop:Generator_UserColumnName="TEMPLATE_NAME"> <xs:element name="TEMPLATE_NAME" msprop:Generator_ColumnPropNameInRow="TEMPLATE_NAME" msprop:Generator_ColumnPropNameInTable="TEMPLATE_NAMEColumn" msprop:Generator_ColumnVarNameInTable="columnTEMPLATE_NAME" msprop:Generator_UserColumnName="TEMPLATE_NAME">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="20" /> <xs:maxLength value="20" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="TABLE_NAME" msprop:Generator_ColumnVarNameInTable="columnTABLE_NAME" msprop:Generator_ColumnPropNameInRow="TABLE_NAME" msprop:Generator_ColumnPropNameInTable="TABLE_NAMEColumn" msprop:Generator_UserColumnName="TABLE_NAME"> <xs:element name="TABLE_NAME" msprop:Generator_ColumnPropNameInRow="TABLE_NAME" msprop:Generator_ColumnPropNameInTable="TABLE_NAMEColumn" msprop:Generator_ColumnVarNameInTable="columnTABLE_NAME" msprop:Generator_UserColumnName="TABLE_NAME">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="2147483647" /> <xs:maxLength value="2147483647" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="PREFER_EXTERNAL" msprop:Generator_ColumnPropNameInRow="PREFER_EXTERNAL" msprop:Generator_ColumnPropNameInTable="PREFER_EXTERNALColumn" msprop:Generator_ColumnVarNameInTable="columnPREFER_EXTERNAL" msprop:Generator_UserColumnName="PREFER_EXTERNAL" type="xs:boolean" />
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
<xs:element name="TBEDI_XML_TYPES" msprop:Generator_TableClassName="TBEDI_XML_TYPESDataTable" msprop:Generator_TableVarName="tableTBEDI_XML_TYPES" msprop:Generator_RowChangedName="TBEDI_XML_TYPESRowChanged" msprop:Generator_TablePropName="TBEDI_XML_TYPES" msprop:Generator_RowDeletingName="TBEDI_XML_TYPESRowDeleting" msprop:Generator_RowChangingName="TBEDI_XML_TYPESRowChanging" msprop:Generator_RowEvHandlerName="TBEDI_XML_TYPESRowChangeEventHandler" msprop:Generator_RowDeletedName="TBEDI_XML_TYPESRowDeleted" msprop:Generator_RowClassName="TBEDI_XML_TYPESRow" msprop:Generator_UserTableName="TBEDI_XML_TYPES" msprop:Generator_RowEvArgName="TBEDI_XML_TYPESRowChangeEvent"> <xs:element name="TBEDI_XML_TYPES" msprop:Generator_RowEvHandlerName="TBEDI_XML_TYPESRowChangeEventHandler" msprop:Generator_RowDeletedName="TBEDI_XML_TYPESRowDeleted" msprop:Generator_RowDeletingName="TBEDI_XML_TYPESRowDeleting" msprop:Generator_RowEvArgName="TBEDI_XML_TYPESRowChangeEvent" msprop:Generator_TablePropName="TBEDI_XML_TYPES" msprop:Generator_RowChangedName="TBEDI_XML_TYPESRowChanged" msprop:Generator_RowChangingName="TBEDI_XML_TYPESRowChanging" msprop:Generator_TableClassName="TBEDI_XML_TYPESDataTable" msprop:Generator_RowClassName="TBEDI_XML_TYPESRow" msprop:Generator_TableVarName="tableTBEDI_XML_TYPES" msprop:Generator_UserTableName="TBEDI_XML_TYPES">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element name="GUID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnGUID" msprop:Generator_ColumnPropNameInRow="GUID" msprop:Generator_ColumnPropNameInTable="GUIDColumn" msprop:Generator_UserColumnName="GUID" type="xs:int" /> <xs:element name="GUID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnPropNameInRow="GUID" msprop:Generator_ColumnPropNameInTable="GUIDColumn" msprop:Generator_ColumnVarNameInTable="columnGUID" msprop:Generator_UserColumnName="GUID" type="xs:int" />
<xs:element name="NAME" msprop:Generator_ColumnVarNameInTable="columnNAME" msprop:Generator_ColumnPropNameInRow="NAME" msprop:Generator_ColumnPropNameInTable="NAMEColumn" msprop:Generator_UserColumnName="NAME"> <xs:element name="NAME" msprop:Generator_ColumnPropNameInRow="NAME" msprop:Generator_ColumnPropNameInTable="NAMEColumn" msprop:Generator_ColumnVarNameInTable="columnNAME" msprop:Generator_UserColumnName="NAME">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="20" /> <xs:maxLength value="20" />
@@ -483,18 +575,18 @@ WHERE (TEMPLATE_ID IS NULL)</CommandText>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
<xs:element name="TBMT_TEMPLATES" msprop:Generator_TableClassName="TBMT_TEMPLATESDataTable" msprop:Generator_TableVarName="tableTBMT_TEMPLATES" msprop:Generator_RowChangedName="TBMT_TEMPLATESRowChanged" msprop:Generator_TablePropName="TBMT_TEMPLATES" msprop:Generator_RowDeletingName="TBMT_TEMPLATESRowDeleting" msprop:Generator_RowChangingName="TBMT_TEMPLATESRowChanging" msprop:Generator_RowEvHandlerName="TBMT_TEMPLATESRowChangeEventHandler" msprop:Generator_RowDeletedName="TBMT_TEMPLATESRowDeleted" msprop:Generator_RowClassName="TBMT_TEMPLATESRow" msprop:Generator_UserTableName="TBMT_TEMPLATES" msprop:Generator_RowEvArgName="TBMT_TEMPLATESRowChangeEvent"> <xs:element name="TBMT_TEMPLATES" msprop:Generator_RowEvHandlerName="TBMT_TEMPLATESRowChangeEventHandler" msprop:Generator_RowDeletedName="TBMT_TEMPLATESRowDeleted" msprop:Generator_RowDeletingName="TBMT_TEMPLATESRowDeleting" msprop:Generator_RowEvArgName="TBMT_TEMPLATESRowChangeEvent" msprop:Generator_TablePropName="TBMT_TEMPLATES" msprop:Generator_RowChangedName="TBMT_TEMPLATESRowChanged" msprop:Generator_RowChangingName="TBMT_TEMPLATESRowChanging" msprop:Generator_TableClassName="TBMT_TEMPLATESDataTable" msprop:Generator_RowClassName="TBMT_TEMPLATESRow" msprop:Generator_TableVarName="tableTBMT_TEMPLATES" msprop:Generator_UserTableName="TBMT_TEMPLATES">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element name="GUID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnGUID" msprop:Generator_ColumnPropNameInRow="GUID" msprop:Generator_ColumnPropNameInTable="GUIDColumn" msprop:Generator_UserColumnName="GUID" type="xs:int" /> <xs:element name="GUID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnPropNameInRow="GUID" msprop:Generator_ColumnPropNameInTable="GUIDColumn" msprop:Generator_ColumnVarNameInTable="columnGUID" msprop:Generator_UserColumnName="GUID" type="xs:int" />
<xs:element name="NAME" msprop:Generator_ColumnVarNameInTable="columnNAME" msprop:Generator_ColumnPropNameInRow="NAME" msprop:Generator_ColumnPropNameInTable="NAMEColumn" msprop:Generator_UserColumnName="NAME"> <xs:element name="NAME" msprop:Generator_ColumnPropNameInRow="NAME" msprop:Generator_ColumnPropNameInTable="NAMEColumn" msprop:Generator_ColumnVarNameInTable="columnNAME" msprop:Generator_UserColumnName="NAME">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="20" /> <xs:maxLength value="20" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="DESCRIPTION" msprop:Generator_ColumnVarNameInTable="columnDESCRIPTION" msprop:Generator_ColumnPropNameInRow="DESCRIPTION" msprop:Generator_ColumnPropNameInTable="DESCRIPTIONColumn" msprop:Generator_UserColumnName="DESCRIPTION" minOccurs="0"> <xs:element name="DESCRIPTION" msprop:Generator_ColumnPropNameInRow="DESCRIPTION" msprop:Generator_ColumnPropNameInTable="DESCRIPTIONColumn" msprop:Generator_ColumnVarNameInTable="columnDESCRIPTION" msprop:Generator_UserColumnName="DESCRIPTION" minOccurs="0">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="2147483647" /> <xs:maxLength value="2147483647" />
@@ -504,41 +596,41 @@ WHERE (TEMPLATE_ID IS NULL)</CommandText>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
<xs:element name="TBEDI_XML_NODES" msprop:Generator_TableClassName="TBEDI_XML_NODESDataTable" msprop:Generator_TableVarName="tableTBEDI_XML_NODES" msprop:Generator_RowChangedName="TBEDI_XML_NODESRowChanged" msprop:Generator_TablePropName="TBEDI_XML_NODES" msprop:Generator_RowDeletingName="TBEDI_XML_NODESRowDeleting" msprop:Generator_RowChangingName="TBEDI_XML_NODESRowChanging" msprop:Generator_RowEvHandlerName="TBEDI_XML_NODESRowChangeEventHandler" msprop:Generator_RowDeletedName="TBEDI_XML_NODESRowDeleted" msprop:Generator_RowClassName="TBEDI_XML_NODESRow" msprop:Generator_UserTableName="TBEDI_XML_NODES" msprop:Generator_RowEvArgName="TBEDI_XML_NODESRowChangeEvent"> <xs:element name="TBEDI_XML_NODES" msprop:Generator_RowEvHandlerName="TBEDI_XML_NODESRowChangeEventHandler" msprop:Generator_RowDeletedName="TBEDI_XML_NODESRowDeleted" msprop:Generator_RowDeletingName="TBEDI_XML_NODESRowDeleting" msprop:Generator_RowEvArgName="TBEDI_XML_NODESRowChangeEvent" msprop:Generator_TablePropName="TBEDI_XML_NODES" msprop:Generator_RowChangedName="TBEDI_XML_NODESRowChanged" msprop:Generator_RowChangingName="TBEDI_XML_NODESRowChanging" msprop:Generator_TableClassName="TBEDI_XML_NODESDataTable" msprop:Generator_RowClassName="TBEDI_XML_NODESRow" msprop:Generator_TableVarName="tableTBEDI_XML_NODES" msprop:Generator_UserTableName="TBEDI_XML_NODES">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element name="GUID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnGUID" msprop:Generator_ColumnPropNameInRow="GUID" msprop:Generator_ColumnPropNameInTable="GUIDColumn" msprop:Generator_UserColumnName="GUID" type="xs:int" /> <xs:element name="GUID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnPropNameInRow="GUID" msprop:Generator_ColumnPropNameInTable="GUIDColumn" msprop:Generator_ColumnVarNameInTable="columnGUID" msprop:Generator_UserColumnName="GUID" type="xs:int" />
<xs:element name="NAME" msprop:Generator_ColumnVarNameInTable="columnNAME" msprop:Generator_ColumnPropNameInRow="NAME" msprop:Generator_ColumnPropNameInTable="NAMEColumn" msprop:Generator_UserColumnName="NAME"> <xs:element name="NAME" msprop:Generator_ColumnPropNameInRow="NAME" msprop:Generator_ColumnPropNameInTable="NAMEColumn" msprop:Generator_ColumnVarNameInTable="columnNAME" msprop:Generator_UserColumnName="NAME">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="2147483647" /> <xs:maxLength value="2147483647" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="TEMPLATE_ID" msprop:Generator_ColumnVarNameInTable="columnTEMPLATE_ID" msprop:Generator_ColumnPropNameInRow="TEMPLATE_ID" msprop:Generator_ColumnPropNameInTable="TEMPLATE_IDColumn" msprop:Generator_UserColumnName="TEMPLATE_ID" type="xs:int" /> <xs:element name="TEMPLATE_ID" msprop:Generator_ColumnPropNameInRow="TEMPLATE_ID" msprop:Generator_ColumnPropNameInTable="TEMPLATE_IDColumn" msprop:Generator_ColumnVarNameInTable="columnTEMPLATE_ID" msprop:Generator_UserColumnName="TEMPLATE_ID" type="xs:int" />
<xs:element name="IS_HEAD" msprop:Generator_ColumnVarNameInTable="columnIS_HEAD" msprop:Generator_ColumnPropNameInRow="IS_HEAD" msprop:Generator_ColumnPropNameInTable="IS_HEADColumn" msprop:Generator_UserColumnName="IS_HEAD" type="xs:boolean" /> <xs:element name="IS_HEAD" msprop:Generator_ColumnPropNameInRow="IS_HEAD" msprop:Generator_ColumnPropNameInTable="IS_HEADColumn" msprop:Generator_ColumnVarNameInTable="columnIS_HEAD" msprop:Generator_UserColumnName="IS_HEAD" type="xs:boolean" />
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
<xs:element name="TBMT_FUNCTIONS" msprop:Generator_TableClassName="TBMT_FUNCTIONSDataTable" msprop:Generator_TableVarName="tableTBMT_FUNCTIONS" msprop:Generator_RowChangedName="TBMT_FUNCTIONSRowChanged" msprop:Generator_TablePropName="TBMT_FUNCTIONS" msprop:Generator_RowDeletingName="TBMT_FUNCTIONSRowDeleting" msprop:Generator_RowChangingName="TBMT_FUNCTIONSRowChanging" msprop:Generator_RowEvHandlerName="TBMT_FUNCTIONSRowChangeEventHandler" msprop:Generator_RowDeletedName="TBMT_FUNCTIONSRowDeleted" msprop:Generator_RowClassName="TBMT_FUNCTIONSRow" msprop:Generator_UserTableName="TBMT_FUNCTIONS" msprop:Generator_RowEvArgName="TBMT_FUNCTIONSRowChangeEvent"> <xs:element name="TBMT_FUNCTIONS" msprop:Generator_RowEvHandlerName="TBMT_FUNCTIONSRowChangeEventHandler" msprop:Generator_RowDeletedName="TBMT_FUNCTIONSRowDeleted" msprop:Generator_RowDeletingName="TBMT_FUNCTIONSRowDeleting" msprop:Generator_RowEvArgName="TBMT_FUNCTIONSRowChangeEvent" msprop:Generator_TablePropName="TBMT_FUNCTIONS" msprop:Generator_RowChangedName="TBMT_FUNCTIONSRowChanged" msprop:Generator_RowChangingName="TBMT_FUNCTIONSRowChanging" msprop:Generator_TableClassName="TBMT_FUNCTIONSDataTable" msprop:Generator_RowClassName="TBMT_FUNCTIONSRow" msprop:Generator_TableVarName="tableTBMT_FUNCTIONS" msprop:Generator_UserTableName="TBMT_FUNCTIONS">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element name="GUID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnGUID" msprop:Generator_ColumnPropNameInRow="GUID" msprop:Generator_ColumnPropNameInTable="GUIDColumn" msprop:Generator_UserColumnName="GUID" type="xs:int" /> <xs:element name="GUID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnPropNameInRow="GUID" msprop:Generator_ColumnPropNameInTable="GUIDColumn" msprop:Generator_ColumnVarNameInTable="columnGUID" msprop:Generator_UserColumnName="GUID" type="xs:int" />
<xs:element name="NAME" msprop:Generator_ColumnVarNameInTable="columnNAME" msprop:Generator_ColumnPropNameInRow="NAME" msprop:Generator_ColumnPropNameInTable="NAMEColumn" msprop:Generator_UserColumnName="NAME"> <xs:element name="NAME" msprop:Generator_ColumnPropNameInRow="NAME" msprop:Generator_ColumnPropNameInTable="NAMEColumn" msprop:Generator_ColumnVarNameInTable="columnNAME" msprop:Generator_UserColumnName="NAME">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="2147483647" /> <xs:maxLength value="2147483647" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="DESCRIPTION" msprop:Generator_ColumnVarNameInTable="columnDESCRIPTION" msprop:Generator_ColumnPropNameInRow="DESCRIPTION" msprop:Generator_ColumnPropNameInTable="DESCRIPTIONColumn" msprop:Generator_UserColumnName="DESCRIPTION"> <xs:element name="DESCRIPTION" msprop:Generator_ColumnPropNameInRow="DESCRIPTION" msprop:Generator_ColumnPropNameInTable="DESCRIPTIONColumn" msprop:Generator_ColumnVarNameInTable="columnDESCRIPTION" msprop:Generator_UserColumnName="DESCRIPTION">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="2147483647" /> <xs:maxLength value="2147483647" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="PARAMETERS" msprop:Generator_ColumnVarNameInTable="columnPARAMETERS" msprop:Generator_ColumnPropNameInRow="PARAMETERS" msprop:Generator_ColumnPropNameInTable="PARAMETERSColumn" msprop:Generator_UserColumnName="PARAMETERS" minOccurs="0"> <xs:element name="PARAMETERS" msprop:Generator_ColumnPropNameInRow="PARAMETERS" msprop:Generator_ColumnPropNameInTable="PARAMETERSColumn" msprop:Generator_ColumnVarNameInTable="columnPARAMETERS" msprop:Generator_UserColumnName="PARAMETERS" minOccurs="0">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="2147483647" /> <xs:maxLength value="2147483647" />
@@ -548,43 +640,43 @@ WHERE (TEMPLATE_ID IS NULL)</CommandText>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
<xs:element name="TBMT_CONFIG" msprop:Generator_TableClassName="TBMT_CONFIGDataTable" msprop:Generator_TableVarName="tableTBMT_CONFIG" msprop:Generator_RowChangedName="TBMT_CONFIGRowChanged" msprop:Generator_TablePropName="TBMT_CONFIG" msprop:Generator_RowDeletingName="TBMT_CONFIGRowDeleting" msprop:Generator_RowChangingName="TBMT_CONFIGRowChanging" msprop:Generator_RowEvHandlerName="TBMT_CONFIGRowChangeEventHandler" msprop:Generator_RowDeletedName="TBMT_CONFIGRowDeleted" msprop:Generator_RowClassName="TBMT_CONFIGRow" msprop:Generator_UserTableName="TBMT_CONFIG" msprop:Generator_RowEvArgName="TBMT_CONFIGRowChangeEvent"> <xs:element name="TBMT_CONFIG" msprop:Generator_RowEvHandlerName="TBMT_CONFIGRowChangeEventHandler" msprop:Generator_RowDeletedName="TBMT_CONFIGRowDeleted" msprop:Generator_RowDeletingName="TBMT_CONFIGRowDeleting" msprop:Generator_RowEvArgName="TBMT_CONFIGRowChangeEvent" msprop:Generator_TablePropName="TBMT_CONFIG" msprop:Generator_RowChangedName="TBMT_CONFIGRowChanged" msprop:Generator_RowChangingName="TBMT_CONFIGRowChanging" msprop:Generator_TableClassName="TBMT_CONFIGDataTable" msprop:Generator_RowClassName="TBMT_CONFIGRow" msprop:Generator_TableVarName="tableTBMT_CONFIG" msprop:Generator_UserTableName="TBMT_CONFIG">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element name="GUID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnGUID" msprop:Generator_ColumnPropNameInRow="GUID" msprop:Generator_ColumnPropNameInTable="GUIDColumn" msprop:Generator_UserColumnName="GUID" type="xs:int" /> <xs:element name="GUID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnPropNameInRow="GUID" msprop:Generator_ColumnPropNameInTable="GUIDColumn" msprop:Generator_ColumnVarNameInTable="columnGUID" msprop:Generator_UserColumnName="GUID" type="xs:int" />
<xs:element name="KEY" msprop:Generator_ColumnVarNameInTable="columnKEY" msprop:Generator_ColumnPropNameInRow="KEY" msprop:Generator_ColumnPropNameInTable="KEYColumn" msprop:Generator_UserColumnName="KEY"> <xs:element name="KEY" msprop:Generator_ColumnPropNameInRow="KEY" msprop:Generator_ColumnPropNameInTable="KEYColumn" msprop:Generator_ColumnVarNameInTable="columnKEY" msprop:Generator_UserColumnName="KEY">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="100" /> <xs:maxLength value="100" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="VALUE" msprop:Generator_ColumnVarNameInTable="columnVALUE" msprop:Generator_ColumnPropNameInRow="VALUE" msprop:Generator_ColumnPropNameInTable="VALUEColumn" msprop:Generator_UserColumnName="VALUE"> <xs:element name="VALUE" msprop:Generator_ColumnPropNameInRow="VALUE" msprop:Generator_ColumnPropNameInTable="VALUEColumn" msprop:Generator_ColumnVarNameInTable="columnVALUE" msprop:Generator_UserColumnName="VALUE">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="500" /> <xs:maxLength value="500" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="ADDED_WHO" msprop:Generator_ColumnVarNameInTable="columnADDED_WHO" msprop:Generator_ColumnPropNameInRow="ADDED_WHO" msprop:Generator_ColumnPropNameInTable="ADDED_WHOColumn" msprop:Generator_UserColumnName="ADDED_WHO"> <xs:element name="ADDED_WHO" msprop:Generator_ColumnPropNameInRow="ADDED_WHO" msprop:Generator_ColumnPropNameInTable="ADDED_WHOColumn" msprop:Generator_ColumnVarNameInTable="columnADDED_WHO" msprop:Generator_UserColumnName="ADDED_WHO">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="50" /> <xs:maxLength value="50" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="ADDED_WHEN" msprop:Generator_ColumnVarNameInTable="columnADDED_WHEN" msprop:Generator_ColumnPropNameInRow="ADDED_WHEN" msprop:Generator_ColumnPropNameInTable="ADDED_WHENColumn" msprop:Generator_UserColumnName="ADDED_WHEN" type="xs:dateTime" minOccurs="0" /> <xs:element name="ADDED_WHEN" msprop:Generator_ColumnPropNameInRow="ADDED_WHEN" msprop:Generator_ColumnPropNameInTable="ADDED_WHENColumn" msprop:Generator_ColumnVarNameInTable="columnADDED_WHEN" msprop:Generator_UserColumnName="ADDED_WHEN" type="xs:dateTime" minOccurs="0" />
<xs:element name="CHANGED_WHO" msprop:Generator_ColumnVarNameInTable="columnCHANGED_WHO" msprop:Generator_ColumnPropNameInRow="CHANGED_WHO" msprop:Generator_ColumnPropNameInTable="CHANGED_WHOColumn" msprop:Generator_UserColumnName="CHANGED_WHO" minOccurs="0"> <xs:element name="CHANGED_WHO" msprop:Generator_ColumnPropNameInRow="CHANGED_WHO" msprop:Generator_ColumnPropNameInTable="CHANGED_WHOColumn" msprop:Generator_ColumnVarNameInTable="columnCHANGED_WHO" msprop:Generator_UserColumnName="CHANGED_WHO" minOccurs="0">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="50" /> <xs:maxLength value="50" />
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
</xs:element> </xs:element>
<xs:element name="CHANGED_WHEN" msprop:Generator_ColumnVarNameInTable="columnCHANGED_WHEN" msprop:Generator_ColumnPropNameInRow="CHANGED_WHEN" msprop:Generator_ColumnPropNameInTable="CHANGED_WHENColumn" msprop:Generator_UserColumnName="CHANGED_WHEN" type="xs:dateTime" minOccurs="0" /> <xs:element name="CHANGED_WHEN" msprop:Generator_ColumnPropNameInRow="CHANGED_WHEN" msprop:Generator_ColumnPropNameInTable="CHANGED_WHENColumn" msprop:Generator_ColumnVarNameInTable="columnCHANGED_WHEN" msprop:Generator_UserColumnName="CHANGED_WHEN" type="xs:dateTime" minOccurs="0" />
<xs:element name="ACTIVE" msprop:Generator_ColumnVarNameInTable="columnACTIVE" msprop:Generator_ColumnPropNameInRow="ACTIVE" msprop:Generator_ColumnPropNameInTable="ACTIVEColumn" msprop:Generator_UserColumnName="ACTIVE" type="xs:boolean" default="false" /> <xs:element name="ACTIVE" msprop:Generator_ColumnPropNameInRow="ACTIVE" msprop:Generator_ColumnPropNameInTable="ACTIVEColumn" msprop:Generator_ColumnVarNameInTable="columnACTIVE" msprop:Generator_UserColumnName="ACTIVE" type="xs:boolean" default="false" />
<xs:element name="TEMPLATE_ID" msprop:Generator_ColumnVarNameInTable="columnTEMPLATE_ID" msprop:Generator_ColumnPropNameInRow="TEMPLATE_ID" msprop:Generator_ColumnPropNameInTable="TEMPLATE_IDColumn" msprop:Generator_UserColumnName="TEMPLATE_ID" type="xs:int" minOccurs="0" /> <xs:element name="TEMPLATE_ID" msprop:Generator_ColumnPropNameInRow="TEMPLATE_ID" msprop:Generator_ColumnPropNameInTable="TEMPLATE_IDColumn" msprop:Generator_ColumnVarNameInTable="columnTEMPLATE_ID" msprop:Generator_UserColumnName="TEMPLATE_ID" type="xs:int" minOccurs="0" />
<xs:element name="COMMENT" msprop:Generator_ColumnVarNameInTable="columnCOMMENT" msprop:Generator_ColumnPropNameInRow="COMMENT" msprop:Generator_ColumnPropNameInTable="COMMENTColumn" msprop:Generator_UserColumnName="COMMENT" minOccurs="0"> <xs:element name="COMMENT" msprop:Generator_ColumnPropNameInRow="COMMENT" msprop:Generator_ColumnPropNameInTable="COMMENTColumn" msprop:Generator_ColumnVarNameInTable="columnCOMMENT" msprop:Generator_UserColumnName="COMMENT" minOccurs="0">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:maxLength value="100" /> <xs:maxLength value="100" />
@@ -594,6 +686,46 @@ WHERE (TEMPLATE_ID IS NULL)</CommandText>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
<xs:element name="TBMT_TABLES" msprop:Generator_RowClassName="TBMT_TABLESRow" msprop:Generator_RowEvHandlerName="TBMT_TABLESRowChangeEventHandler" msprop:Generator_RowDeletedName="TBMT_TABLESRowDeleted" msprop:Generator_RowDeletingName="TBMT_TABLESRowDeleting" msprop:Generator_RowEvArgName="TBMT_TABLESRowChangeEvent" msprop:Generator_TablePropName="TBMT_TABLES" msprop:Generator_RowChangedName="TBMT_TABLESRowChanged" msprop:Generator_RowChangingName="TBMT_TABLESRowChanging" msprop:Generator_TableClassName="TBMT_TABLESDataTable" msprop:Generator_UserTableName="TBMT_TABLES" msprop:Generator_TableVarName="tableTBMT_TABLES">
<xs:complexType>
<xs:sequence>
<xs:element name="GUID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnPropNameInRow="GUID" msprop:Generator_ColumnPropNameInTable="GUIDColumn" msprop:Generator_ColumnVarNameInTable="columnGUID" msprop:Generator_UserColumnName="GUID" type="xs:int" />
<xs:element name="NAME" msprop:Generator_ColumnPropNameInRow="NAME" msprop:Generator_ColumnPropNameInTable="NAMEColumn" msprop:Generator_ColumnVarNameInTable="columnNAME" msprop:Generator_UserColumnName="NAME">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2147483647" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="TEMPLATE_ID" msprop:Generator_ColumnPropNameInRow="TEMPLATE_ID" msprop:Generator_ColumnPropNameInTable="TEMPLATE_IDColumn" msprop:Generator_ColumnVarNameInTable="columnTEMPLATE_ID" msprop:Generator_UserColumnName="TEMPLATE_ID" type="xs:int" />
<xs:element name="IS_HEAD" msprop:Generator_ColumnPropNameInRow="IS_HEAD" msprop:Generator_ColumnPropNameInTable="IS_HEADColumn" msprop:Generator_ColumnVarNameInTable="columnIS_HEAD" msprop:Generator_UserColumnName="IS_HEAD" type="xs:boolean" />
<xs:element name="ACTIVE" msprop:Generator_ColumnPropNameInRow="ACTIVE" msprop:Generator_ColumnPropNameInTable="ACTIVEColumn" msprop:Generator_ColumnVarNameInTable="columnACTIVE" msprop:Generator_UserColumnName="ACTIVE" type="xs:boolean" />
<xs:element name="COMMENT" msprop:Generator_ColumnPropNameInRow="COMMENT" msprop:Generator_ColumnPropNameInTable="COMMENTColumn" msprop:Generator_ColumnVarNameInTable="columnCOMMENT" msprop:Generator_UserColumnName="COMMENT" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="100" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="ADDED_WHO" msprop:Generator_ColumnPropNameInRow="ADDED_WHO" msprop:Generator_ColumnPropNameInTable="ADDED_WHOColumn" msprop:Generator_ColumnVarNameInTable="columnADDED_WHO" msprop:Generator_UserColumnName="ADDED_WHO">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="ADDED_WHEN" msprop:Generator_ColumnPropNameInRow="ADDED_WHEN" msprop:Generator_ColumnPropNameInTable="ADDED_WHENColumn" msprop:Generator_ColumnVarNameInTable="columnADDED_WHEN" msprop:Generator_UserColumnName="ADDED_WHEN" type="xs:dateTime" minOccurs="0" />
<xs:element name="CHANGED_WHO" msprop:Generator_ColumnPropNameInRow="CHANGED_WHO" msprop:Generator_ColumnPropNameInTable="CHANGED_WHOColumn" msprop:Generator_ColumnVarNameInTable="columnCHANGED_WHO" msprop:Generator_UserColumnName="CHANGED_WHO" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CHANGED_WHEN" msprop:Generator_ColumnPropNameInRow="CHANGED_WHEN" msprop:Generator_ColumnPropNameInTable="CHANGED_WHENColumn" msprop:Generator_ColumnVarNameInTable="columnCHANGED_WHEN" msprop:Generator_UserColumnName="CHANGED_WHEN" type="xs:dateTime" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice> </xs:choice>
</xs:complexType> </xs:complexType>
<xs:unique name="Constraint1" msdata:PrimaryKey="true"> <xs:unique name="Constraint1" msdata:PrimaryKey="true">
@@ -620,12 +752,15 @@ WHERE (TEMPLATE_ID IS NULL)</CommandText>
<xs:selector xpath=".//mstns:TBMT_CONFIG" /> <xs:selector xpath=".//mstns:TBMT_CONFIG" />
<xs:field xpath="mstns:GUID" /> <xs:field xpath="mstns:GUID" />
</xs:unique> </xs:unique>
<xs:unique name="TBMT_TABLES_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
<xs:selector xpath=".//mstns:TBMT_TABLES" />
<xs:field xpath="mstns:GUID" />
</xs:unique>
</xs:element> </xs:element>
<xs:annotation> <xs:annotation>
<xs:appinfo> <xs:appinfo>
<msdata:Relationship name="TBMT_TEMPLATE_ITEMS_TBMT_FUNCTIONS" msdata:parent="TBMT_TEMPLATE_ITEMS" msdata:child="TBMT_FUNCTIONS" msdata:parentkey="FUNCTION_ID" msdata:childkey="GUID" msprop:Generator_UserChildTable="TBMT_FUNCTIONS" msprop:Generator_ChildPropName="GetTBMT_FUNCTIONSRows" msprop:Generator_UserRelationName="TBMT_TEMPLATE_ITEMS_TBMT_FUNCTIONS" msprop:Generator_RelationVarName="relationTBMT_TEMPLATE_ITEMS_TBMT_FUNCTIONS" msprop:Generator_UserParentTable="TBMT_TEMPLATE_ITEMS" msprop:Generator_ParentPropName="TBMT_TEMPLATE_ITEMSRow" /> <msdata:Relationship name="TBMT_TEMPLATE_ITEMS_TBEDI_XML_TYPES" msdata:parent="TBMT_TEMPLATE_ITEMS" msdata:child="TBEDI_XML_TYPES" msdata:parentkey="TYPE_ID" msdata:childkey="GUID" msprop:Generator_UserParentTable="TBMT_TEMPLATE_ITEMS" msprop:Generator_UserChildTable="TBEDI_XML_TYPES" msprop:Generator_RelationVarName="relationTBMT_TEMPLATE_ITEMS_TBEDI_XML_TYPES" msprop:Generator_ChildPropName="GetTBEDI_XML_TYPESRows" msprop:Generator_ParentPropName="TBMT_TEMPLATE_ITEMSRow" msprop:Generator_UserRelationName="TBMT_TEMPLATE_ITEMS_TBEDI_XML_TYPES" />
<msdata:Relationship name="TBMT_TEMPLATE_ITEMS_TBEDI_XML_TYPES" msdata:parent="TBMT_TEMPLATE_ITEMS" msdata:child="TBEDI_XML_TYPES" msdata:parentkey="XML_TYPE_ID" msdata:childkey="GUID" msprop:Generator_UserChildTable="TBEDI_XML_TYPES" msprop:Generator_ChildPropName="GetTBEDI_XML_TYPESRows" msprop:Generator_UserRelationName="TBMT_TEMPLATE_ITEMS_TBEDI_XML_TYPES" msprop:Generator_RelationVarName="relationTBMT_TEMPLATE_ITEMS_TBEDI_XML_TYPES" msprop:Generator_UserParentTable="TBMT_TEMPLATE_ITEMS" msprop:Generator_ParentPropName="TBMT_TEMPLATE_ITEMSRow" /> <msdata:Relationship name="TBEDI_XML_NODES_TBMT_TEMPLATES" msdata:parent="TBEDI_XML_NODES" msdata:child="TBMT_TEMPLATES" msdata:parentkey="TEMPLATE_ID" msdata:childkey="GUID" msprop:Generator_ChildPropName="GetTBMT_TEMPLATESRows" msprop:Generator_UserChildTable="TBMT_TEMPLATES" msprop:Generator_RelationVarName="relationTBEDI_XML_NODES_TBMT_TEMPLATES" msprop:Generator_UserRelationName="TBEDI_XML_NODES_TBMT_TEMPLATES" msprop:Generator_UserParentTable="TBEDI_XML_NODES" msprop:Generator_ParentPropName="TBEDI_XML_NODESRow" />
<msdata:Relationship name="TBEDI_XML_NODES_TBMT_TEMPLATES" msdata:parent="TBEDI_XML_NODES" msdata:child="TBMT_TEMPLATES" msdata:parentkey="TEMPLATE_ID" msdata:childkey="GUID" msprop:Generator_UserChildTable="TBMT_TEMPLATES" msprop:Generator_ChildPropName="GetTBMT_TEMPLATESRows" msprop:Generator_UserRelationName="TBEDI_XML_NODES_TBMT_TEMPLATES" msprop:Generator_ParentPropName="TBEDI_XML_NODESRow" msprop:Generator_RelationVarName="relationTBEDI_XML_NODES_TBMT_TEMPLATES" msprop:Generator_UserParentTable="TBEDI_XML_NODES" />
</xs:appinfo> </xs:appinfo>
</xs:annotation> </xs:annotation>
</xs:schema> </xs:schema>

View File

@@ -4,33 +4,18 @@
Changes to this file may cause incorrect behavior and will be lost if Changes to this file may cause incorrect behavior and will be lost if
the code is regenerated. the code is regenerated.
</autogenerated>--> </autogenerated>-->
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-60" ViewPortY="-55" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout"> <DiagramLayout xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ex:showrelationlabel="False" ViewPortX="-51" ViewPortY="-55" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
<Shapes> <Shapes>
<Shape ID="DesignTable:TBMT_TEMPLATE_ITEMS" ZOrder="1" X="5" Y="8" Height="305" Width="252" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" /> <Shape ID="DesignTable:TBMT_TEMPLATE_ITEMS" ZOrder="2" X="5" Y="8" Height="305" Width="252" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:TBEDI_XML_TYPES" ZOrder="9" X="525" Y="204" Height="115" Width="251" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" /> <Shape ID="DesignTable:TBEDI_XML_TYPES" ZOrder="9" X="525" Y="204" Height="115" Width="251" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
<Shape ID="DesignTable:TBMT_TEMPLATES" ZOrder="7" X="1069" Y="27" Height="134" Width="285" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" /> <Shape ID="DesignTable:TBMT_TEMPLATES" ZOrder="7" X="1069" Y="27" Height="134" Width="285" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
<Shape ID="DesignTable:TBEDI_XML_NODES" ZOrder="5" X="513" Y="22" Height="153" Width="257" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" /> <Shape ID="DesignTable:TBEDI_XML_NODES" ZOrder="6" X="513" Y="22" Height="153" Width="257" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
<Shape ID="DesignTable:TBMT_FUNCTIONS" ZOrder="8" X="472" Y="347" Height="153" Width="286" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" /> <Shape ID="DesignTable:TBMT_FUNCTIONS" ZOrder="8" X="472" Y="347" Height="153" Width="286" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
<Shape ID="DesignTable:TBMT_CONFIG" ZOrder="2" X="-25" Y="383" Height="286" Width="230" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="216" /> <Shape ID="DesignTable:TBMT_CONFIG" ZOrder="3" X="-25" Y="383" Height="286" Width="230" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="216" />
<Shape ID="DesignTable:TBMT_TABLES" ZOrder="1" X="884" Y="396" Height="267" Width="227" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="216" />
</Shapes> </Shapes>
<Connectors> <Connectors>
<Connector ID="DesignRelation:TBMT_TEMPLATE_ITEMS_TBMT_FUNCTIONS" ZOrder="6" LineWidth="11"> <Connector ID="DesignRelation:TBMT_TEMPLATE_ITEMS_TBEDI_XML_TYPES" ZOrder="4" LineWidth="11">
<RoutePoints>
<Point>
<X>240</X>
<Y>313</Y>
</Point>
<Point>
<X>240</X>
<Y>364</Y>
</Point>
<Point>
<X>472</X>
<Y>364</Y>
</Point>
</RoutePoints>
</Connector>
<Connector ID="DesignRelation:TBMT_TEMPLATE_ITEMS_TBEDI_XML_TYPES" ZOrder="3" LineWidth="11">
<RoutePoints> <RoutePoints>
<Point> <Point>
<X>257</X> <X>257</X>
@@ -42,7 +27,7 @@
</Point> </Point>
</RoutePoints> </RoutePoints>
</Connector> </Connector>
<Connector ID="DesignRelation:TBEDI_XML_NODES_TBMT_TEMPLATES" ZOrder="4" LineWidth="11"> <Connector ID="DesignRelation:TBEDI_XML_NODES_TBMT_TEMPLATES" ZOrder="5" LineWidth="11">
<RoutePoints> <RoutePoints>
<Point> <Point>
<X>770</X> <X>770</X>

View File

@@ -39,6 +39,7 @@ Public Class FormHelper
MsgBox(oMessage, MsgBoxStyle.Exclamation, Form.Text) MsgBox(oMessage, MsgBoxStyle.Exclamation, Form.Text)
End Sub End Sub
Public Sub TryOpenDirectory(pPath As String, pDisplayName As String) Public Sub TryOpenDirectory(pPath As String, pDisplayName As String)
If IO.Directory.Exists(pPath) Then If IO.Directory.Exists(pPath) Then
Process.Start(pPath) Process.Start(pPath)

View File

@@ -11,9 +11,10 @@
<AssemblyName>MultiTool.Form</AssemblyName> <AssemblyName>MultiTool.Form</AssemblyName>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<MyType>WindowsForms</MyType> <MyType>WindowsForms</MyType>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
@@ -96,35 +97,28 @@
<Reference Include="DevExpress.XtraRichEdit.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" /> <Reference Include="DevExpress.XtraRichEdit.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DevExpress.XtraTreeList.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <Reference Include="DevExpress.XtraTreeList.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.XtraVerticalGrid.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" /> <Reference Include="DevExpress.XtraVerticalGrid.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
<Reference Include="DigitalData.Controls.SQLConfig">
<HintPath>..\..\DDMonorepo\SQLConfig\bin\Debug\DigitalData.Controls.SQLConfig.dll</HintPath>
</Reference>
<Reference Include="DigitalData.GUIs.Common"> <Reference Include="DigitalData.GUIs.Common">
<HintPath>..\..\DDMonorepo\GUIs.Common\bin\Debug\DigitalData.GUIs.Common.dll</HintPath> <HintPath>..\..\DDMonorepo\GUIs.Common\bin\Debug\DigitalData.GUIs.Common.dll</HintPath>
</Reference> </Reference>
<Reference Include="DigitalData.Modules.Base"> <Reference Include="DigitalData.Modules.Base, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\DDMonorepo\Modules.Base\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Config">
<HintPath>..\..\DDMonorepo\Modules.Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Database">
<HintPath>..\..\DDMonorepo\Modules.Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Filesystem, Version=1.0.7.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\DDMonorepo\Modules.Filesystem\bin\Debug\DigitalData.Modules.Filesystem.dll</HintPath> <HintPath>..\..\DDModules\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
</Reference> </Reference>
<Reference Include="DigitalData.Modules.Language, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="DigitalData.Modules.Config, Version=1.1.4.1, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\DDMonorepo\Modules.Language\bin\Debug\DigitalData.Modules.Language.dll</HintPath> <HintPath>..\..\DDModules\Config\bin\Debug\DigitalData.Modules.Config.dll</HintPath>
</Reference> </Reference>
<Reference Include="DigitalData.Modules.Logging"> <Reference Include="DigitalData.Modules.Database, Version=2.2.7.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\DDMonorepo\Modules.Logging\bin\Release\DigitalData.Modules.Logging.dll</HintPath> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\DDModules\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Logging, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.7.10\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.5.1.0\lib\net46\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" /> <Reference Include="System.ComponentModel.DataAnnotations" />
@@ -247,9 +241,14 @@
<DependentUpon>frmImportMainExtra.resx</DependentUpon> <DependentUpon>frmImportMainExtra.resx</DependentUpon>
</Compile> </Compile>
<Compile Include="Strings\frmShared.Designer.vb"> <Compile Include="Strings\frmShared.Designer.vb">
<DependentUpon>frmShared.resx</DependentUpon>
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
<DependentUpon>frmShared.resx</DependentUpon> </Compile>
<Compile Include="Strings\frmShared.en.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>frmShared.en.resx</DependentUpon>
</Compile> </Compile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@@ -306,9 +305,14 @@
<LastGenOutput>frmImportMainExtra.Designer.vb</LastGenOutput> <LastGenOutput>frmImportMainExtra.Designer.vb</LastGenOutput>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Strings\frmShared.resx"> <EmbeddedResource Include="Strings\frmShared.resx">
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<Generator>ResXFileCodeGenerator</Generator> <Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>frmShared.Designer.vb</LastGenOutput> <LastGenOutput>frmShared.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
</EmbeddedResource>
<EmbeddedResource Include="Strings\frmShared.en.resx">
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>frmShared.en.Designer.vb</LastGenOutput>
</EmbeddedResource> </EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@@ -12,8 +12,8 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyDescription("WebService Multitool für WinLine")> <Assembly: AssemblyDescription("WebService Multitool für WinLine")>
<Assembly: AssemblyCompany("Digital Data")> <Assembly: AssemblyCompany("Digital Data")>
<Assembly: AssemblyProduct("WebService Multitool")> <Assembly: AssemblyProduct("WebService Multitool")>
<Assembly: AssemblyCopyright("Copyright © 2022")> <Assembly: AssemblyCopyright("Copyright © 2024")>
<Assembly: AssemblyTrademark("1.3.0.0")> <Assembly: AssemblyTrademark("1.4.4.3")>
<Assembly: ComVisible(False)> <Assembly: ComVisible(False)>
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' indem Sie "*" wie unten gezeigt eingeben: ' indem Sie "*" wie unten gezeigt eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.3.0.0")> <Assembly: AssemblyVersion("1.4.4.3")>
<Assembly: AssemblyFileVersion("1.0.0.0")> <Assembly: AssemblyFileVersion("1.0.0.0")>

View File

@@ -22,7 +22,7 @@ Namespace My.Resources
'''<summary> '''<summary>
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
'''</summary> '''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0"), _ <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _

View File

@@ -15,7 +15,7 @@ Option Explicit On
Namespace My Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0"), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase Inherits Global.System.Configuration.ApplicationSettingsBase

View File

@@ -9,6 +9,7 @@ Namespace My
Friend Property MappingConfiguration As MappingConfig Friend Property MappingConfiguration As MappingConfig
Friend Property MandatorConfiguration As MandatorConfig Friend Property MandatorConfiguration As MandatorConfig
Friend Property GeneralConfiguration As GeneralConfig Friend Property GeneralConfiguration As GeneralConfig
Friend Property FilterConfiguration As FilterConfig
Friend Property Winline As WinlineData Friend Property Winline As WinlineData
End Module End Module
End Namespace End Namespace

View File

@@ -22,7 +22,7 @@ Namespace My.Resources
'''<summary> '''<summary>
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
'''</summary> '''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0"), _ <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
Friend Class frmImportMainExtra Friend Class frmImportMainExtra

View File

@@ -22,7 +22,7 @@ Namespace My.Resources
'''<summary> '''<summary>
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
'''</summary> '''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0"), _ <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
Friend Class frmMainExtra Friend Class frmMainExtra

View File

@@ -22,7 +22,7 @@ Namespace My.Resources
'''<summary> '''<summary>
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
'''</summary> '''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0"), _ <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
Friend Class frmRowEditorExtra Friend Class frmRowEditorExtra
@@ -65,7 +65,7 @@ Namespace My.Resources
End Property End Property
'''<summary> '''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die Datumswert für &apos;{oField.Key}&apos; enthält einen ungüligen Wert. Bitte benutzen Sie das Format &apos;YYYY-MM-DD&apos;. ähnelt. ''' Sucht eine lokalisierte Zeichenfolge, die Datumswert für &apos;{0}&apos; enthält einen ungüligen Wert. Bitte benutzen Sie das Format &apos;YYYY-MM-DD&apos;. ähnelt.
'''</summary> '''</summary>
Friend Shared ReadOnly Property Datumswert_für___0___enthält_einen_ungüligen_Wert() As String Friend Shared ReadOnly Property Datumswert_für___0___enthält_einen_ungüligen_Wert() As String
Get Get

View File

@@ -118,6 +118,6 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="Datumswert für '{0}' enthält einen ungüligen Wert" xml:space="preserve"> <data name="Datumswert für '{0}' enthält einen ungüligen Wert" xml:space="preserve">
<value>Datumswert für '{oField.Key}' enthält einen ungüligen Wert. Bitte benutzen Sie das Format 'YYYY-MM-DD'.</value> <value>Datumswert für '{0}' enthält einen ungüligen Wert. Bitte benutzen Sie das Format 'YYYY-MM-DD'.</value>
</data> </data>
</root> </root>

View File

@@ -22,7 +22,7 @@ Namespace My.Resources
'''<summary> '''<summary>
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
'''</summary> '''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0"), _ <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
Friend Class frmShared Friend Class frmShared

View File

View File

@@ -0,0 +1,132 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Auswahl der Vorlage" xml:space="preserve">
<value>Selection of Template</value>
</data>
<data name="In der Funktion '{0}' ist folgender Fehler aufgetreten: {1}" xml:space="preserve">
<value>The following error occurred in Function '{0}': {1}</value>
</data>
<data name="Laden des Formulars" xml:space="preserve">
<value>Form Load</value>
</data>
<data name="{0} - WebService Multitool für WinLine" xml:space="preserve">
<value>{0} - WebService Multitool for WinLine</value>
</data>
</root>

File diff suppressed because it is too large Load Diff

View File

@@ -118,16 +118,13 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="TBEDIXMLITEMSBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="TBEDIXMLITEMSBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>313, 17</value> <value>136, 17</value>
</metadata> </metadata>
<metadata name="DS_DD_ECM.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="DS_DD_ECM.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>194, 17</value> <value>17, 17</value>
</metadata> </metadata>
<metadata name="DS_DD_ECM.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="TBMT_TABLESBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>194, 17</value> <value>1210, 16</value>
</metadata>
<metadata name="TBMT_CONFIGBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>758, 17</value>
</metadata> </metadata>
<assembly alias="DevExpress.Data.v21.2" name="DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <assembly alias="DevExpress.Data.v21.2" name="DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<data name="BarButtonItem1.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="BarButtonItem1.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
@@ -146,13 +143,22 @@
IC8+DQo8L3N2Zz4L IC8+DQo8L3N2Zz4L
</value> </value>
</data> </data>
<metadata name="TBMT_CONFIGBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>613, 17</value>
</metadata>
<metadata name="TBMT_TEMPLATE_ITEMSTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="TBMT_TEMPLATE_ITEMSTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>533, 17</value> <value>356, 17</value>
</metadata> </metadata>
<metadata name="TBMT_CONFIGTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="TBMT_CONFIGTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>999, 17</value> <value>824, 17</value>
</metadata> </metadata>
<metadata name="TableAdapterManager.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="TableAdapterManager.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1234, 17</value> <value>1029, 17</value>
</metadata>
<metadata name="TBMT_TABLESTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>121</value>
</metadata> </metadata>
</root> </root>

View File

@@ -4,56 +4,81 @@ Imports DevExpress.XtraGrid.Views.Grid
Imports DigitalData.Modules.Config Imports DigitalData.Modules.Config
Imports DigitalData.Modules.Database Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Language Imports DigitalData.Modules.Base
Imports DigitalData.GUIs.Common
Public Class frmConfig Public Class frmConfig
Private ReadOnly TBMT_CONFIG_GENERAL As New DS_DD_ECM.TBMT_CONFIGDataTable Private ReadOnly TBMT_CONFIG_GENERAL As New DS_DD_ECM.TBMT_CONFIGDataTable
Private ReadOnly ConfigManager As ConfigManager(Of MultiTool.Common.Config) Private ReadOnly ConfigManager As ConfigManager(Of MultiTool.Common.Config)
Private ReadOnly FormHelper As FormHelper Private ReadOnly FormHelper As FormHelper
Private ReadOnly GridBuilder As GridBuilder
Private BindingSource As BindingSource = TBEDIXMLITEMSBindingSource Private BindingSource As BindingSource = TBEDIXMLITEMSBindingSource
Private View As GridView = GridViewSchema Private View As GridView = GridViewItems
Private Logger As Logger
Private FormLoading As Boolean = True
Private ReadOnly Property Config As MultiTool.Common.Config Private ReadOnly Property Config As Common.Config
Get Get
Return ConfigManager?.Config Return ConfigManager?.Config
End Get End Get
End Property End Property
Public Sub New(pLogConfig As LogConfig, pConfigManager As ConfigManager(Of MultiTool.Common.Config)) Public Sub New(pLogConfig As LogConfig, pConfigManager As ConfigManager(Of Common.Config))
' Dieser Aufruf ist für den Designer erforderlich. ' Dieser Aufruf ist für den Designer erforderlich.
InitializeComponent() InitializeComponent()
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
FormHelper = New FormHelper(pLogConfig, Me) FormHelper = New FormHelper(pLogConfig, Me)
ConfigManager = pConfigManager ConfigManager = pConfigManager
GridBuilder = New GridBuilder(GridViewTables, GridViewItems)
Logger = pLogConfig.GetLogger()
End Sub End Sub
Private Sub frmConfig_Load(sender As Object, e As EventArgs) Handles MyBase.Load Private Sub frmConfig_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Try Try
GridBuilder.WithDefaults()
GridBuilder.WithReadOnlyOptions(GridViewTables)
Dim oConnectionString = MSSQLServer.DecryptConnectionString(Config.ConnectionString) Dim oConnectionString = MSSQLServer.DecryptConnectionString(Config.ConnectionString)
Dim oBuilder As New SqlConnectionStringBuilder(oConnectionString) With { Dim oBuilder As New SqlConnectionStringBuilder(oConnectionString) With {
.InitialCatalog = "DD_ECM" .InitialCatalog = "DD_ECM"
} }
oConnectionString = oBuilder.ToString()
Logger.Debug("Connection String: [{0}]", oConnectionString)
' Default Values Logger.Debug("Setting default values")
DS_DD_ECM.TBMT_CONFIG.ADDED_WHOColumn.DefaultValue = Environment.UserName DS_DD_ECM.TBMT_CONFIG.ADDED_WHOColumn.DefaultValue = Environment.UserName
DS_DD_ECM.TBMT_CONFIG.CHANGED_WHOColumn.DefaultValue = Environment.UserName DS_DD_ECM.TBMT_CONFIG.CHANGED_WHOColumn.DefaultValue = Environment.UserName
DS_DD_ECM.TBMT_TEMPLATE_ITEMS.ADDED_WHOColumn.DefaultValue = Environment.UserName DS_DD_ECM.TBMT_TEMPLATE_ITEMS.ADDED_WHOColumn.DefaultValue = Environment.UserName
DS_DD_ECM.TBMT_TEMPLATE_ITEMS.CHANGED_WHOColumn.DefaultValue = Environment.UserName DS_DD_ECM.TBMT_TEMPLATE_ITEMS.CHANGED_WHOColumn.DefaultValue = Environment.UserName
TBMT_TEMPLATE_ITEMSTableAdapter.Connection.ConnectionString = oBuilder.ToString() Logger.Debug("Initializing Tables Adapter")
TBMT_TEMPLATE_ITEMSTableAdapter.Fill(DS_DD_ECM.TBMT_TEMPLATE_ITEMS) TBMT_TABLESTableAdapter.Connection.ConnectionString = oConnectionString
TBMT_CONFIGTableAdapter.Connection.ConnectionString = oBuilder.ToString() Logger.Debug("Initializing Templates Adapter")
TBMT_TEMPLATE_ITEMSTableAdapter.Connection.ConnectionString = oConnectionString
Logger.Debug("Initializing Config Adapter")
TBMT_CONFIGTableAdapter.Connection.ConnectionString = oConnectionString
Logger.Debug("Loading Data from Adapters")
TBMT_TABLESTableAdapter.Fill(DS_DD_ECM.TBMT_TABLES)
TBMT_CONFIGTableAdapter.Fill(DS_DD_ECM.TBMT_CONFIG) TBMT_CONFIGTableAdapter.Fill(DS_DD_ECM.TBMT_CONFIG)
TBMT_CONFIGTableAdapter.FillGeneral(TBMT_CONFIG_GENERAL) TBMT_CONFIGTableAdapter.FillGeneral(TBMT_CONFIG_GENERAL)
Logger.Debug("Loading general config")
LoadGeneralConfig(TBMT_CONFIG_GENERAL) LoadGeneralConfig(TBMT_CONFIG_GENERAL)
BindingSource = TBEDIXMLITEMSBindingSource BindingSource = TBEDIXMLITEMSBindingSource
FormLoading = False
GridViewItems.FocusedRowHandle = GridControl.InvalidRowHandle
Catch ex As Exception Catch ex As Exception
Logger.Error(ex)
FormHelper.ShowError(ex, "Laden des Formulars") FormHelper.ShowError(ex, "Laden des Formulars")
End Try End Try
End Sub End Sub
@@ -114,7 +139,7 @@ Public Class frmConfig
End Sub End Sub
Private Sub Save() Private Sub Save()
GridViewSchema.PostEditor() GridViewItems.PostEditor()
TBMT_CONFIGTableAdapter.Update(DS_DD_ECM.TBMT_CONFIG) TBMT_CONFIGTableAdapter.Update(DS_DD_ECM.TBMT_CONFIG)
DS_DD_ECM.TBMT_CONFIG.AcceptChanges() DS_DD_ECM.TBMT_CONFIG.AcceptChanges()
@@ -146,7 +171,7 @@ Public Class frmConfig
Select Case e.Page.Name Select Case e.Page.Name
Case tabPageSchema.Name Case tabPageSchema.Name
BindingSource = TBEDIXMLITEMSBindingSource BindingSource = TBEDIXMLITEMSBindingSource
View = GridViewSchema View = GridViewItems
Case tabPageConfig.Name Case tabPageConfig.Name
BindingSource = TBMT_CONFIGBindingSource BindingSource = TBMT_CONFIGBindingSource
@@ -169,4 +194,32 @@ Public Class frmConfig
End If End If
End If End If
End Sub End Sub
Private Sub GridViewTables_FocusedRowChanged(sender As Object, e As Views.Base.FocusedRowChangedEventArgs) Handles GridViewTables.FocusedRowChanged
Try
If FormLoading Then
Logger.Debug("Form still loading. Exiting.")
Exit Sub
End If
If GridViewTables.FocusedRowHandle < 0 Then
Logger.Debug("No row selected. Exiting.")
Exit Sub
End If
Dim oRow As DataRow = GridViewTables.GetDataRow(GridViewTables.FocusedRowHandle)
If oRow Is Nothing Then
Logger.Debug("Invalid row handle. Exiting.")
Exit Sub
End If
Dim oTableId = oRow.Item("GUID")
Logger.Debug("Loading Items for Table [{0}]", oTableId)
TBMT_TEMPLATE_ITEMSTableAdapter.Fill(DS_DD_ECM.TBMT_TEMPLATE_ITEMS, oTableId)
Catch ex As Exception
Logger.Error(ex)
FormHelper.ShowError(ex, "Laden der Tabelle")
End Try
End Sub
End Class End Class

View File

@@ -26,7 +26,7 @@ Partial Class frmExportMain
Me.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl() Me.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl()
Me.BarButtonItem1 = New DevExpress.XtraBars.BarButtonItem() Me.BarButtonItem1 = New DevExpress.XtraBars.BarButtonItem()
Me.txtResults = New DevExpress.XtraBars.BarStaticItem() Me.txtResults = New DevExpress.XtraBars.BarStaticItem()
Me.BarButtonItem2 = New DevExpress.XtraBars.BarButtonItem() Me.btnExport = New DevExpress.XtraBars.BarButtonItem()
Me.btnOpenInputDirectory = New DevExpress.XtraBars.BarButtonItem() Me.btnOpenInputDirectory = New DevExpress.XtraBars.BarButtonItem()
Me.btnOpenOutputDirectory = New DevExpress.XtraBars.BarButtonItem() Me.btnOpenOutputDirectory = New DevExpress.XtraBars.BarButtonItem()
Me.BarButtonItem3 = New DevExpress.XtraBars.BarButtonItem() Me.BarButtonItem3 = New DevExpress.XtraBars.BarButtonItem()
@@ -136,7 +136,7 @@ Partial Class frmExportMain
'RibbonControl1 'RibbonControl1
' '
Me.RibbonControl1.ExpandCollapseItem.Id = 0 Me.RibbonControl1.ExpandCollapseItem.Id = 0
Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.BarButtonItem1, Me.txtResults, Me.BarButtonItem2, Me.btnOpenInputDirectory, Me.btnOpenOutputDirectory, Me.BarButtonItem3, Me.BarButtonItem4}) Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.BarButtonItem1, Me.txtResults, Me.btnExport, Me.btnOpenInputDirectory, Me.btnOpenOutputDirectory, Me.BarButtonItem3, Me.BarButtonItem4})
Me.RibbonControl1.Location = New System.Drawing.Point(0, 0) Me.RibbonControl1.Location = New System.Drawing.Point(0, 0)
Me.RibbonControl1.MaxItemId = 10 Me.RibbonControl1.MaxItemId = 10
Me.RibbonControl1.Name = "RibbonControl1" Me.RibbonControl1.Name = "RibbonControl1"
@@ -162,16 +162,17 @@ Partial Class frmExportMain
Me.txtResults.Name = "txtResults" Me.txtResults.Name = "txtResults"
Me.txtResults.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph Me.txtResults.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph
' '
'BarButtonItem2 'btnExport
' '
Me.BarButtonItem2.Caption = "Ausgewählte Zeilen Exportieren" Me.btnExport.Caption = "Ausgewählte Zeilen Exportieren"
Me.BarButtonItem2.Id = 5 Me.btnExport.Id = 5
Me.BarButtonItem2.ImageOptions.SvgImage = Global.MultiTool.Form.My.Resources.Resources.actions_send5 Me.btnExport.ImageOptions.SvgImage = Global.MultiTool.Form.My.Resources.Resources.actions_send5
Me.BarButtonItem2.Name = "BarButtonItem2" Me.btnExport.Name = "btnExport"
' '
'btnOpenInputDirectory 'btnOpenInputDirectory
' '
Me.btnOpenInputDirectory.Caption = "Eingangsverzeichnis öffnen" Me.btnOpenInputDirectory.Caption = "Eingangsverzeichnis öffnen"
Me.btnOpenInputDirectory.Enabled = False
Me.btnOpenInputDirectory.Id = 6 Me.btnOpenInputDirectory.Id = 6
Me.btnOpenInputDirectory.ImageOptions.SvgImage = Global.MultiTool.Form.My.Resources.Resources.open27 Me.btnOpenInputDirectory.ImageOptions.SvgImage = Global.MultiTool.Form.My.Resources.Resources.open27
Me.btnOpenInputDirectory.Name = "btnOpenInputDirectory" Me.btnOpenInputDirectory.Name = "btnOpenInputDirectory"
@@ -212,7 +213,7 @@ Partial Class frmExportMain
'RibbonPageGroup2 'RibbonPageGroup2
' '
Me.RibbonPageGroup2.Alignment = DevExpress.XtraBars.Ribbon.RibbonPageGroupAlignment.Far Me.RibbonPageGroup2.Alignment = DevExpress.XtraBars.Ribbon.RibbonPageGroupAlignment.Far
Me.RibbonPageGroup2.ItemLinks.Add(Me.BarButtonItem2) Me.RibbonPageGroup2.ItemLinks.Add(Me.btnExport)
Me.RibbonPageGroup2.Name = "RibbonPageGroup2" Me.RibbonPageGroup2.Name = "RibbonPageGroup2"
Me.RibbonPageGroup2.Text = "Export" Me.RibbonPageGroup2.Text = "Export"
' '
@@ -855,7 +856,7 @@ Partial Class frmExportMain
Friend WithEvents LayoutControlItem7 As DevExpress.XtraLayout.LayoutControlItem Friend WithEvents LayoutControlItem7 As DevExpress.XtraLayout.LayoutControlItem
Friend WithEvents GridColumn7 As DevExpress.XtraGrid.Columns.GridColumn Friend WithEvents GridColumn7 As DevExpress.XtraGrid.Columns.GridColumn
Friend WithEvents txtResults As DevExpress.XtraBars.BarStaticItem Friend WithEvents txtResults As DevExpress.XtraBars.BarStaticItem
Friend WithEvents BarButtonItem2 As DevExpress.XtraBars.BarButtonItem Friend WithEvents btnExport As DevExpress.XtraBars.BarButtonItem
Friend WithEvents RibbonPageGroup2 As DevExpress.XtraBars.Ribbon.RibbonPageGroup Friend WithEvents RibbonPageGroup2 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents SplashScreenManager As DevExpress.XtraSplashScreen.SplashScreenManager Friend WithEvents SplashScreenManager As DevExpress.XtraSplashScreen.SplashScreenManager
Friend WithEvents RepositoryItemImageComboBox1 As DevExpress.XtraEditors.Repository.RepositoryItemImageComboBox Friend WithEvents RepositoryItemImageComboBox1 As DevExpress.XtraEditors.Repository.RepositoryItemImageComboBox

View File

@@ -1,10 +1,9 @@
Imports DevExpress.XtraEditors Imports DevExpress.XtraEditors
Imports DevExpress.XtraGrid.Views.Grid
Imports DigitalData.GUIs.Common Imports DigitalData.GUIs.Common
Imports DigitalData.Modules.Base
Imports DigitalData.Modules.Config Imports DigitalData.Modules.Config
Imports DigitalData.Modules.Database Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Language
Imports MultiTool.Common.Templates Imports MultiTool.Common.Templates
Imports MultiTool.Common.Exceptions Imports MultiTool.Common.Exceptions
Imports MultiTool.Common.Winline Imports MultiTool.Common.Winline
@@ -21,7 +20,7 @@ Public Class frmExportMain
Private WebService As WebServiceData Private WebService As WebServiceData
Private Winline As WinlineData Private Winline As WinlineData
Private GridBuilder As GridBuilder Private GridBuilder As GridBuilder
Private FileEx As DigitalData.Modules.Filesystem.File Private FileEx As FilesystemEx
Public Sub New(pLogConfig As LogConfig, pConfigManager As ConfigManager(Of Common.Config), pTemplate As Template) Public Sub New(pLogConfig As LogConfig, pConfigManager As ConfigManager(Of Common.Config), pTemplate As Template)
' Dieser Aufruf ist für den Designer erforderlich. ' Dieser Aufruf ist für den Designer erforderlich.
@@ -44,20 +43,14 @@ Public Class frmExportMain
Dim oConnectionString = MSSQLServer.DecryptConnectionString(ConfigManager.Config.ConnectionString) Dim oConnectionString = MSSQLServer.DecryptConnectionString(ConfigManager.Config.ConnectionString)
Database = New MSSQLServer(LogConfig, oConnectionString) Database = New MSSQLServer(LogConfig, oConnectionString)
Dim oViews As New List(Of GridView) From { GridBuilder = New GridBuilder(GridViewDocuments, lookupMandator.Properties.View, lookupAccount.Properties.View).
GridViewDocuments,
lookupMandator.Properties.View,
lookupAccount.Properties.View
}
GridBuilder = New GridBuilder(oViews)
GridBuilder.
WithDefaults(). WithDefaults().
WithReadOnlyOptions(). WithReadOnlyOptions().
WithClipboardHandler() WithClipboardHandler()
Winline = My.Winline Winline = My.Winline
FileEx = New DigitalData.Modules.Filesystem.File(LogConfig) FileEx = New FilesystemEx(LogConfig)
WebService = New WebServiceData(LogConfig, Database, Winline, My.GeneralConfiguration.Webservice, My.GeneralConfiguration) WebService = New WebServiceData(LogConfig, Database, Winline, My.GeneralConfiguration.Webservice, My.GeneralConfiguration, My.FilterConfiguration)
AddHandler WebService.WebServiceProgress, AddressOf WebService_Progress AddHandler WebService.WebServiceProgress, AddressOf WebService_Progress
Catch ex As Exception Catch ex As Exception
@@ -96,6 +89,10 @@ Public Class frmExportMain
Where(Function(mandator) mandator.Id = ConfigManager.Config.LastUsedMandator). Where(Function(mandator) mandator.Id = ConfigManager.Config.LastUsedMandator).
FirstOrDefault() FirstOrDefault()
End If End If
If ConfigManager.Config.AutomaticLoadingOnFormOpen = True Then
SearchDocuments()
End If
Catch ex As Exception Catch ex As Exception
FormHelper.ShowError(ex, "Initialisierung der Form") FormHelper.ShowError(ex, "Initialisierung der Form")
End Try End Try
@@ -183,7 +180,7 @@ Public Class frmExportMain
dateDocDateTo.DoValidate() dateDocDateTo.DoValidate()
Dim oMandator = lookupMandator.EditValue Dim oMandator = lookupMandator.EditValue
Dim oYear = Utils.NotNull(comboYear.EditValue, 0) Dim oYear = ObjectEx.NotNull(comboYear.EditValue, 0)
Dim oAccount = lookupAccount.EditValue Dim oAccount = lookupAccount.EditValue
Dim oKindsAsObjects As List(Of Object) = comboDocumentKind.EditValue Dim oKindsAsObjects As List(Of Object) = comboDocumentKind.EditValue
Dim oKinds As List(Of DocumentKind) = oKindsAsObjects.Cast(Of DocumentKind).ToList() Dim oKinds As List(Of DocumentKind) = oKindsAsObjects.Cast(Of DocumentKind).ToList()
@@ -191,8 +188,8 @@ Public Class frmExportMain
Dim oDateFrom = dateDocDateFrom.EditValue Dim oDateFrom = dateDocDateFrom.EditValue
Dim oDateTo = dateDocDateTo.EditValue Dim oDateTo = dateDocDateTo.EditValue
Dim oShowExported = chkShowExported.Checked Dim oShowExported = chkShowExported.Checked
Dim oDocNumberFrom = Utils.NotNull(txtDocumentFrom.EditValue, String.Empty) Dim oDocNumberFrom = ObjectEx.NotNull(txtDocumentFrom.EditValue, String.Empty)
Dim oDocNumberTo = Utils.NotNull(txtDocumentTo.EditValue, String.Empty) Dim oDocNumberTo = ObjectEx.NotNull(txtDocumentTo.EditValue, String.Empty)
Dim oDocType As WinlineData.DocumentType = MapDocumentTypeToEnum(Of WinlineData.DocumentType)(comboDocumentType.EditValue) Dim oDocType As WinlineData.DocumentType = MapDocumentTypeToEnum(Of WinlineData.DocumentType)(comboDocumentType.EditValue)
@@ -227,8 +224,9 @@ Public Class frmExportMain
End Try End Try
End Sub End Sub
Private Async Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick Private Async Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnExport.ItemClick
Try Try
btnExport.Enabled = False
SplashScreenManager.ShowWaitForm() SplashScreenManager.ShowWaitForm()
Dim oExportResult = False Dim oExportResult = False
@@ -250,8 +248,6 @@ Public Class frmExportMain
If oFinalSqlResult = False Then If oFinalSqlResult = False Then
Throw New DatabaseException("FinalSQL was not executed successfully!") Throw New DatabaseException("FinalSQL was not executed successfully!")
End If End If
oDocument.IsExported = True
Next Next
MsgBox($"{oExportCount} Dateien wurden erfolgreich exportiert!", MsgBoxStyle.Information, Text) MsgBox($"{oExportCount} Dateien wurden erfolgreich exportiert!", MsgBoxStyle.Information, Text)
@@ -264,6 +260,7 @@ Public Class frmExportMain
Finally Finally
SplashScreenManager.CloseWaitForm() SplashScreenManager.CloseWaitForm()
btnExport.Enabled = True
SearchDocuments() SearchDocuments()
End Try End Try

View File

@@ -376,6 +376,9 @@
<data name="lookupMandator.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms"> <data name="lookupMandator.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Left, Right</value> <value>Top, Left, Right</value>
</data> </data>
<data name="lookupMandator.Enabled" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="lookupMandator.Location" type="System.Drawing.Point, System.Drawing"> <data name="lookupMandator.Location" type="System.Drawing.Point, System.Drawing">
<value>75, 6</value> <value>75, 6</value>
</data> </data>

View File

@@ -4,6 +4,7 @@ Imports DevExpress.XtraGrid
Imports DevExpress.XtraGrid.Views.Grid Imports DevExpress.XtraGrid.Views.Grid
Imports DevExpress.XtraReports.UI Imports DevExpress.XtraReports.UI
Imports DigitalData.GUIs.Common Imports DigitalData.GUIs.Common
Imports DigitalData.Modules.Base
Imports DigitalData.Modules.Config Imports DigitalData.Modules.Config
Imports DigitalData.Modules.Database Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
@@ -13,7 +14,6 @@ Imports MultiTool.Common.Templates
Imports MultiTool.Common.Winline Imports MultiTool.Common.Winline
Imports MultiTool.Common.Winline.Entities Imports MultiTool.Common.Winline.Entities
Imports MultiTool.Common.Constants Imports MultiTool.Common.Constants
Imports MultiTool.Common.Exceptions
Public Class frmImportMain Public Class frmImportMain
Public LogConfig As LogConfig Public LogConfig As LogConfig
@@ -22,7 +22,7 @@ Public Class frmImportMain
Private Logger As Logger Private Logger As Logger
Private Database As MSSQLServer Private Database As MSSQLServer
Private Winline As WinlineData Private Winline As WinlineData
Private FileEx As DigitalData.Modules.Filesystem.File Private FileEx As FilesystemEx
Private WebService As WebServiceData Private WebService As WebServiceData
Private DocumentLoader As Documents.DocumentLoader Private DocumentLoader As Documents.DocumentLoader
Private DocumentCleaner As Documents.DocumentCleaner Private DocumentCleaner As Documents.DocumentCleaner
@@ -40,6 +40,9 @@ Public Class frmImportMain
Private CurrentDocument As Document = Nothing Private CurrentDocument As Document = Nothing
Private CurrentDocumentReadOnly As Boolean = False Private CurrentDocumentReadOnly As Boolean = False
Private FilesLoading As Boolean = False
Private FilesLoaded As Boolean = False
Public Sub New(pLogConfig As LogConfig, pConfigManager As ConfigManager(Of Config), pTemplate As Template) Public Sub New(pLogConfig As LogConfig, pConfigManager As ConfigManager(Of Config), pTemplate As Template)
InitializeComponent() InitializeComponent()
@@ -63,13 +66,15 @@ Public Class frmImportMain
Dim oConnectionString = MSSQLServer.DecryptConnectionString(ConfigManager.Config.ConnectionString) Dim oConnectionString = MSSQLServer.DecryptConnectionString(ConfigManager.Config.ConnectionString)
Database = New MSSQLServer(LogConfig, oConnectionString) Database = New MSSQLServer(LogConfig, oConnectionString)
GridBuilder = New GridBuilder(GridViewFiles) GridBuilder = New GridBuilder(GridViewFiles, GridView1, GridView2, GridView3, GridView4).
GridBuilder.WithDefaults.WithReadOnlyOptions.WithClipboardHandler() WithDefaults().
WithReadOnlyOptions().
WithClipboardHandler()
GridViewFiles.OptionsView.ShowAutoFilterRow = False GridViewFiles.OptionsView.ShowAutoFilterRow = False
Winline = My.Winline Winline = My.Winline
FileEx = New DigitalData.Modules.Filesystem.File(LogConfig) FileEx = New FilesystemEx(LogConfig)
WebService = New WebServiceData(LogConfig, Database, Winline, My.GeneralConfiguration.Webservice, My.GeneralConfiguration) WebService = New WebServiceData(LogConfig, Database, Winline, My.GeneralConfiguration.Webservice, My.GeneralConfiguration, My.FilterConfiguration)
AddHandler WebService.WebServiceProgress, AddressOf WebService_Progress AddHandler WebService.WebServiceProgress, AddressOf WebService_Progress
Catch ex As Exception Catch ex As Exception
@@ -80,7 +85,7 @@ Public Class frmImportMain
Text = String.Format(My.Resources.frmShared._0____WebService_Multitool_für_WinLine, CurrentTemplate.Name) Text = String.Format(My.Resources.frmShared._0____WebService_Multitool_für_WinLine, CurrentTemplate.Name)
End Sub End Sub
Private Sub frmImportMain_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown Private Async Sub frmImportMain_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
btnLoadFiles.Enabled = False btnLoadFiles.Enabled = False
SplashScreenManager.ShowWaitForm() SplashScreenManager.ShowWaitForm()
@@ -90,6 +95,7 @@ Public Class frmImportMain
lookupMandator.Properties.DataSource = Winline.Mandators lookupMandator.Properties.DataSource = Winline.Mandators
lookupMandator.ForceInitialize() lookupMandator.ForceInitialize()
lookupMandator.Properties.View.BestFitColumns() lookupMandator.Properties.View.BestFitColumns()
lookupMandator.Enabled = False
DocumentLoader = New DocumentLoader(LogConfig, Winline, Database, DocumentLoader = New DocumentLoader(LogConfig, Winline, Database,
My.MappingConfiguration, My.MappingConfiguration,
@@ -114,6 +120,10 @@ Public Class frmImportMain
SplashScreenManager.CloseWaitForm() SplashScreenManager.CloseWaitForm()
btnLoadFiles.Enabled = True btnLoadFiles.Enabled = True
End Try End Try
If ConfigManager.Config.AutomaticLoadingOnFormOpen = True Then
Await LoadFiles()
End If
End Sub End Sub
Private Sub frmImportMain_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing Private Sub frmImportMain_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
@@ -193,9 +203,12 @@ Public Class frmImportMain
If oRow.HasErrors Then If oRow.HasErrors Then
Dim oColumName = e.Column.FieldName Dim oColumName = e.Column.FieldName
Dim oErrorField = oRow.Fields.Where(Function(field) field.Value.HasError).FirstOrDefault() Dim oErrorFields = oRow.Fields.
Where(Function(field) field.Value.HasError).
Select(Function(field) field.Key).
ToList()
If Not IsNothing(oErrorField) AndAlso oColumName = oErrorField.Key Then If oErrorFields.Count > 0 AndAlso oErrorFields.Contains(oColumName) Then
e.Appearance.Options.UseBackColor = True e.Appearance.Options.UseBackColor = True
e.Appearance.BackColor = Color.LightCoral e.Appearance.BackColor = Color.LightCoral
End If End If
@@ -227,6 +240,8 @@ Public Class frmImportMain
Private Sub GridViewFiles_FocusedRowChanged(sender As Object, e As Views.Base.FocusedRowChangedEventArgs) Handles GridViewFiles.FocusedRowChanged Private Sub GridViewFiles_FocusedRowChanged(sender As Object, e As Views.Base.FocusedRowChangedEventArgs) Handles GridViewFiles.FocusedRowChanged
Try Try
FilesLoading = True
SplitContainerMain.Panel2.Enabled = True SplitContainerMain.Panel2.Enabled = True
Dim oDocument As Document = GridViewFiles.GetRow(e.FocusedRowHandle) Dim oDocument As Document = GridViewFiles.GetRow(e.FocusedRowHandle)
@@ -237,12 +252,15 @@ Public Class frmImportMain
If oDocument.Mandator Is Nothing Then If oDocument.Mandator Is Nothing Then
lookupMandator.EditValue = Nothing lookupMandator.EditValue = Nothing
lookupMandator.BackColor = Color.LightCoral
End If End If
lookupMandator.EditValue = oDocument.Mandator lookupMandator.EditValue = oDocument.Mandator
LoadDocument(oDocument) LoadDocument(oDocument)
Catch ex As Exception Catch ex As Exception
FormHelper.ShowError(ex, My.Resources.frmImportMainExtra.Laden_des_Dokuments) FormHelper.ShowError(ex, My.Resources.frmImportMainExtra.Laden_des_Dokuments)
Finally
FilesLoading = False
End Try End Try
End Sub End Sub
@@ -405,7 +423,8 @@ Public Class frmImportMain
If oFailedDocuments.Count > 0 Then If oFailedDocuments.Count > 0 Then
Dim oErrorMessages = String.Join(vbNewLine, oFailedDocuments) Dim oErrorMessages = String.Join(vbNewLine, oFailedDocuments)
Dim oMessage = String.Format("Für {0} Dateien ist die Übertragung in die Winline fehlgeschlagen. Folgende Fehler sind aufgetreten: {2}{1}", oFailedDocuments.Count, oErrorMessages, vbNewLine) Dim oFailedCount = oFailedDocuments.Count
Dim oMessage = $"Für {oFailedCount} Dateien ist die Übertragung in die Winline fehlgeschlagen. Folgende Fehler sind aufgetreten: {oErrorMessages}{vbNewLine}"
MsgBox(oMessage, MsgBoxStyle.Exclamation, Text) MsgBox(oMessage, MsgBoxStyle.Exclamation, Text)
End If End If
@@ -433,41 +452,24 @@ Public Class frmImportMain
End If End If
End Sub End Sub
Private Async Function btnLoadFiles_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) As Task Handles btnLoadFiles.ItemClick Private Async Function btnLoadFiles_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) As Task Handles btnLoadFiles.ItemClick
Await LoadFiles() Await LoadFiles()
End Function End Function
Private Async Sub btnReloadFile_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnReloadFile.ItemClick Private Async Sub btnReloadFile_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnReloadFile.ItemClick
Dim oCurrentMandator As Mandator = TryCast(lookupMandator.EditValue, Mandator) Dim oCurrentMandator As Mandator = TryCast(lookupMandator.EditValue, Mandator)
If oCurrentMandator Is Nothing Then 'If oCurrentMandator Is Nothing Then
MsgBox(My.Resources.frmImportMainExtra.Bitte_wählen_Sie_einen_Mandanten_aus__bevor_Sie_fortfahren, MsgBoxStyle.Exclamation, Text) ' MsgBox(My.Resources.frmImportMainExtra.Bitte_wählen_Sie_einen_Mandanten_aus__bevor_Sie_fortfahren, MsgBoxStyle.Exclamation, Text)
Exit Sub ' Exit Sub
End If 'End If
Dim oMessage = String.Format(My.Resources.frmImportMainExtra.Wollen_Sie_wirklich_die_aktuelle_Datei_neu_laden, oCurrentMandator) Dim oMessage = String.Format(My.Resources.frmImportMainExtra.Wollen_Sie_wirklich_die_aktuelle_Datei_neu_laden, oCurrentMandator)
Dim oResult As DialogResult = MsgBox(oMessage, MsgBoxStyle.Question Or MsgBoxStyle.YesNo, Text) Dim oResult As DialogResult = MsgBox(oMessage, MsgBoxStyle.Question Or MsgBoxStyle.YesNo, Text)
Try
BeginLoadingUI()
If oResult = DialogResult.Yes Then If oResult = DialogResult.Yes Then
Dim oDocument As Document = GridViewFiles.GetRow(GridViewFiles.FocusedRowHandle) Await ReloadFile()
Dim oNewDocument = Await DocumentLoader.LoadFile(oDocument.File, CurrentTemplate, lookupMandator.EditValue)
Dim oIndex = DocumentLoader.Files.IndexOf(oDocument)
DocumentLoader.Files.Item(oIndex) = oNewDocument
LoadDocument(oNewDocument)
End If End If
Catch ex As Exception
FormHelper.ShowError(ex, My.Resources.frmImportMainExtra.Neuladen_des_Dokuments)
Finally
EndLoadingUI()
End Try
End Sub End Sub
Private Sub btnOpenInputDirectory_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnOpenInputDirectory.ItemClick Private Sub btnOpenInputDirectory_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnOpenInputDirectory.ItemClick
@@ -630,7 +632,7 @@ Public Class frmImportMain
RibbonPageGroupTransfer.Enabled = False RibbonPageGroupTransfer.Enabled = False
CurrentDocumentReadOnly = True CurrentDocumentReadOnly = True
MsgBox("Für die aktuelle Datei konnte kein Mandant zugeordnet werden! Bitte wählen Sie einen aus und laden Sie dann die Datei erneut.", MsgBoxStyle.Critical, Text) 'MsgBox("Für die aktuelle Datei konnte kein Mandant zugeordnet werden! Bitte wählen Sie einen aus und laden Sie dann die Datei erneut.", MsgBoxStyle.Critical, Text)
Else Else
RibbonPageGroupEdit.Enabled = True RibbonPageGroupEdit.Enabled = True
RibbonPageGroupTransfer.Enabled = True RibbonPageGroupTransfer.Enabled = True
@@ -661,6 +663,7 @@ Public Class frmImportMain
Private Async Function LoadFiles() As Task Private Async Function LoadFiles() As Task
Try Try
BeginLoadingUI() BeginLoadingUI()
FilesLoading = True
DocumentCleaner.CleanImportedDocuments(DocumentLoader.Files) DocumentCleaner.CleanImportedDocuments(DocumentLoader.Files)
@@ -681,17 +684,44 @@ Public Class frmImportMain
GridControlFiles.DataSource = Nothing GridControlFiles.DataSource = Nothing
GridControlFiles.DataSource = DocumentLoader.Files GridControlFiles.DataSource = DocumentLoader.Files
FilesLoaded = DocumentLoader.Files.Count > 0
txtFilesLoaded.Caption = String.Format(My.Resources.frmImportMainExtra._0__Dateien_geladen, DocumentLoader.Files.Count) txtFilesLoaded.Caption = String.Format(My.Resources.frmImportMainExtra._0__Dateien_geladen, DocumentLoader.Files.Count)
Else
FilesLoaded = False
End If End If
Catch ex As Exception Catch ex As Exception
FormHelper.ShowError(ex, My.Resources.frmImportMainExtra.Laden_der_Dokumente) FormHelper.ShowError(ex, My.Resources.frmImportMainExtra.Laden_der_Dokumente)
Finally Finally
FilesLoading = False
EndLoadingUI() EndLoadingUI()
End Try End Try
End Function End Function
Public Async Function ReloadFile() As Task
Try
BeginLoadingUI()
FilesLoading = True
Dim oDocument As Document = GridViewFiles.GetRow(GridViewFiles.FocusedRowHandle)
Dim oNewDocument = Await DocumentLoader.LoadFile(oDocument.File, CurrentTemplate, lookupMandator.EditValue)
Dim oIndex = DocumentLoader.Files.IndexOf(oDocument)
DocumentLoader.Files.Item(oIndex) = oNewDocument
LoadDocument(oNewDocument)
Catch ex As Exception
FormHelper.ShowError(ex, My.Resources.frmImportMainExtra.Neuladen_des_Dokuments)
Finally
FilesLoading = False
EndLoadingUI()
End Try
End Function
Private Function EditRow(pRow As DataRow, pView As GridView) As DocumentRow Private Function EditRow(pRow As DataRow, pView As GridView) As DocumentRow
Try Try
If CurrentDocumentReadOnly = True Then If CurrentDocumentReadOnly = True Then
@@ -736,24 +766,31 @@ Public Class frmImportMain
Return False Return False
End If End If
Logger.Info("Transferring file [{0}] to Winline", pDocument.FileName)
Dim oResult = Await WebService.TransferDocumentToWinline(pDocument, CurrentTemplate, lookupMandator.EditValue, pIsTest) Dim oResult = Await WebService.TransferDocumentToWinline(pDocument, CurrentTemplate, lookupMandator.EditValue, pIsTest)
Logger.Debug("Transfer successful: [{0}]", oResult)
If oResult = True Then If oResult = True Then
' If this was only a test, we are done. ' If this was only a test, we are done.
If pIsTest = True Then If pIsTest = True Then
Logger.Debug("This was a Test Transfer. Exiting.")
Return True Return True
End If End If
' Generate the report ' Generate the report
WebService.RaiseWebServiceProgress("Bericht erzeugen") WebService.RaiseWebServiceProgress("Bericht erzeugen")
Logger.Debug("Creating report for file [{0}]", pDocument.FileName)
Dim oReportResult = ReportGenerator.GenerateReport(pDocument, CurrentTemplate) Dim oReportResult = ReportGenerator.GenerateReport(pDocument, CurrentTemplate)
' Export it to pdf ' Export it to pdf
WebService.RaiseWebServiceProgress("Bericht exportieren") WebService.RaiseWebServiceProgress("Bericht exportieren")
Logger.Debug("Exporting report to [{0}]", oReportResult.FileName)
oReportResult.Report.ExportToPdf(oReportResult.FileName) oReportResult.Report.ExportToPdf(oReportResult.FileName)
' Mark Document as Imported, will be moved on Form Close or File Reload ' Mark Document as Imported, will be moved on Form Close or File Reload
Logger.Debug("Setting file [{0}] to Imported", pDocument.FileName)
pDocument.Imported = True pDocument.Imported = True
Return True Return True
@@ -832,6 +869,7 @@ Public Class frmImportMain
SetDocumentButtonsEnabled(False) SetDocumentButtonsEnabled(False)
GridControlFiles.Enabled = False GridControlFiles.Enabled = False
SplitContainerGrids.Enabled = False SplitContainerGrids.Enabled = False
lookupMandator.Enabled = False
RibbonPageGroupLoad.Enabled = False RibbonPageGroupLoad.Enabled = False
RibbonPageGroupEdit.Enabled = False RibbonPageGroupEdit.Enabled = False
@@ -845,6 +883,7 @@ Public Class frmImportMain
RibbonPageGroupReport.Enabled = True RibbonPageGroupReport.Enabled = True
RibbonPageGroupTransfer.Enabled = True RibbonPageGroupTransfer.Enabled = True
lookupMandator.Enabled = FilesLoaded
SplitContainerGrids.Enabled = True SplitContainerGrids.Enabled = True
GridControlFiles.Enabled = True GridControlFiles.Enabled = True
SetDocumentButtonsEnabled(True) SetDocumentButtonsEnabled(True)
@@ -861,14 +900,6 @@ Public Class frmImportMain
btnEditRow.Enabled = pEnabled btnEditRow.Enabled = pEnabled
End Sub End Sub
Private Sub lookupMandator_EditValueChanged(sender As Object, e As EventArgs) Handles lookupMandator.EditValueChanged
If lookupMandator.EditValue Is Nothing Then
lookupMandator.BackColor = Color.LightCoral
Else
lookupMandator.BackColor = Nothing
End If
End Sub
Private Sub btnShowErrors_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnShowErrors.ItemClick Private Sub btnShowErrors_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnShowErrors.ItemClick
If CurrentDocument IsNot Nothing Then If CurrentDocument IsNot Nothing Then
Dim oErrors = CurrentDocument.Errors. Dim oErrors = CurrentDocument.Errors.
@@ -879,8 +910,35 @@ Public Class frmImportMain
End If End If
End Sub End Sub
Private AskReloadFile As Boolean = False
Private Async Function lookupMandator_EditValueChanged(sender As Object, e As EventArgs) As Task Handles lookupMandator.EditValueChanged
Dim oMandator As Mandator = lookupMandator.EditValue
If lookupMandator.EditValue Is Nothing Then
lookupMandator.BackColor = Color.LightCoral
AskReloadFile = False
Else
lookupMandator.BackColor = Nothing
If AskReloadFile Then
AskReloadFile = False
Dim oResult = MsgBox($"Sie haben den Mandanten '{oMandator}' ausgewählt. Wollen Sie jetzt die aktuelle Datei neu laden?", MsgBoxStyle.Question Or MsgBoxStyle.YesNo, Text)
If oResult = MsgBoxResult.Yes Then
Await ReloadFile()
End If
End If
End If
End Function
Private Sub lookupMandator_EditValueChanging(sender As Object, e As DevExpress.XtraEditors.Controls.ChangingEventArgs) Handles lookupMandator.EditValueChanging
If e.OldValue Is Nothing And e.NewValue IsNot Nothing And FilesLoading = False Then
AskReloadFile = True
End If
End Sub
#End Region #End Region
End Class End Class

View File

@@ -45,6 +45,7 @@ Partial Class frmMain
Me.colName = New DevExpress.XtraGrid.Columns.GridColumn() Me.colName = New DevExpress.XtraGrid.Columns.GridColumn()
Me.colDescription = New DevExpress.XtraGrid.Columns.GridColumn() Me.colDescription = New DevExpress.XtraGrid.Columns.GridColumn()
Me.colFileName = New DevExpress.XtraGrid.Columns.GridColumn() Me.colFileName = New DevExpress.XtraGrid.Columns.GridColumn()
Me.colChangedWhen = New DevExpress.XtraGrid.Columns.GridColumn()
Me.SplashScreenManager = New DevExpress.XtraSplashScreen.SplashScreenManager(Me, GetType(Global.MultiTool.Form.frmWaitForm), True, True) Me.SplashScreenManager = New DevExpress.XtraSplashScreen.SplashScreenManager(Me, GetType(Global.MultiTool.Form.frmWaitForm), True, True)
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.SvgImageCollection1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.SvgImageCollection1, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -204,7 +205,7 @@ Partial Class frmMain
' '
'GridViewTemplates 'GridViewTemplates
' '
Me.GridViewTemplates.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colName, Me.colDescription, Me.colFileName}) Me.GridViewTemplates.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colName, Me.colDescription, Me.colFileName, Me.colChangedWhen})
Me.GridViewTemplates.GridControl = Me.GridControlTemplates Me.GridViewTemplates.GridControl = Me.GridControlTemplates
Me.GridViewTemplates.Name = "GridViewTemplates" Me.GridViewTemplates.Name = "GridViewTemplates"
' '
@@ -232,6 +233,14 @@ Partial Class frmMain
Me.colFileName.Visible = True Me.colFileName.Visible = True
Me.colFileName.VisibleIndex = 2 Me.colFileName.VisibleIndex = 2
' '
'colChangedWhen
'
Me.colChangedWhen.Caption = "Letzte Änderung"
Me.colChangedWhen.FieldName = "LastModified"
Me.colChangedWhen.Name = "colChangedWhen"
Me.colChangedWhen.Visible = True
Me.colChangedWhen.VisibleIndex = 3
'
'SplashScreenManager 'SplashScreenManager
' '
Me.SplashScreenManager.ClosingDelay = 500 Me.SplashScreenManager.ClosingDelay = 500
@@ -283,4 +292,5 @@ Partial Class frmMain
Friend WithEvents btnOpenSchemaDirectory As DevExpress.XtraBars.BarButtonItem Friend WithEvents btnOpenSchemaDirectory As DevExpress.XtraBars.BarButtonItem
Friend WithEvents RibbonPageGroup4 As DevExpress.XtraBars.Ribbon.RibbonPageGroup Friend WithEvents RibbonPageGroup4 As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents btnReloadWinlineData As DevExpress.XtraBars.BarButtonItem Friend WithEvents btnReloadWinlineData As DevExpress.XtraBars.BarButtonItem
Friend WithEvents colChangedWhen As DevExpress.XtraGrid.Columns.GridColumn
End Class End Class

View File

@@ -1,7 +1,6 @@
Imports System.ComponentModel Imports System.ComponentModel
Imports System.IO Imports System.IO
Imports DevExpress.Utils Imports DevExpress.Utils
Imports DigitalData.Controls.SQLConfig
Imports DigitalData.GUIs.Common Imports DigitalData.GUIs.Common
Imports DigitalData.Modules.Config Imports DigitalData.Modules.Config
Imports DigitalData.Modules.Database Imports DigitalData.Modules.Database
@@ -111,18 +110,34 @@ Public Class frmMain
TemplateLoader = New TemplateLoader(LogConfig, Database) TemplateLoader = New TemplateLoader(LogConfig, Database)
Await TemplateLoader.LoadTemplates() Await TemplateLoader.LoadTemplates()
Await TemplateLoader.LoadTemplateConfiguration() Await TemplateLoader.LoadTemplateConfiguration()
Await TemplateLoader.LoadTemplateFunctions()
Await TemplateLoader.LoadGeneralConfiguration() Await TemplateLoader.LoadGeneralConfiguration()
Await TemplateLoader.LoadMappingConfiguration() Await TemplateLoader.LoadMappingConfiguration()
Await TemplateLoader.LoadMandatorConfiguration() Await TemplateLoader.LoadMandatorConfiguration()
Await TemplateLoader.LoadFilterConfiguration()
' Save Schema data in 'My' Namespace ' Save Schema data in 'My' Namespace
My.MappingConfiguration = TemplateLoader.MappingConfiguration My.MappingConfiguration = TemplateLoader.MappingConfiguration
My.TemplateConfiguration = TemplateLoader.TemplateConfiguration My.TemplateConfiguration = TemplateLoader.TemplateConfiguration
My.MandatorConfiguration = TemplateLoader.MandatorConfiguration My.MandatorConfiguration = TemplateLoader.MandatorConfiguration
My.GeneralConfiguration = TemplateLoader.GeneralConfiguration My.GeneralConfiguration = TemplateLoader.GeneralConfiguration
My.FilterConfiguration = TemplateLoader.FilterConfiguration
Dim oBindingSource = New BindingList(Of Template) Dim oBindingSource = New BindingList(Of Template)
For Each oTemplate As Template In TemplateLoader.TemplateList For Each oTemplate As Template In TemplateLoader.TemplateList
' Check template files and update modified date
Try
Dim oFilePath = IO.Path.Combine(My.GeneralConfiguration.TemplateDirectory, oTemplate.FileName)
Dim oFileInfo = New FileInfo(oFilePath)
If oFileInfo.Exists Then
oTemplate.LastModified = oFileInfo.LastWriteTime
End If
Catch ex As Exception
Logger.Error(ex)
End Try
oBindingSource.Add(oTemplate) oBindingSource.Add(oTemplate)
Next Next
Return oBindingSource Return oBindingSource
@@ -286,4 +301,8 @@ Public Class frmMain
RibbonPageGroupStart.Enabled = True RibbonPageGroupStart.Enabled = True
SplashScreenManager.CloseWaitForm() SplashScreenManager.CloseWaitForm()
End Sub End Sub
Private Sub RibbonControl1_Click(sender As Object, e As EventArgs) Handles RibbonControl1.Click
End Sub
End Class End Class

View File

@@ -5,14 +5,15 @@ Imports MultiTool.Common.Winline
Imports MultiTool.Common.Winline.Entities Imports MultiTool.Common.Winline.Entities
Imports MultiTool.Common.Templates Imports MultiTool.Common.Templates
Imports MultiTool.Common.Constants Imports MultiTool.Common.Constants
Imports DigitalData.Modules.Language
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Base
Imports DevExpress.XtraEditors Imports DevExpress.XtraEditors
Imports DevExpress.XtraEditors.Repository Imports DevExpress.XtraEditors.Repository
Imports DevExpress.XtraEditors.Controls Imports DevExpress.XtraEditors.Controls
Imports DevExpress.XtraGrid.Views.Grid Imports DevExpress.XtraGrid.Views.Grid
Public Class frmRowEditor Public Class frmRowEditor
Private ReadOnly LogConfig As LogConfig
Private ReadOnly Logger As Logger Private ReadOnly Logger As Logger
Private ReadOnly FormHelper As FormHelper Private ReadOnly FormHelper As FormHelper
@@ -44,6 +45,7 @@ Public Class frmRowEditor
Public Sub New(pLogConfig As LogConfig, pColumns As List(Of String), pDocumentRow As DocumentRow, pMandator As Mandator, pWinline As WinlineData, pTable As Template.Table) Public Sub New(pLogConfig As LogConfig, pColumns As List(Of String), pDocumentRow As DocumentRow, pMandator As Mandator, pWinline As WinlineData, pTable As Template.Table)
InitializeComponent() InitializeComponent()
LogConfig = pLogConfig
Logger = pLogConfig.GetLogger() Logger = pLogConfig.GetLogger()
FormHelper = New FormHelper(pLogConfig, Me) FormHelper = New FormHelper(pLogConfig, Me)
@@ -119,7 +121,7 @@ Public Class frmRowEditor
If oField.Value Is Nothing Then If oField.Value Is Nothing Then
' TODO: Do we need to create a new field value here? ' TODO: Do we need to create a new field value here?
' aka. do we need to configure fieldvalue from column settings ' aka. do we need to configure fieldvalue from column settings
oDict.Add(oColumnName, New FieldValue()) oDict.Add(oColumnName, New FieldValue(LogConfig))
Else Else
oDict.Add(oColumnName, oField.Value) oDict.Add(oColumnName, oField.Value)
End If End If
@@ -161,11 +163,11 @@ Public Class frmRowEditor
' If there are (non-virtual) fields in the template which do not have a value yet, ' If there are (non-virtual) fields in the template which do not have a value yet,
' this might happen. ' this might happen.
If oField.Key Is Nothing Then If oField.Key Is Nothing Then
oField = New KeyValuePair(Of String, FieldValue)(oRow.Item(COL_KEY), New FieldValue()) oField = New KeyValuePair(Of String, FieldValue)(oRow.Item(COL_KEY), New FieldValue(LogConfig))
End If End If
Dim oFieldValue As FieldValue = oField.Value Dim oFieldValue As FieldValue = oField.Value
Dim oValueFromGrid As String = Utils.NotNull(oRow.Item(COL_VALUE_FINAL), String.Empty) Dim oValueFromGrid As String = ObjectEx.NotNull(oRow.Item(COL_VALUE_FINAL), String.Empty)
' Do the dirtiest date validation of all times ' Do the dirtiest date validation of all times
If oField.Value.DataType = ColumnType.Date And oValueFromGrid.Length > 0 Then If oField.Value.DataType = ColumnType.Date And oValueFromGrid.Length > 0 Then
@@ -270,11 +272,11 @@ Public Class frmRowEditor
Exit Sub Exit Sub
End If End If
If oColumn.Config?.Function?.Name = FUNCTION_GLN Then If oColumn.Config?.Functions.Any(Function(f) f.Name = FUNCTION_GLN) Then
e.RepositoryItem = AccountPicker e.RepositoryItem = AccountPicker
End If End If
If oColumn.Config?.Function?.Name = FUNCTION_EAN Then If oColumn.Config?.Functions.Any(Function(f) f.Name = FUNCTION_EAN) Then
e.RepositoryItem = ArticlePicker e.RepositoryItem = ArticlePicker
End If End If
@@ -291,7 +293,7 @@ Public Class frmRowEditor
Private Sub GridView1_CustomDrawCell(sender As Object, e As DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs) Handles GridView1.CustomDrawCell Private Sub GridView1_CustomDrawCell(sender As Object, e As DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs) Handles GridView1.CustomDrawCell
Dim oDataRow As DataRow = GridView1.GetDataRow(e.RowHandle) Dim oDataRow As DataRow = GridView1.GetDataRow(e.RowHandle)
Dim oKey As String = oDataRow.Item(COL_KEY) Dim oKey As String = oDataRow.Item(COL_KEY)
Dim oValue As String = Utils.NotNull(oDataRow.Item(COL_VALUE_FINAL), String.Empty) Dim oValue As String = ObjectEx.NotNull(oDataRow.Item(COL_VALUE_FINAL), String.Empty)
Dim oColumn = _Table.Columns. Dim oColumn = _Table.Columns.
Where(Function(c) c.Name = oKey). Where(Function(c) c.Name = oKey).
SingleOrDefault() SingleOrDefault()

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="AutoMapper" version="10.1.1" targetFramework="net461" /> <package id="AutoMapper" version="10.1.1" targetFramework="net461" />
<package id="NLog" version="4.7.10" targetFramework="net461" /> <package id="NLog" version="5.1.0" targetFramework="net461" />
</packages> </packages>