Compare commits

..

87 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
Jonathan Jenne
2894d398d0 Version 1.3.0.0 2022-05-03 16:25:33 +02:00
Jonathan Jenne
8743f0c4b1 Filter out inactive accounts and document kinds 2022-05-03 15:59:18 +02:00
Jonathan Jenne
8e02ed7159 Rename TemplateConfigItem to FieldConfig 2022-05-03 15:38:35 +02:00
Jonathan Jenne
5accfbe002 Add PreferExternalValue to control which value will be the final value 2022-05-03 15:32:35 +02:00
Jonathan Jenne
5fe4079028 Execute SQL function when loading document 2022-05-03 12:29:08 +02:00
Jonathan Jenne
623e1717d6 clean up 2022-04-27 10:48:33 +02:00
Jonathan Jenne
fa4ac39074 Rework Patterns to allow for row based and final sql replacement when importing 2022-04-26 16:19:17 +02:00
Jonathan Jenne
371c8e27cc Small config form improvements 2022-04-26 14:18:08 +02:00
Jonathan Jenne
c33770dd9e Version 1.2.9.4 2022-04-26 12:02:40 +02:00
Jonathan Jenne
3e41502766 Improve Error handling across the board 2022-04-26 12:02:00 +02:00
Jonathan Jenne
13af72dee5 Add placeholder for Report Filename 2022-04-25 10:41:13 +02:00
Jonathan Jenne
69f4c640a8 clean up 2022-04-22 16:22:22 +02:00
Jonathan Jenne
5ee739dae8 Skip inactive articles when looking up EAN 2022-04-22 16:19:11 +02:00
Jonathan Jenne
866e31f37a Version 1.2.9.3 2022-04-21 16:40:33 +02:00
Jonathan Jenne
88f844d516 Sort by document number 2022-04-21 16:40:27 +02:00
Jonathan Jenne
edcdf770b7 Fix missing document numbers 2022-04-21 16:40:12 +02:00
Jonathan Jenne
14ac6875c5 Version 1.2.9.2 2022-04-21 15:54:58 +02:00
Jonathan Jenne
c74b91713d Fix unhandled exception when GetDocuments query fails 2022-04-21 15:52:49 +02:00
Jonathan Jenne
8dba67d3e1 Add some code for future formatting of values 2022-04-21 15:52:19 +02:00
Jonathan Jenne
ad671443b9 Show Message when exporting report by hand 2022-04-21 15:51:13 +02:00
Jonathan Jenne
3623138fd1 Tweak Report 2022-04-21 15:50:48 +02:00
Jonathan Jenne
85318a3e81 Better Logging and Error Handling 2022-04-21 15:50:30 +02:00
65 changed files with 5976 additions and 3199 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

@@ -8,6 +8,11 @@
Public Const FUNCTION_PRICE = "PRICE" Public Const FUNCTION_PRICE = "PRICE"
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_ADDRESS = "ADDRESS"
Public Const PLACEHOLDER_CONST = "CONST"
Public Const PLACEHOLDER_FIELD = "FIELD"
Public Const TEMPLATE_TYPE_DATE = "xs:date" Public Const TEMPLATE_TYPE_DATE = "xs:date"
Public Const TEMPLATE_TYPE_INTEGER = "xs:integer" Public Const TEMPLATE_TYPE_INTEGER = "xs:integer"
@@ -56,17 +61,41 @@
[Decimal] [Decimal]
End Enum End Enum
Public Enum FieldError Public Enum FieldErrorType
None None
MissingValue MissingValue
AccountNotFound AccountNotFound
ArticleNotFound ArticleNotFound
PriceNotCalculated
MissingParameter
End Enum End Enum
Public Enum DocumentError Public Class FieldError
Public Type As FieldErrorType
Public Message As String
Public Overrides Function ToString() As String
Return $"{Message} ({Type})"
End Function
End Class
Public Enum DocumentErrorType
MandatorNotFound MandatorNotFound
MissingXmlAttribute
AttributeValidationFailed
PriceNotCalculated
End Enum End Enum
Public Class DocumentError
Public Type As DocumentErrorType
Public Message As String
Public Overrides Function ToString() As String
Return $"{Message} ({Type})"
End Function
End Class
Public Enum XmlFunction Public Enum XmlFunction
None = 0 None = 0
GLN = 1 GLN = 1

View File

@@ -26,6 +26,8 @@ Namespace Documents
''' </summary> ''' </summary>
Public Property Selected As Boolean = False Public Property Selected As Boolean = False
Private DocumentErrors As New List(Of DocumentError)
Public ReadOnly Property HasErrors As Boolean Public ReadOnly Property HasErrors As Boolean
Get Get
Return Errors.Count > 0 Return Errors.Count > 0
@@ -34,16 +36,27 @@ Namespace Documents
Public ReadOnly Property Errors As List(Of String) Public ReadOnly Property Errors As List(Of String)
Get Get
Dim oRowErrors = Rows.SelectMany(Function(row) row.Errors).ToList() Dim oRowErrors = Rows.
Dim oDocumentErrors As List(Of String) = GetDocumentErrors(). SelectMany(Function(row) row.Errors, Function(row, err) err.ToString).
ToList()
Dim oDocumentErrors As List(Of String) = DocumentErrors.
Select(Function(err) err.ToString()). Select(Function(err) err.ToString()).
ToList() ToList()
Return oDocumentErrors. Return oDocumentErrors.
Concat(oRowErrors). Concat(oRowErrors).
ToList() ToList()
End Get End Get
End Property End Property
Public Sub AddDocumentError(pDocumentError As DocumentErrorType, pMessage As String)
DocumentErrors.Add(New DocumentError With {
.Type = pDocumentError,
.Message = pMessage
})
End Sub
Public ReadOnly Property MandatorId As String Public ReadOnly Property MandatorId As String
Get Get
Return Mandator?.Id Return Mandator?.Id
@@ -84,19 +97,12 @@ Namespace Documents
End Function End Function
Public Overrides Function Equals(obj As Object) As Boolean Public Overrides Function Equals(obj As Object) As Boolean
Return FullName = DirectCast(obj, Document).FullName If obj Is Nothing Then
End Function Return False
Private Function GetDocumentErrors() As List(Of DocumentError)
Dim oErrors As New List(Of DocumentError)
If Mandator Is Nothing Then
oErrors.Add(DocumentError.MandatorNotFound)
End If End If
Return oErrors Return FullName = DirectCast(obj, Document).FullName
End Function End Function
End Class End Class
End Namespace End Namespace

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

@@ -7,6 +7,9 @@ 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 DigitalData.Modules.Database
Imports DevExpress.Utils.CommonDialogs
Imports DigitalData.Modules.Base
Namespace Documents Namespace Documents
Public Class DocumentLoader Public Class DocumentLoader
@@ -16,6 +19,7 @@ Namespace Documents
Private ReadOnly MappingConfig As MappingConfig Private ReadOnly MappingConfig As MappingConfig
Private ReadOnly TemplateConfig As TemplateConfig Private ReadOnly TemplateConfig As TemplateConfig
Private ReadOnly ApplicationConfig As Config Private ReadOnly ApplicationConfig As Config
Private ReadOnly Patterns As Patterns
Public Property Files As New List(Of Document) Public Property Files As New List(Of Document)
@@ -45,12 +49,13 @@ Namespace Documents
End Sub End Sub
End Class End Class
Public Sub New(pLogConfig As LogConfig, pWinline As WinlineData, pMappingConfig As MappingConfig, pTemplateConfig As TemplateConfig, pApplicationConfig As Config) Public Sub New(pLogConfig As LogConfig, pWinline As WinlineData, pDatabase As MSSQLServer, pMappingConfig As MappingConfig, pTemplateConfig As TemplateConfig, pGeneralConfig As GeneralConfig, pApplicationConfig As Config)
MyBase.New(pLogConfig) MyBase.New(pLogConfig, pDatabase)
Winline = pWinline Winline = pWinline
MappingConfig = pMappingConfig MappingConfig = pMappingConfig
TemplateConfig = pTemplateConfig TemplateConfig = pTemplateConfig
ApplicationConfig = pApplicationConfig ApplicationConfig = pApplicationConfig
Patterns = New Patterns(pLogConfig, pGeneralConfig)
End Sub End Sub
Public Async Function LoadFiles(pTemplate As Template, pMandator As Mandator) As Task(Of Boolean) Public Async Function LoadFiles(pTemplate As Template, pMandator As Mandator) As Task(Of Boolean)
@@ -65,22 +70,13 @@ Namespace Documents
Logger.Debug("Found [{0}] files in directory [{1}]", oFiles.Count, oDirectory) Logger.Debug("Found [{0}] files in directory [{1}]", oFiles.Count, oDirectory)
For Each oFile In oFiles For Each oFile In oFiles
Try Logger.Info("Loading file [{0}]", oFile.Name)
Dim oDocument = Await LoadFile(oFile, pTemplate, pMandator) Dim oDocument = Await LoadFile(oFile, pTemplate, pMandator)
Files.Add(oDocument) Files.Add(oDocument)
FilesLoaded = Files.Count FilesLoaded = Files.Count
Dim oInfo As New FileLoadInfo(FilesTotal, FilesLoaded) Dim oInfo As New FileLoadInfo(FilesTotal, FilesLoaded)
RaiseEvent FileLoadComplete(Me, oInfo) RaiseEvent FileLoadComplete(Me, oInfo)
Catch ex As MissingAttributeException
Logger.Error(ex)
Throw New DocumentLoaderException($"Missing Attribute '{ex.Message}' in File '{oFile.Name}'")
Catch ex As Exception
Logger.Error(ex)
Throw ex
End Try
Next Next
Return True Return True
@@ -93,20 +89,52 @@ Namespace Documents
End Function End Function
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)
Dim oFileList As New List(Of FileInfo) From {pFileInfo} Logger.Debug("Creating new Document object for file [{0}]", pFileInfo.Name)
Logger.Info("Loading file [{0}]", pFileInfo.Name) Dim oDocument As New Document With {
.File = pFileInfo,
.Schema = pTemplate
}
Try Try
Return Await oFileList. oDocument = LoadDocumentData(oDocument, pTemplate, TemplateConfig)
Select(AddressOf WrapFileInfo).
Select(Function(d) IncludeSchema(d, pTemplate)).
Select(Function(d) LoadDocumentData(d, pTemplate, TemplateConfig)).
Select(Async Function(d) Await MatchDataFromWinLine(d, Winline.Mandators, pMandator, pTemplate)).
SingleOrDefault()
Catch ex As Exception Catch ex As Exception
Logger.Error(ex) Logger.Error(ex)
Throw ex Throw ex
End Try End Try
Try
oDocument = Await MatchDataFromWinLine(oDocument, Winline.Mandators, pMandator, pTemplate)
Catch ex As Exception
Logger.Error(ex)
Throw ex
End Try
Try
oDocument = MarkRequiredFields(oDocument)
Catch ex As Exception
Logger.Error(ex)
Throw ex
End Try
Return oDocument
End Function
Public Function MarkRequiredFields(pDocument As Document) As Document
For Each oRow In pDocument.Rows
For Each oField In oRow.Fields
If oField.Value.Final = String.Empty And oField.Value.IsRequired Then
oField.Value.AddFieldError(FieldErrorType.MissingValue, $"Attribut '{oField.Key}' ist ein Pflichtfeld, wurde aber nicht gefüllt.")
End If
Next
Next
Return pDocument
End Function End Function
Public Sub ReplaceDocument(pDocument As Document) Public Sub ReplaceDocument(pDocument As Document)
@@ -116,6 +144,7 @@ Namespace Documents
Private Function IncludeSchema(pDocument As Document, pTemplate As Template) As Document Private Function IncludeSchema(pDocument As Document, pTemplate As Template) As Document
Logger.Debug("Adding schema to Document object.")
pDocument.Schema = pTemplate pDocument.Schema = pTemplate
Return pDocument Return pDocument
End Function End Function
@@ -133,32 +162,47 @@ Namespace Documents
''' </MESOWebService> ''' </MESOWebService>
''' </example> ''' </example>
Private Function LoadDocumentData(pDocument As Document, pTemplate As Template, pTemplateConfig As TemplateConfig) As Document Private Function LoadDocumentData(pDocument As Document, pTemplate As Template, pTemplateConfig As TemplateConfig) As Document
Dim oText As String = IO.File.ReadAllText(pDocument.FullName) Logger.Debug("Loading file contents")
Dim oDoc = XDocument.Parse(oText)
Dim oText As String
Dim oDoc As XDocument
Try
Logger.Debug("Loading file from fs..")
oText = IO.File.ReadAllText(pDocument.FullName)
Logger.Debug("Parsing file..")
oDoc = XDocument.Parse(oText)
Catch ex As Exception
Logger.Error(ex)
Throw ex
End Try
Logger.Debug("File Loaded.")
Dim oRootElement As XElement = XmlData.GetElement(oDoc, "MESOWebService") Dim oRootElement As XElement = XmlData.GetElement(oDoc, "MESOWebService")
If oRootElement Is Nothing Then If oRootElement Is Nothing Then
Throw New MalformedXmlException("Datei enthält kein MESOWebService-Element") pDocument.AddDocumentError(DocumentErrorType.MissingXmlAttribute, "Datei enthält kein MESOWebService-Attribut")
End If End If
Dim oTemplateName = XmlData.GetElementAttribute(oRootElement, "Template") Dim oTemplateName = XmlData.GetElementAttribute(oRootElement, "Template")
If oTemplateName Is Nothing Then If oTemplateName Is Nothing Then
Throw New MalformedXmlException("Datei enthält kein Template-Attribut") pDocument.AddDocumentError(DocumentErrorType.MissingXmlAttribute, "Datei enthält kein Template-Attribut")
End If End If
Dim oTemplateType = XmlData.GetElementAttribute(oRootElement, "TemplateType") Dim oTemplateType = XmlData.GetElementAttribute(oRootElement, "TemplateType")
If oTemplateType Is Nothing Then If oTemplateType Is Nothing Then
Throw New MalformedXmlException("Datei enthält kein TemplateType-Attribut") pDocument.AddDocumentError(DocumentErrorType.MissingXmlAttribute, "Datei enthält kein TemplateType-Attribut")
End If End If
Dim oOption = XmlData.GetElementAttribute(oRootElement, "option") Dim oOption = XmlData.GetElementAttribute(oRootElement, "option")
If oOption Is Nothing Then If oOption Is Nothing Then
Throw New MalformedXmlException("Datei enthält kein option-Attribut") pDocument.AddDocumentError(DocumentErrorType.MissingXmlAttribute, "Datei enthält kein option-Attribut")
End If End If
Dim oPrintVoucher = XmlData.GetElementAttribute(oRootElement, "printVoucher") Dim oPrintVoucher = XmlData.GetElementAttribute(oRootElement, "printVoucher")
If oPrintVoucher Is Nothing Then If oPrintVoucher Is Nothing Then
Throw New MalformedXmlException("Datei enthält kein printVoucher-Attribut") pDocument.AddDocumentError(DocumentErrorType.MissingXmlAttribute, "Datei enthält kein printVoucher-Attribut")
End If End If
' The first level of Elements are the document Rows ' The first level of Elements are the document Rows
@@ -181,40 +225,43 @@ 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.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
Dim oValue = oSubElement.Value.Trim() Dim oValue = oSubElement.Value.Trim()
Logger.Debug("Creating existing field from Element: [{0}]", oSubElement.Name.ToString)
' TODO: Needed when we have time for date times ' TODO: Needed when we have time for date times
'If oTemplateField.DataType = Constants.ColumnType.Date Then 'If oTemplateField.DataType = Constants.ColumnType.Date Then
' Dim oDate = Date.ParseExact(oValue, "yyyy-MM-dd", CultureInfo.InvariantCulture) ' Dim oDate = Date.ParseExact(oValue, "yyyy-MM-dd", CultureInfo.InvariantCulture)
' oValue = oDate.ToString("d") ' oValue = oDate.ToString("d")
'End If 'End If
oFields.Add(oSubElement.Name.ToString, New DocumentRow.FieldValue With { Dim oFieldValue = GetFieldValueFromColumn(oColumn, oColumnSortKey)
.Original = oValue, oFieldValue.SetOriginalValue(oValue)
.Final = oValue,
.DataType = oColumn.DataType, oFields.Add(oSubElement.Name.ToString, oFieldValue)
.IsRequired = oRequired,
.IsVirtual = oColumn.Config.IsVirtual,
.SortKey = oColumnSortKey
})
Else Else
Dim oColumnError = FieldError.None Logger.Debug("Creating new field from Configuration: [{0}]", oColumn.Name)
Dim oFieldValue = GetFieldValueFromColumn(oColumn, oColumnSortKey)
If oColumn.Config?.IsRequired Then If oColumn.Config?.IsRequired Then
oColumnError = FieldError.MissingValue oFieldValue.AddFieldError(FieldErrorType.MissingValue, $"Attribut {oSubElement.Name} wird benötigt, ist aber nicht gefüllt.")
End If End If
oFields.Add(oColumn.Name, New DocumentRow.FieldValue With { oFields.Add(oColumn.Name, oFieldValue)
.[Error] = oColumnError,
.SortKey = oColumnSortKey,
.IsVirtual = oColumn.Config.IsVirtual
})
End If End If
oColumnSortKey += 1 oColumnSortKey += 1
@@ -241,6 +288,16 @@ Namespace Documents
Return pDocument Return pDocument
End Function End Function
Public Function GetFieldValueFromColumn(pColumn As Template.Column, pSortKey As Integer) As DocumentRow.FieldValue
Return New DocumentRow.FieldValue(LogConfig) With {
.DataType = pColumn.DataType,
.IsRequired = pColumn.IsRequired,
.IsVirtual = pColumn.Config.IsVirtual,
.PreferExternalValue = pColumn.Config.PreferExternalValue,
.SortKey = pSortKey
}
End Function
Private Async Function MatchDataFromWinLine(pDocument As Document, pMandators As List(Of Mandator), pMandator As Mandator, pTemplate As Template) As Task(Of Document) Private Async Function MatchDataFromWinLine(pDocument As Document, pMandators As List(Of Mandator), pMandator As Mandator, pTemplate As Template) As Task(Of Document)
Dim oMandators As List(Of Mandator) = pMandators. Dim oMandators As List(Of Mandator) = pMandators.
@@ -260,38 +317,77 @@ Namespace Documents
If oMandator Is Nothing Then If oMandator Is Nothing Then
Logger.Warn("Mandator not found for File [{0}]", pDocument.File.Name) Logger.Warn("Mandator not found for File [{0}]", pDocument.File.Name)
' Without mandator, we just exit, life is meaningless.
pDocument.AddDocumentError(DocumentErrorType.MandatorNotFound, "Mandant nicht gefunden. Verarbeitung wurde abgebrochen.")
Else Else
' Set mandator befor applying any functions that depend on a valid mandator ' Set mandator befor applying any functions that depend on a valid mandator
pDocument.Mandator = oMandator pDocument.Mandator = oMandator
RaiseEvent FileLoadProgress(Me, New FileLoadProgressInfo(FilesTotal, FilesLoaded) With { RaiseEvent FileLoadProgress(Me, New FileLoadProgressInfo(FilesTotal, FilesLoaded) With {.RunningFunction = "Winline-Funktionen"})
.RunningFunction = "Winline-Funktionen"
})
pDocument = ApplyDefinedItemFunctionsForImport(pDocument, oMandator, pTemplate) pDocument = Await ApplyDefinedItemFunctionsForImportAsync(pDocument, oMandator, pTemplate)
pDocument = ApplyDynamicItemFunctionsForImport(pDocument, oMandator) pDocument = ApplyDynamicItemFunctionsForImport(pDocument, oMandator)
RaiseEvent FileLoadProgress(Me, New FileLoadProgressInfo(FilesTotal, FilesLoaded) With { RaiseEvent FileLoadProgress(Me, New FileLoadProgressInfo(FilesTotal, FilesLoaded) With {.RunningFunction = "Preis-Funktionen"})
.RunningFunction = "Preis-Funktionen"
})
If ApplicationConfig.AutomaticPriceCalculation = True Then If ApplicationConfig.AutomaticPriceCalculation = True Then
' These functions will only be applied if the document does not have errors ' These functions will only be applied if the document does not have errors
pDocument = Await MaybeApplyPriceFunctions(pDocument, oMandator, pTemplate) pDocument = Await MaybeApplyPriceFunctions(pDocument, oMandator, pTemplate)
End If End If
RaiseEvent FileLoadProgress(Me, New FileLoadProgressInfo(FilesTotal, FilesLoaded) With { RaiseEvent FileLoadProgress(Me, New FileLoadProgressInfo(FilesTotal, FilesLoaded) With {.RunningFunction = "Feld-Funktionen"})
.RunningFunction = "Feld-Funktionen"
})
pDocument = ApplySQLFunctionForImport(pDocument, TemplateConfig.SqlItems)
' This function needs to be the last one because ' This function needs to be the last one because
' it can relate to any previously set value ' it can relate to any previously set value
ApplyFieldFunctionForImport(pDocument, oMandator, pTemplate) pDocument = ApplyFieldFunctionForImport(pDocument, oMandator, pTemplate)
End If End If
Return pDocument Return pDocument
End Function End Function
Private Function ApplySQLFunctionForImport(pDocument As Document, pSQLConfig As List(Of FieldConfig)) As Document
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
' Example: Setting SQL for Article StorageLocation will invoke the sql for each row
Dim oRowList = pDocument.Rows.
Where(Function(row) row.Fields.Any(Function(field) field.Key = oSQLConfigItem.Name)).
ToList()
For Each oRow As DocumentRow In oRowList
Dim oSQL = oFunction.Params
Dim oField = oRow.Fields.
Where(Function(field) field.Key = oSQLConfigItem.Name).
SingleOrDefault()
oSQL = Patterns.ReplaceForImport(pDocument, oRow, oSQL)
Dim oValue = Database.GetScalarValue(oSQL)
If oValue IsNot Nothing Then
oField.Value.SetExternalValue(oValue)
End If
Next
Next
Next
Return pDocument
End Function
''' <summary> ''' <summary>
''' Apply price calculation to the documents products ''' Apply price calculation to the documents products
''' '''
@@ -300,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
@@ -316,24 +413,34 @@ 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
Private Function ApplyDefinedItemFunctionsForImport(pDocument As Document, pMandator As Mandator, pTemplate As Template) As Document Private Async Function ApplyDefinedItemFunctionsForImportAsync(pDocument As Document, pMandator As Mandator, pTemplate As Template) As Task(Of Document)
For Each oRow As DocumentRow In pDocument.Rows For Each oRow As DocumentRow In pDocument.Rows
Dim oTable = pTemplate.Tables.Where(Function(table) table.Name = oRow.TableName).SingleOrDefault() Dim oTable = pTemplate.Tables.Where(Function(table) table.Name = oRow.TableName).SingleOrDefault()
@@ -342,23 +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 = Constants.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 = Constants.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
Select Case oFunctionName
Case FUNCTION_GLN
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
@@ -384,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)
@@ -409,10 +543,10 @@ 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.Final = oValue oField.Value.SetExternalValue(oValue)
End If End If
Else Else
@@ -427,6 +561,9 @@ Namespace Documents
End Try End Try
End If End If
Next Next
Next
Next Next
Return pDocument Return pDocument
@@ -459,9 +596,7 @@ Namespace Documents
pDocument.Rows. pDocument.Rows.
SelectMany(Function(row) row.Fields). SelectMany(Function(row) row.Fields).
Where(Function(field) field.Key = oMapping.DestinationItem). Where(Function(field) field.Key = oMapping.DestinationItem).
SetValue(Sub(field) SetValue(Sub(field) field.Value.SetExternalValue(oMapping.DestinationValue))
field.Value.Final = oMapping.DestinationValue
End Sub)
Else Else
' don't do anything ' don't do anything
@@ -472,12 +607,12 @@ Namespace Documents
Return pDocument Return pDocument
End Function End Function
Private Async Function SetPrice(pRow As DocumentRow, pPriceField As String, oFieldMap As Dictionary(Of String, String), pDocument As Document, pMandator As Mandator, pTemplate As Template) As Task Private Async Function SetPrice(pRow As DocumentRow, pPriceField As String, pParamMap As Dictionary(Of String, String), pDocument As Document, pMandator As Mandator, pTemplate As Template) As Task
Dim oPriceItem As DocumentRow.FieldValue = pRow.Fields.GetOrDefault(pPriceField) Dim oPriceItem As DocumentRow.FieldValue = pRow.Fields.GetOrDefault(pPriceField)
' These fields are fetched from the current row ' These fields are fetched from the current row
Const PARAMETER_ARTICLE = "Article" Const PARAMETER_ARTICLE = "Article"
Dim oArticleNumberField As String = oFieldMap.GetOrDefault(PARAMETER_ARTICLE, Nothing) Dim oArticleNumberField As String = pParamMap.GetOrDefault(PARAMETER_ARTICLE, Nothing)
If oArticleNumberField Is Nothing Then If oArticleNumberField Is Nothing Then
Logger.Warn("Parameter '{0}' not found for Function PRICE", PARAMETER_ARTICLE) Logger.Warn("Parameter '{0}' not found for Function PRICE", PARAMETER_ARTICLE)
End If End If
@@ -488,7 +623,7 @@ Namespace Documents
Dim oArticleNumber As String = pRow.Fields.Item(oArticleNumberField).Final Dim oArticleNumber As String = pRow.Fields.Item(oArticleNumberField).Final
Const PARAMETER_QUANTITY = "Quantity" Const PARAMETER_QUANTITY = "Quantity"
Dim oQuantityField As String = oFieldMap.GetOrDefault(PARAMETER_QUANTITY, Nothing) Dim oQuantityField As String = pParamMap.GetOrDefault(PARAMETER_QUANTITY, Nothing)
If oQuantityField Is Nothing Then If oQuantityField Is Nothing Then
Logger.Warn("Parameter '{0}' not found for Function PRICE", PARAMETER_QUANTITY) Logger.Warn("Parameter '{0}' not found for Function PRICE", PARAMETER_QUANTITY)
End If End If
@@ -499,13 +634,13 @@ Namespace Documents
End If End If
' These fields a fetched from the head row, ie. the first row ' These fields a fetched from the head row, ie. the first row
Dim oAccountNumberField As String = oFieldMap.GetOrDefault("Account", Nothing) Dim oAccountNumberField As String = pParamMap.GetOrDefault("Account", Nothing)
Dim oAccountNumber = pDocument.GetFieldValue(oAccountNumberField) Dim oAccountNumber = pDocument.GetFieldValue(oAccountNumberField)
Dim oDocumentDateField As String = oFieldMap.GetOrDefault("DocumentDate", Nothing) Dim oDocumentDateField As String = pParamMap.GetOrDefault("DocumentDate", Nothing)
Dim oDocumentDate = pDocument.GetFieldValue(oDocumentDateField) Dim oDocumentDate = pDocument.GetFieldValue(oDocumentDateField)
Dim oDocumentKindField As String = oFieldMap.GetOrDefault("DocumentKind", Nothing) Dim oDocumentKindField As String = pParamMap.GetOrDefault("DocumentKind", Nothing)
Dim oDocumentKind As Integer = 0 Dim oDocumentKind As Integer = 0
If Integer.TryParse(pDocument.GetFieldValue(oDocumentKindField), oDocumentKind) = False Then If Integer.TryParse(pDocument.GetFieldValue(oDocumentKindField), oDocumentKind) = False Then
Logger.Warn("Value for parameter DocumentKind could not be parsed. Setting to 0.") Logger.Warn("Value for parameter DocumentKind could not be parsed. Setting to 0.")
@@ -516,32 +651,40 @@ Namespace Documents
' TODO: This function should not be hardcoded, but be replaced with virtual field or something.. ' TODO: This function should not be hardcoded, but be replaced with virtual field or something..
' It is related to customer SCHAUM and nothing general ' It is related to customer SCHAUM and nothing general
Dim oWaitingDays As Integer = Await Winline.TryGetWaitingDays(oDocumentKind, pMandator) Dim oWaitingDays As Integer = Await Winline.TryGetWaitingDaysAsync(oDocumentKind, pMandator)
' END TODO ' END TODO
Dim oArticlePrice As Double = Await Winline.TryGetArticlePrice(oArticleNumber, oAccountNumber, oQuantity, oDocumentDate, pMandator, pTemplate, oWaitingDays) Dim oArticlePrice As Double = Await Winline.TryGetArticlePriceAsync(oArticleNumber, oAccountNumber, oQuantity, oDocumentDate, pMandator, pTemplate, oWaitingDays)
If oArticlePrice > 0 Then If oArticlePrice > 0 Then
oPriceItem.External = oArticlePrice oPriceItem.SetExternalValue(oArticlePrice)
oPriceItem.Final = oArticlePrice
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.External = oArticleNumber oNumberItem.SetExternalValue(oArticleNumber)
oNumberItem.Final = oArticleNumber Logger.Info("EAN [{0}] resolved to ArticleNumber [{1}]", oNumberItem.Original, oArticleNumber)
Else Else
oNumberItem.Error = FieldError.ArticleNotFound 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
Private Sub SetAccountByGLN(oRow As DocumentRow, pMandator As Mandator, pNumberField As String, pNameField As String, pParams As Dictionary(Of String, String)) Private Sub SetAccountByGLN(oRow As DocumentRow, pMandator As Mandator, pNumberField As String, pNameField As String, pParams As Dictionary(Of String, String))
Try
' Try to read the Account number (which is a GLN really) and account Name ' Try to read the Account number (which is a GLN really) and account Name
Dim oNumberItem As DocumentRow.FieldValue = oRow.Fields.GetOrDefault(pNumberField) Dim oNumberItem As DocumentRow.FieldValue = oRow.Fields.GetOrDefault(pNumberField)
Dim oNameItem As DocumentRow.FieldValue = oRow.Fields.GetOrDefault(pNameField) Dim oNameItem As DocumentRow.FieldValue = oRow.Fields.GetOrDefault(pNameField)
@@ -552,17 +695,15 @@ 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
oNumberItem.External = oAccount.Id oNumberItem.SetExternalValue(oAccount.Id)
oNumberItem.Final = oAccount.Id
If oContainsAccountName Then If oContainsAccountName Then
oNameItem.External = oAccount.Name oNameItem.SetExternalValue(oAccount.Name)
oNameItem.Final = oAccount.Name
Else Else
' TODO: What to to if name field is missing or not set? ' TODO: What to to if name field is missing or not set?
'oRow.Fields.Add(pNameField, New DocumentRow.FieldValue() With { 'oRow.Fields.Add(pNameField, New DocumentRow.FieldValue() With {
@@ -571,31 +712,104 @@ 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. oNumberItem.AddFieldError(FieldErrorType.AccountNotFound, $"GLN in Attribut '{pNumberField}' konnte nicht aufgelöst werden.")
If oNumberItem.IsRequired Then
oNumberItem.Error = FieldError.AccountNotFound
End If
End If End If
Catch ex As Exception
Logger.Error(ex)
Throw ex
End Try
End Sub End Sub
Private Function WrapFileInfo(pFileInfo As FileInfo) As Document Public Async Function SetVersionedRunningNumber(pDocument As Document, pRow As DocumentRow, pMandator As Mandator, pNumberField As String, pParams As Dictionary(Of String, String)) As Task
Return New Document With {.File = pFileInfo} Try
End Function Const PARAMETER_ACCOUNT = "Account"
Dim oAccountField As String = pParams.GetOrDefault(PARAMETER_ACCOUNT, Nothing)
Private Function ParseFunctionParamsAsDict(pParams As String) As Dictionary(Of String, String) If oAccountField Is Nothing Then
Dim oParamsDict As New Dictionary(Of String, String) Logger.Warn("Parameter '{0}' not found for Function RUNNINGNUMBER", PARAMETER_ACCOUNT)
If pParams <> String.Empty Then
Dim oParamList = pParams.Split("|").ToList()
For Each oParam In oParamList
Dim oParamSplit = oParam.Split("=")
oParamsDict.Add(oParamSplit(0), oParamSplit(1))
Next
End If End If
Return oParamsDict Dim oRunningNumberItem As DocumentRow.FieldValue = pRow.Fields.GetOrDefault(pNumberField)
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 oAccountNumber = oAccountNumberItem.Final
Dim oVersionedNumber = Await Winline.GetVersionedRunningNumberAsync(pDocument, pMandator, oAccountNumber, oRunningNumber)
If oVersionedNumber <> oRunningNumber Then
oRunningNumberItem.SetExternalValue(oVersionedNumber)
End If
Catch ex As Exception
Logger.Error(ex)
Throw ex
End Try
End Function End Function
Public Function SetAddressByAccountNumber(pDocument As Document, pRow As DocumentRow, pMandator As Mandator, pAccountField As String, pParams As Dictionary(Of String, String)) As Task
Try
Const PARAMETER_NAME = "Name"
Const PARAMETER_STREET = "Street"
Const PARAMETER_ZIP = "Zip"
Const PARAMETER_CITY = "City"
Dim oAccountNumberItem As DocumentRow.FieldValue = pRow.Fields.GetOrDefault(pAccountField)
Dim oAccountNumber = oAccountNumberItem.Final
Dim oNameField As String = pParams.GetOrDefault(PARAMETER_NAME, Nothing)
Dim oNameFieldItem As DocumentRow.FieldValue = pRow.Fields.GetOrDefault(oNameField)
If oNameField Is Nothing Then
Logger.Warn("Parameter '{0}' not found for Function ADDRESS", PARAMETER_NAME)
oAccountNumberItem.AddFieldError(FieldErrorType.MissingParameter, $"Parameter '{PARAMETER_NAME}' wurde nicht gefüllt.")
End If
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
Logger.Error(ex)
Throw ex
End Try
Return Task.CompletedTask
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
@@ -35,11 +36,11 @@ Namespace Documents
End Get End Get
End Property End Property
Public ReadOnly Property Errors As List(Of String) Public ReadOnly Property Errors As List(Of FieldError)
Get Get
Return Fields. Return Fields.
Where(Function(f) f.Value.HasError). Where(Function(f) f.Value.HasError).
Select(Function(f) $"{f.Key} has Error: {f.Value.Error}").ToList() SelectMany(Function(f) f.Value.Errors).ToList()
End Get End Get
End Property End Property
@@ -51,50 +52,56 @@ Namespace Documents
Return SortKey.CompareTo(DirectCast(other, DocumentRow).SortKey) Return SortKey.CompareTo(DirectCast(other, DocumentRow).SortKey)
End Function End Function
''' <summary>
''' TODO: Use this class to
''' </summary>
Public Class Field
Public ReadOnly Property Name
Public Property Value As FieldValue
Public Sub New(pName As String)
Name = pName
End Sub
End Class
Public Class FieldValue Public Class FieldValue
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
Public Property [Error] As FieldError = FieldError.None
Public Sub New() Public Property Errors As New List(Of FieldError)
End Sub Public ReadOnly Property Original As String
Public Property Original As String
Get Get
Return FormatValue(_Original, DataType) Return FormatValue(_Original, DataType)
End Get End Get
Set(value As String)
_Original = value
End Set
End Property End Property
Public Property External As String Public ReadOnly Property External As String
Get Get
Return FormatValue(_External, DataType) Return FormatValue(_External, DataType)
End Get End Get
Set(value As String)
_External = value
End Set
End Property End Property
Public Property Final As String Public ReadOnly Property Final As String
Get Get
Return FormatValue(_Final, DataType) Return FormatValue(_Final, DataType)
End Get End Get
Set(value As String)
_Final = value
End Set
End Property End Property
Public Property IsRequired As Boolean = False Public Property IsRequired As Boolean = False
Public Property IsVirtual As Boolean = False Public Property IsVirtual As Boolean = False
Public Property PreferExternalValue As Boolean = True
Public Property SortKey As Integer = 0 Public Property SortKey As Integer = 0
Public Function GetValue(pValueType) As String Public Sub New(pLogConfig As LogConfig)
Logger = pLogConfig.GetLogger()
End Sub
Public Function GetValue(pValueType As String) As String
Select Case pValueType Select Case pValueType
Case "Original" Case "Original"
Return Original Return Original
@@ -107,9 +114,53 @@ Namespace Documents
End Select End Select
End Function End Function
Public Sub SetValue(pValueType As String, pValue As String)
Select Case pValueType
Case "Original"
_Original = pValue
Case "External"
_External = pValue
Case "Final"
_Final = pValue
Case Else
' Noop
End Select
End Sub
Public Sub AddFieldError(pType As FieldErrorType, pMessage As String)
Errors.Add(New FieldError() With {
.Type = pType,
.Message = pMessage
})
End Sub
Public Sub SetExternalValue(pValue As String)
_External = pValue
' Set the external value as the final value, overriding the original / previous external value
' if the external value should be preferred
If PreferExternalValue = True Then
Logger.Debug("Setting Final value to [{0}] because PreferExternalValue is True", pValue)
_Final = pValue
End If
' If there is no Original value (because the field is virtual),
' set the external value as the final value regardless of the PreferExternalValue setting
If _Original = String.Empty Then
Logger.Debug("Setting Final value to [{0}] because Original value is empty", pValue)
_Final = pValue
End If
End Sub
Public Sub SetOriginalValue(pValue As String)
_Original = pValue
_Final = pValue
End Sub
Public ReadOnly Property HasError As Boolean Public ReadOnly Property HasError As Boolean
Get Get
Return [Error] <> FieldError.None Or (IsRequired And Final = String.Empty) ' Required check was moved to DocumentLoader
Return Errors.Count > 0 'Or (IsRequired And Final = String.Empty)
End Get End Get
End Property End Property

View File

@@ -57,18 +57,12 @@
MyBase.New(message) MyBase.New(message)
End Sub End Sub
End Class End Class
Public Class NoMandatorException
Public Class LengthExceededException
Inherits MultiToolException Inherits MultiToolException
Public Sub New(message As String) Public Sub New(attribute As String)
MyBase.New(message) MyBase.New(attribute)
End Sub
End Class
Public Class MalformedXmlException
Inherits MultiToolException
Public Sub New(message As String)
MyBase.New(message)
End Sub End Sub
End Class End Class

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" />
@@ -151,7 +153,7 @@
<Compile Include="Winline\Entities\Contact.vb" /> <Compile Include="Winline\Entities\Contact.vb" />
<Compile Include="Winline\Entities\DocumentKind.vb" /> <Compile Include="Winline\Entities\DocumentKind.vb" />
<Compile Include="Winline\Entities\Mandator.vb" /> <Compile Include="Winline\Entities\Mandator.vb" />
<Compile Include="Templates\TemplateConfigItem.vb" /> <Compile Include="Templates\FieldConfig.vb" />
<Compile Include="Winline\WebServiceData.vb" /> <Compile Include="Winline\WebServiceData.vb" />
<Compile Include="XmlData.vb" /> <Compile Include="XmlData.vb" />
</ItemGroup> </ItemGroup>

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

@@ -2,21 +2,29 @@
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports MultiTool.Common.Documents Imports MultiTool.Common.Documents
Imports MultiTool.Common.Templates Imports MultiTool.Common.Templates
Imports MultiTool.Common.Constants
Imports MultiTool.Common.Winline.Entities Imports MultiTool.Common.Winline.Entities
Public Class Patterns Public Class Patterns
Inherits BaseClass Inherits BaseClass
Private ReadOnly GeneralConfig As GeneralConfig Private ReadOnly GeneralConfig As GeneralConfig
Private ReadOnly Regex As New Regex("{#(\w+)#([\w\s_-]+)}+")
Public Sub New(pLogConfig As LogConfig, pGeneralConfig As GeneralConfig) Public Sub New(pLogConfig As LogConfig, pGeneralConfig As GeneralConfig)
MyBase.New(pLogConfig) MyBase.New(pLogConfig)
GeneralConfig = pGeneralConfig GeneralConfig = pGeneralConfig
End Sub End Sub
Public Function ReplaceForImport(pDocument As Documents.Document, pRow As DocumentRow, oString As String) ''' <summary>
Dim oRegex = New Regex("{#(\w+)#([\w\s_-]+)}+") ''' Replaces placeholders in an sql marked as final sql in the template.
Dim oMatches As MatchCollection = oRegex.Matches(oString) ''' </summary>
''' <remarks>
''' This SQL does not replace field-value placeholders!
''' This is a globally applied function!
''' </remarks>
Public Function ReplaceForImportFinalSQL(pDocument As Document, pReportFileName As String, pString As String) As String
Dim oMatches As MatchCollection = Regex.Matches(pString)
For Each oMatch As Match In oMatches For Each oMatch As Match In oMatches
Dim oPlaceholderString As String = oMatch.Groups.Item(0)?.Value Dim oPlaceholderString As String = oMatch.Groups.Item(0)?.Value
@@ -24,53 +32,77 @@ Public Class Patterns
Dim oPlaceholderValue As String = oMatch.Groups.Item(2)?.Value Dim oPlaceholderValue As String = oMatch.Groups.Item(2)?.Value
Select Case oPlaceholderType.ToUpper Select Case oPlaceholderType.ToUpper
Case "FIELD" Case PLACEHOLDER_CONST
Dim oValue = ""
Select Case oPlaceholderValue.ToUpper
Case "FILENAME"
oValue = pDocument.FileName
Case "FILENAME_REPORT"
oValue = pReportFileName
Case Else
oValue = ReplaceBasicValues(oPlaceholderValue, pDocument.Mandator)
End Select
If oValue <> "" Then
pString = pString.Replace(oPlaceholderString, oValue)
End If
End Select
Next
Return pString
End Function
''' <summary>
'''
''' </summary>
''' <param name="pDocument"></param>
''' <param name="pRow"></param>
''' <param name="pString"></param>
''' <returns></returns>
Public Function ReplaceForImport(pDocument As Document, pRow As DocumentRow, pString As String)
Dim oMatches As MatchCollection = Regex.Matches(pString)
For Each oMatch As Match In oMatches
Dim oPlaceholderString As String = oMatch.Groups.Item(0)?.Value
Dim oPlaceholderType As String = oMatch.Groups.Item(1)?.Value
Dim oPlaceholderValue As String = oMatch.Groups.Item(2)?.Value
Select Case oPlaceholderType.ToUpper
Case PLACEHOLDER_FIELD
Dim oFieldName = oPlaceholderValue Dim oFieldName = oPlaceholderValue
Dim oTargetField = pRow.Fields. Dim oTargetField = pRow.Fields.
Where(Function(field) field.Key = oFieldName). Where(Function(field) field.Key = oFieldName).
SingleOrDefault() SingleOrDefault()
oString = oString.Replace(oPlaceholderString, oTargetField.Value.Final) pString = pString.Replace(oPlaceholderString, oTargetField.Value.Final)
Case "CONST" Case PLACEHOLDER_CONST
Dim oValue = "" Dim oValue = ""
Select Case oPlaceholderValue.ToUpper Select Case oPlaceholderValue.ToUpper
Case "MESOYEAR"
oValue = GeneralConfig.GetWinLineYear()
Case "MESOCOMP"
oValue = pDocument.Mandator.Id
Case "USERNAME"
oValue = Environment.UserName
Case "CURRENTDATE"
oValue = Now.ToString()
Case "FILENAME" Case "FILENAME"
oValue = pDocument.FileName oValue = pDocument.FileName
Case "MANDATORDB"
oValue = pDocument.Mandator.Database
Case Else Case Else
oValue = "" oValue = ReplaceBasicValues(oPlaceholderValue, pDocument.Mandator)
End Select End Select
If oValue <> "" Then If oValue <> "" Then
oString = oString.Replace(oPlaceholderString, oValue) pString = pString.Replace(oPlaceholderString, oValue)
End If End If
End Select End Select
Next Next
Return oString Return pString
End Function End Function
Public Function ReplaceForExport(pDocument As ExportDocument, pMandator As Mandator, oString As String) Public Function ReplaceForExport(pDocument As ExportDocument, pMandator As Mandator, oString As String)
Dim oRegex = New Regex("{#(\w+)#([\w\s_-]+)}+") Dim oMatches As MatchCollection = Regex.Matches(oString)
Dim oMatches As MatchCollection = oRegex.Matches(oString)
For Each oMatch As Match In oMatches For Each oMatch As Match In oMatches
Dim oPlaceholderString As String = oMatch.Groups.Item(0)?.Value Dim oPlaceholderString As String = oMatch.Groups.Item(0)?.Value
@@ -78,22 +110,10 @@ Public Class Patterns
Dim oPlaceholderValue As String = oMatch.Groups.Item(2)?.Value Dim oPlaceholderValue As String = oMatch.Groups.Item(2)?.Value
Select Case oPlaceholderType.ToUpper Select Case oPlaceholderType.ToUpper
Case "CONST" Case PLACEHOLDER_CONST
Dim oValue = "" Dim oValue = ""
Select Case oPlaceholderValue.ToUpper Select Case oPlaceholderValue.ToUpper
Case "MESOYEAR"
oValue = GeneralConfig.GetWinLineYear()
Case "MESOCOMP"
oValue = pMandator.Id
Case "USERNAME"
oValue = Environment.UserName
Case "CURRENTDATE"
oValue = Now.ToString()
Case "FILENAME" Case "FILENAME"
oValue = pDocument.FilenameExport oValue = pDocument.FilenameExport
@@ -103,11 +123,9 @@ Public Class Patterns
Case "RUNNINGNUMBER" Case "RUNNINGNUMBER"
oValue = pDocument.RunningNumber oValue = pDocument.RunningNumber
Case "MANDATORDB"
oValue = pMandator.Database
Case Else Case Else
oValue = "" oValue = ReplaceBasicValues(oPlaceholderValue, pMandator)
End Select End Select
@@ -119,4 +137,31 @@ Public Class Patterns
Return oString Return oString
End Function End Function
''' <summary>
''' Replaces basic values in the CONST namespace that only depend on the current mandator
''' </summary>
''' <returns>Value that will be used to replaced the placeholder</returns>
Public Function ReplaceBasicValues(pPlaceholderValue As String, pMandator As Mandator) As String
Select Case pPlaceholderValue.ToUpper
Case "MESOYEAR"
Return GeneralConfig.GetWinLineYear()
Case "MESOCOMP"
Return pMandator.Id
Case "USERNAME"
Return Environment.UserName
Case "MANDATORDB"
Return pMandator.Database
Case "CURRENTDATE"
Return Now.ToString()
Case Else
Return String.Empty
End Select
End Function
End Class 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)
@@ -32,8 +33,8 @@ Public Class ReportGenerator(Of TReport As IReport)
Return oFilePath Return oFilePath
End Function End Function
Public Function GenerateReport(pDocument As Document, pTemplate As Template) As TReport Public Function GenerateReport(pDocument As Document, pTemplate As Template) As ReportResult(Of TReport)
Dim oFilePath = GetReportFilePath(pDocument, pTemplate)
Dim oMapperConfig As New Mapper(LogConfig) Dim oMapperConfig As New Mapper(LogConfig)
Dim oHeadMapper = oMapperConfig.GetMapper(Of ReportHead)(New Dictionary(Of String, String) From { Dim oHeadMapper = oMapperConfig.GetMapper(Of ReportHead)(New Dictionary(Of String, String) From {
{"Fakt_Kontoname", "Text1"}, {"Fakt_Kontoname", "Text1"},
@@ -45,7 +46,7 @@ Public Class ReportGenerator(Of TReport As IReport)
Dim oPositionMapper = oMapperConfig.GetMapper(Of ReportPosition)(New Dictionary(Of String, String) From { Dim oPositionMapper = oMapperConfig.GetMapper(Of ReportPosition)(New Dictionary(Of String, String) From {
{"Artikelnummer", "Text1"}, {"Artikelnummer", "Text1"},
{"Lieferantenartikelnummer", "Text2"}, {"Positionstext", "Text2"},
{"Bezeichnung", "Text3"}, {"Bezeichnung", "Text3"},
{"Menge_bestellt", "Text4"}, {"Menge_bestellt", "Text4"},
{"Menge_geliefert", "Text5"}, {"Menge_geliefert", "Text5"},
@@ -56,11 +57,7 @@ Public Class ReportGenerator(Of TReport As IReport)
{"Lagerstand", "Text10"} {"Lagerstand", "Text10"}
}) })
Dim oSQLConfig = TemplateConfig.Items. pDocument = FillFieldValuesFromSQL(pDocument, TemplateConfig.SqlItems, oFilePath)
Where(Function(item) item.Function.Name = Constants.FUNCTION_SQL).
ToList()
FillFieldValuesFromSQL(pDocument, oSQLConfig)
Dim oHeadRow = pDocument.Rows. Dim oHeadRow = pDocument.Rows.
Where(Function(r) r.TableName.EndsWith("T025")). Where(Function(r) r.TableName.EndsWith("T025")).
@@ -99,11 +96,16 @@ Public Class ReportGenerator(Of TReport As IReport)
oDataSource.Fill() oDataSource.Fill()
oReport.DataSource = oDataSource oReport.DataSource = oDataSource
Return oReport Dim oResult = New ReportResult(Of TReport) With {
.Report = oReport,
.FileName = oFilePath
}
Return oResult
End Function End Function
Private Sub FillFieldValuesFromSQL(pDocument As Document, oSQLConfig As List(Of TemplateConfigItem)) Private Function FillFieldValuesFromSQL(pDocument As Document, pSQLConfig As List(Of FieldConfig), pReportFileName As String) As Document
For Each oSQLConfigItem In oSQLConfig For Each oSQLConfigItem In pSQLConfig
' 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.
@@ -111,19 +113,29 @@ Public Class ReportGenerator(Of TReport As IReport)
ToList() ToList()
For Each oRow As DocumentRow In oRowList For Each oRow As DocumentRow In oRowList
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()
Dim oSQL = oSQLConfigItem.Function.Params oSQL = Patterns.ReplaceForImportFinalSQL(pDocument, pReportFileName, oSQL)
oSQL = Patterns.ReplaceForImport(pDocument, oRow, oSQL)
Dim oValue = Database.GetScalarValue(oSQL) Dim oValue = Database.GetScalarValue(oSQL)
If oValue IsNot Nothing Then If oValue IsNot Nothing Then
oField.Value.Final = oValue oField.Value.SetExternalValue(oValue)
End If End If
Next Next
Next Next
End Sub Next
Return pDocument
End Function
Public Structure ReportResult(Of T)
Public Report As T
Public FileName As String
End Structure
End Class End Class

View File

@@ -2,7 +2,8 @@
Imports DigitalData.Modules.Language Imports DigitalData.Modules.Language
Namespace Templates Namespace Templates
Public Class TemplateConfigItem 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
@@ -14,20 +15,9 @@ Namespace Templates
Public Property IsVisible As Boolean Public Property IsVisible As Boolean
Public Property IsRequired As Boolean Public Property IsRequired As Boolean
Public Property IsVirtual As Boolean Public Property IsVirtual 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>
@@ -123,7 +127,7 @@ Namespace Templates
''' Required value from Schema. This value will be written in the ColumnConfig and is not relevant from that point on. ''' Required value from Schema. This value will be written in the ColumnConfig and is not relevant from that point on.
''' </summary> ''' </summary>
Public Property IsRequired As Boolean Public Property IsRequired As Boolean
Public Property Config As TemplateConfigItem Public Property Config As FieldConfig
Public Overrides Function ToString() As String Public Overrides Function ToString() As String
Return Name Return Name

View File

@@ -6,9 +6,17 @@ Namespace Templates
''' Class for loading column/field config from database ''' Class for loading column/field config from database
''' </summary> ''' </summary>
Public Class TemplateConfig Public Class TemplateConfig
Public Property Items As List(Of TemplateConfigItem) Public Property Items As List(Of FieldConfig)
Public Function GetColumn(pName As String, pTable As String) As TemplateConfigItem Public ReadOnly Property SqlItems As List(Of FieldConfig)
Get
Return Items.
Where(Function(item) item.Functions.Any(Function(f) f.Name = Constants.FUNCTION_SQL)).
ToList()
End Get
End Property
Public Function GetColumn(pName As String, pTable As String) As FieldConfig
Return Items. Return Items.
Where(Function(c) c.Name = pName And c.Table = pTable). Where(Function(c) c.Name = pName And c.Table = pTable).
FirstOrDefault() FirstOrDefault()

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
@@ -154,27 +188,27 @@ Namespace Templates
Public Async Function LoadTemplateConfiguration() As Task(Of Boolean) Public Async Function LoadTemplateConfiguration() As Task(Of Boolean)
Try Try
Dim oTable As DataTable = Await Database.GetDatatableAsync(SQL_VWMT_ITEMS) Dim oTable As DataTable = Await Database.GetDatatableAsync(SQL_VWMT_ITEMS)
Dim oItems As New List(Of TemplateConfigItem) Dim oItems As New List(Of FieldConfig)
For Each oRow As DataRow In oTable.Rows For Each oRow As DataRow In oTable.Rows
Dim oColumn As New TemplateConfigItem() 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 = TemplateConfigItem.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),
.IsVisible = oRow.ItemEx("IS_VISIBLE", True), .IsVisible = oRow.ItemEx("IS_VISIBLE", True),
.IsRequired = oRow.ItemEx("IS_REQUIRED", False), .IsRequired = oRow.ItemEx("IS_REQUIRED", False),
.IsVirtual = oRow.ItemEx("IS_VIRTUAL", False), .IsVirtual = oRow.ItemEx("IS_VIRTUAL", False),
.IsHead = oRow.ItemEx("IS_HEAD", True), .IsHead = oRow.ItemEx("IS_HEAD", True),
.[Function] = New TemplateConfigItem.ColumnFunction With { .PreferExternalValue = oRow.ItemEx("PREFER_EXTERNAL", True),
.Id = oRow.ItemEx("FUNCTION_ID", 0), .Functions = New List(Of FieldConfig.ColumnFunction)
.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
@@ -191,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)
@@ -235,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
@@ -242,10 +308,10 @@ Namespace Templates
For Each oTable In oTemplate.Tables For Each oTable In oTemplate.Tables
For Each oColumn As Template.Column In oTable.Columns For Each oColumn As Template.Column In oTable.Columns
Dim oConfig As TemplateConfigItem = pTemplateConfig.GetColumn(oColumn.Name, oTable.Name) Dim oConfig As FieldConfig = pTemplateConfig.GetColumn(oColumn.Name, oTable.Name)
If oConfig Is Nothing Then If oConfig Is Nothing Then
oConfig = New TemplateConfigItem With { oConfig = New FieldConfig With {
.IsRequired = oColumn.IsRequired, .IsRequired = oColumn.IsRequired,
.Name = oColumn.Name .Name = oColumn.Name
} }
@@ -268,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,18 +253,24 @@ 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")
' --- Build all teh filenamez and pathz ' --- Build all teh filenamez and pathz
Dim oBaseFileName As String = FileEx.GetDateTimeString() Dim oBaseFileName As String = FileEx.GetDateTimeString()
Dim oFileName = $"{pTemplate.Name}-{oBaseFileName}.xml" Dim oFileName = $"{pTemplate.Name}-{oBaseFileName}.xml"
'Dim oFileName = FileEx.GetFilenameWithPrefix(oBaseFileName, pTemplate.Name, "xml") 'Dim oFileName = FileEx.GetFilenameWithPrefix(oBaseFileName, pTemplate.Name, "xml")
Logger.Info("Filename will be [{0}]", oFileName)
' Save the filename to the document ' Save the filename to the document
pDocument.FilenameExport = oFileName pDocument.FilenameExport = oFileName
RaiseEvent WebServiceProgress(Me, "Dateien schreiben") RaiseEvent WebServiceProgress(Me, "Abfrage vorbereiten")
Logger.Debug("Preparing WebService call")
' --- Prepare URL and HTTP Client ' --- Prepare URL and HTTP Client
Dim oTemplateType = 30 Dim oTemplateType = 30
@@ -242,6 +285,8 @@ Namespace Winline
oActionCode = 0 oActionCode = 0
End If End If
Logger.Debug("This is a test: [{0}]", pIsTest)
Dim oURL As String = $"{oWS.BaseUrl}/ewlservice/export?User={oWS.Username}&Password={oWS.Password}&Company={pMandator.Id}&Type={oTemplateType}&Vorlage={oTemplateName}&ActionCode={oActionCode}&Key={oKey}" Dim oURL As String = $"{oWS.BaseUrl}/ewlservice/export?User={oWS.Username}&Password={oWS.Password}&Company={pMandator.Id}&Type={oTemplateType}&Vorlage={oTemplateName}&ActionCode={oActionCode}&Key={oKey}"
Dim oClient As New HttpClient() Dim oClient As New HttpClient()
@@ -252,6 +297,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.Info("Request ended with code: [{0}]", oResponse.StatusCode)
Await HandleExportResponse(oResponse, pDocument, pTemplate, pMandator, oBaseFileName) Await HandleExportResponse(oResponse, pDocument, pTemplate, pMandator, oBaseFileName)
Return True Return True
@@ -268,22 +315,34 @@ Namespace Winline
Private Async Function HandleExportResponse(pResponse As HttpResponseMessage, pDocument As Entities.ExportDocument, pTemplate As Template, pMandator As Mandator, pBaseFileName As String) As Task Private Async Function HandleExportResponse(pResponse As HttpResponseMessage, pDocument As Entities.ExportDocument, pTemplate As Template, pMandator As Mandator, pBaseFileName As String) As Task
pResponse.EnsureSuccessStatusCode() pResponse.EnsureSuccessStatusCode()
Dim oResponseBody As String = Await pResponse.Content.ReadAsStringAsync() Dim oResponseBody As String = Await pResponse.Content.ReadAsStringAsync()
Dim oContentType = pResponse.Content.Headers.ContentType.MediaType Dim oContentType = pResponse.Content.Headers.ContentType.MediaType
Dim oSerializer = Serializer.GetSerializer(GetType(Templates.Entities.MESOWebServiceResult)) Dim oSerializer = Serializer.GetSerializer(GetType(Templates.Entities.MESOWebServiceResult))
RaiseEvent WebServiceProgress(Me, "Antwort verarbeiten") RaiseEvent WebServiceProgress(Me, "Antwort verarbeiten")
oResponseBody = ApplyItemFunctionsForExport(pDocument, pTemplate, pMandator, oResponseBody) Logger.Debug("Processing response with type '{0}'", oContentType)
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")
@@ -295,49 +354,72 @@ 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
For Each oItem As Template.Column In oTable.Columns Logger.Debug("Processing Table [{0}]", oTable.Name)
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 Logger.Debug("Processing item [{0}]", oItemName)
Continue For
End If
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 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 Exceptions.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
Throw New Exceptions.MissingAttributeException("EAN") ' 21.04.2022: Relax the EAN Check
' Since it is possible to have articles without a proper EAN in export,
' we dont throw here, but leave the original value in case of a failure.
' Throw New Exceptions.MissingAttributeException("EAN")
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 Exceptions.MissingAttributeException("SQL") Throw New MissingAttributeException(Constants.FUNCTION_SQL)
End If End If
oNode.InnerText = oValue oNode.InnerText = oValue
@@ -345,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
@@ -397,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,10 +1,13 @@
Imports DigitalData.Modules.Logging Imports System.Text.RegularExpressions
Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Database Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Base
Imports MultiTool.Common.Winline.Entities Imports MultiTool.Common.Winline.Entities
Imports System.Text.RegularExpressions
Imports MultiTool.Common.Templates
Imports MultiTool.Common.Constants Imports MultiTool.Common.Constants
Imports DigitalData.Modules.Language Imports MultiTool.Common.Templates
Imports MultiTool.Common.Exceptions
Imports MultiTool.Common.Documents
Imports System.Data.SqlClient
Namespace Winline Namespace Winline
Public Class WinlineData Public Class WinlineData
@@ -14,6 +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 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)
@@ -29,6 +33,8 @@ Namespace Winline
Config = pConfig Config = pConfig
MandatorConfig = pMandatorConfig MandatorConfig = pMandatorConfig
MappingConfig = pMappingConfig MappingConfig = pMappingConfig
FileEx = New FilesystemEx(pLogConfig)
Years = LoadEconomicYears()
End Sub End Sub
''' <summary> ''' <summary>
@@ -65,8 +71,14 @@ Namespace Winline
Public Property Year As Integer Public Property Year As Integer
End Class End Class
Private Function LoadEconomicYears() As IEnumerable(Of Integer)
Dim oCurrentYear = Now.Year
Dim oRange As IEnumerable(Of Integer) = Enumerable.Range(oCurrentYear - 10, 12).ToList()
Return oRange
End Function
Public Async Function LoadArticles(pMandator As Mandator) As Task
Public Async Function LoadArticlesAsync(pMandator As Mandator) As Task
Logger.Info("Loading Articles for Mandator [{0}]", pMandator) Logger.Info("Loading Articles for Mandator [{0}]", pMandator)
Dim oYear = Config.GetWinLineYear() Dim oYear = Config.GetWinLineYear()
@@ -78,8 +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}' c038 IS NULL -- Nur Aktive Artikel
AND mesoyear = {oYear}" 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)
@@ -105,7 +117,7 @@ Namespace Winline
End Try End Try
End Function End Function
Public Async Function LoadPackingUnits(pMandator As Mandator) As Task Public Async Function LoadPackingUnitsAsync(pMandator As Mandator) As Task
Logger.Info("Loading Packing Units for Mandator [{0}]", pMandator) Logger.Info("Loading Packing Units for Mandator [{0}]", pMandator)
Dim oYear = Config.GetWinLineYear() Dim oYear = Config.GetWinLineYear()
@@ -156,7 +168,7 @@ Namespace Winline
End Try End Try
End Function End Function
Public Async Function LoadAccounts(pMandator As Mandator) As Task Public Async Function LoadAccountsAsync(pMandator As Mandator) As Task
Logger.Info("Loading Accounts for Mandator [{0}]", pMandator) Logger.Info("Loading Accounts for Mandator [{0}]", pMandator)
Dim oYear = Config.GetWinLineYear() Dim oYear = Config.GetWinLineYear()
@@ -171,7 +183,8 @@ Namespace Winline
[c260] -- GLN [c260] -- GLN
FROM [{pMandator.Server}].[{pMandator.Database}].[dbo].[v050] FROM [{pMandator.Server}].[{pMandator.Database}].[dbo].[v050]
WHERE WHERE
c139 IS NULL c139 IS NULL -- Kontentyp
AND c105 IS NULL -- Inaktiv
AND mesocomp = '{pMandator.Id}' AND mesocomp = '{pMandator.Id}'
AND mesoyear = {oYear}" AND mesoyear = {oYear}"
Dim oTable = Await Database.GetDatatableAsync(oSQL) Dim oTable = Await Database.GetDatatableAsync(oSQL)
@@ -208,7 +221,7 @@ Namespace Winline
End Try End Try
End Function End Function
Public Async Function LoadMandators() As Task Public Async Function LoadMandatorsAsync() As Task
Try Try
Dim oSQL = "SELECT [c000], [c003], [c004] FROM [cwlsystem].[dbo].[T001SRV] (NOLOCK)" Dim oSQL = "SELECT [c000], [c003], [c004] FROM [cwlsystem].[dbo].[T001SRV] (NOLOCK)"
Dim oTable = Await Database.GetDatatableAsync(oSQL) Dim oTable = Await Database.GetDatatableAsync(oSQL)
@@ -242,13 +255,9 @@ Namespace Winline
End Try End Try
End Function End Function
Public Sub LoadEconomicYears()
Dim oCurrentYear = Now.Year
Dim oRange As IEnumerable(Of Integer) = Enumerable.Range(oCurrentYear - 10, 12).ToList()
Years = oRange
End Sub
Public Async Function LoadDocumentKinds(pMandator As Mandator) As Task
Public Async Function LoadDocumentKindsAsync(pMandator As Mandator) As Task
Dim oYear As Integer = Config.GetWinLineYear() Dim oYear As Integer = Config.GetWinLineYear()
Try Try
@@ -263,6 +272,7 @@ Namespace Winline
[c001] LIKE 'Werk%(VK)' OR [c001] LIKE 'Werk%(VK)' OR
[c001] LIKE 'Werk%(WK)' [c001] LIKE 'Werk%(WK)'
) )
AND c129 IS NULL -- Inaktiv
AND [mesocomp] = '{pMandator.Id}' AND [mesoyear] = {oYear}" AND [mesocomp] = '{pMandator.Id}' AND [mesoyear] = {oYear}"
Dim oTable As DataTable = Await Database.GetDatatableAsync(oSQL) Dim oTable As DataTable = Await Database.GetDatatableAsync(oSQL)
Dim oKinds As New List(Of DocumentKind) Dim oKinds As New List(Of DocumentKind)
@@ -389,11 +399,11 @@ Namespace Winline
End Try End Try
End Function End Function
Public Async Function TryGetArticlePrice(pArticle As String, pAccountNumber As String, pQuantity As String, pDocumentDate As Date, pMandator As Mandator, pTemplate As Template) As Task(Of Double) Public Async Function TryGetArticlePriceAsync(pArticle As String, pAccountNumber As String, pQuantity As String, pDocumentDate As Date, pMandator As Mandator, pTemplate As Template) As Task(Of Double)
Return Await TryGetArticlePrice(pArticle, pAccountNumber, pQuantity, pDocumentDate, pMandator, pTemplate, 0) Return Await TryGetArticlePriceAsync(pArticle, pAccountNumber, pQuantity, pDocumentDate, pMandator, pTemplate, 0)
End Function End Function
Public Async Function TryGetArticlePrice(pArticle As String, pAccountNumber As String, pQuantity As String, pDocumentDate As Date, pMandator As Mandator, pTemplate As Template, pWaitingDays As Integer) As Task(Of Double) Public Async Function TryGetArticlePriceAsync(pArticle As String, pAccountNumber As String, pQuantity As String, pDocumentDate As Date, pMandator As Mandator, pTemplate As Template, pWaitingDays As Integer) As Task(Of Double)
Try Try
Dim oUserName = Environment.UserName Dim oUserName = Environment.UserName
Dim oYear As Integer = Config.GetWinLineYear() Dim oYear As Integer = Config.GetWinLineYear()
@@ -406,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 = '*',
@@ -421,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)
@@ -476,7 +494,7 @@ Namespace Winline
''' <summary> ''' <summary>
''' This function is completely SCHAUM related. ''' This function is completely SCHAUM related.
''' </summary> ''' </summary>
Public Async Function TryGetWaitingDays(pDocumentKind As Integer, pMandator As Mandator) As Task(Of Integer) Public Async Function TryGetWaitingDaysAsync(pDocumentKind As Integer, pMandator As Mandator) As Task(Of Integer)
Try Try
Dim oSql = $" Dim oSql = $"
SELECT [Karenztage].[u012] FROM [{pMandator.Database}].[dbo].[t670] As [Werksdefinition] SELECT [Karenztage].[u012] FROM [{pMandator.Database}].[dbo].[t670] As [Werksdefinition]
@@ -503,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
@@ -511,11 +535,13 @@ Namespace Winline
[c075], -- EAN-Nummer [c075], -- EAN-Nummer
[c123] -- Ersatzartikelnummer [c123] -- Ersatzartikelnummer
FROM [{pMandator.Database}].[dbo].[v021] FROM [{pMandator.Database}].[dbo].[v021]
WHERE [c075] = '{pEAN}' WHERE
[c075] = '{pEAN}'
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
@@ -531,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
@@ -549,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
@@ -614,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)
@@ -678,6 +707,7 @@ Namespace Winline
[c123] -- Ersatzartikelnummer [c123] -- Ersatzartikelnummer
FROM [{oMandator.Database}].[dbo].[v021] FROM [{oMandator.Database}].[dbo].[v021]
WHERE [c075] = '{oEANNumber}' WHERE [c075] = '{oEANNumber}'
AND [c038] IS NULL
AND [mesocomp] = '{oMandator.Id}' AND [mesoyear] = {oYear}" AND [mesocomp] = '{oMandator.Id}' AND [mesoyear] = {oYear}"
Dim oTable As DataTable = Database.GetDatatable(oSQL) Dim oTable As DataTable = Database.GetDatatable(oSQL)
@@ -872,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)
@@ -892,7 +922,70 @@ Namespace Winline
End Try End Try
End Function End Function
Public Async Function ExecuteFinalSQL(pDocument As ExportDocument, pTemplate As Template, pMandator As Mandator) As Task(Of Boolean) Private ReadOnly RunningNumberVersionRegex As Regex = New Regex("~\d{1,3}$")
Private ReadOnly RunningNumberMaximumLength As Integer = 20
Public Async Function GetVersionedRunningNumberAsync(pDocument As Document, pMandator As Mandator, pAccountNumber As String, pRunningNumber As String) As Task(Of String)
Try
Dim oYear As Integer = Config.GetWinLineYear()
Dim oSql As String = $"
SELECT COUNT(*) FROM [{pMandator.Database}].[dbo].[v250]
WHERE
[c021] = '{pAccountNumber}' AND -- Account '
[c022] = '{pRunningNumber}' AND -- Running Number '
--[c035] = '4711' -- Belegart, needed?
[c144] IS NULL AND -- Stornonummer Angebot
[c145] IS NULL AND -- Stornonummer Auftrag
[c146] IS NULL AND -- Stornonummer Lieferschein
[c147] IS NULL AND -- Stornonummer Faktura
[mesocomp] = '{pMandator.Id}' --AND [mesoyear] = {oYear}
"
Dim oExistingCount = Await Database.GetScalarValueAsync(oSql)
If oExistingCount = 0 Then
Logger.Debug("Running number [{0}] does not exist yet. Returning.", pRunningNumber)
Return pRunningNumber
Else
Logger.Debug("Running number [{0}] already exists. Checking again.", pRunningNumber)
Dim oVersionResult = FileEx.GetVersionedString(pRunningNumber)
Dim oNewVersion = oVersionResult.Item2 + 1
Dim oFinalLength As Integer = oVersionResult.Item1.Count + oNewVersion.ToString.Count + 1
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)
pDocument.AddDocumentError(DocumentErrorType.AttributeValidationFailed, "Das Feld Laufnummer hat die zulässige Länge überschritten.")
Return pRunningNumber
End If
Return Await GetVersionedRunningNumberAsync(pDocument, pMandator, pAccountNumber, $"{oVersionResult.Item1}~{oNewVersion}")
End If
Catch ex As MultiToolException
Logger.Error(ex)
Throw ex
Catch ex As Exception
Logger.Warn("Error while getting versioned running number for mandator [{0}] and running number [{1}]", pMandator, pRunningNumber)
Logger.Error(ex)
Return Nothing
End Try
End Function
Public Function VersionNumber(pNumber As String) As String
Dim oRunningNumberBase As String
If RunningNumberVersionRegex.IsMatch(pNumber) Then
Dim oSplitNumber = pNumber.Split("~")
oRunningNumberBase = oSplitNumber.First()
Dim oRunningNumberVersion As Integer = Integer.Parse(oSplitNumber.Last())
Return $"{oRunningNumberBase}~{oRunningNumberVersion + 1}"
Else
Return $"{pNumber}~2"
End If
End Function
Public Async Function ExecuteFinalSQLForExport(pDocument As ExportDocument, pTemplate As Template, pMandator As Mandator) As Task(Of Boolean)
Try Try
Dim oSql As String = Patterns.ReplaceForExport(pDocument, pMandator, pTemplate.FinalSQL) Dim oSql As String = Patterns.ReplaceForExport(pDocument, pMandator, pTemplate.FinalSQL)
Return Await Database.ExecuteNonQueryAsync(oSql) Return Await Database.ExecuteNonQueryAsync(oSql)
@@ -903,17 +996,30 @@ Namespace Winline
End Try End Try
End Function End Function
Private Function GetDocumentFromDataRow(pDataRow As DataRow) As ExportDocument Public Async Function ExecuteFinalSQLForImport(pDocument As Document, pTemplate As Template, pReportFilename As String) As Task(Of Boolean)
Try
Dim oSql As String = Patterns.ReplaceForImportFinalSQL(pDocument, pReportFilename, pTemplate.FinalSQL)
Return Await Database.ExecuteNonQueryAsync(oSql)
Catch ex As Exception
Logger.Error(ex)
Return False
End Try
End Function
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
@@ -928,19 +1034,22 @@ Namespace Winline
FirstOrDefault() FirstOrDefault()
Select Case oDocumentType Select Case oDocumentType
Case 1 Case 1, -1
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
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
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
Case 4, -4
oDocumentNumber = pDataRow.Item("INVOICE_NUMBER") oDocumentNumber = pDataRow.Item("INVOICE_NUMBER")
oDocumentDate = pDataRow.Item("INVOICE_DATE") oDocumentDate = pDataRow.Item("INVOICE_DATE")
oDocumentDateColumn = "c032" oDocumentDateColumn = "c032"
@@ -956,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,4 +1,4 @@
<?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">
@@ -49,6 +49,14 @@
<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>

View File

@@ -0,0 +1,15 @@
Imports Microsoft.VisualBasic.ApplicationServices
Namespace My
' Für MyApplication sind folgende Ereignisse verfügbar:
' Startup: Wird beim Starten der Anwendung noch vor dem Erstellen des Startformulars ausgelöst.
' Shutdown: Wird nach dem Schließen aller Anwendungsformulare ausgelöst. Dieses Ereignis wird nicht ausgelöst, wenn die Anwendung mit einem Fehler beendet wird.
' UnhandledException: Wird bei einem Ausnahmefehler ausgelöst.
' StartupNextInstance: Wird beim Starten einer Einzelinstanzanwendung ausgelöst, wenn die Anwendung bereits aktiv ist.
' NetworkAvailabilityChanged: Wird beim Herstellen oder Trennen der Netzwerkverbindung ausgelöst.
Partial Friend Class MyApplication
Protected Overrides Function OnUnhandledException(e As UnhandledExceptionEventArgs) As Boolean
Return MyBase.OnUnhandledException(e)
End Function
End Class
End Namespace

File diff suppressed because it is too large Load Diff

View File

@@ -9,68 +9,76 @@
<Tables> <Tables>
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="TBMT_TEMPLATE_ITEMSTableAdapter" GeneratorDataComponentClassName="TBMT_TEMPLATE_ITEMSTableAdapter" Name="TBMT_TEMPLATE_ITEMS" UserDataComponentName="TBMT_TEMPLATE_ITEMSTableAdapter"> <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="TBMT_TEMPLATE_ITEMSTableAdapter" GeneratorDataComponentClassName="TBMT_TEMPLATE_ITEMSTableAdapter" Name="TBMT_TEMPLATE_ITEMS" UserDataComponentName="TBMT_TEMPLATE_ITEMSTableAdapter">
<MainSource> <MainSource>
<DbSource ConnectionRef="DD_ECMConnectionString (MySettings)" DbObjectName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" 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"> <DbSource ConnectionRef="DD_ECMConnectionString (MySettings)" DbObjectType="Unknown" 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> <DeleteCommand>
<DbCommand CommandType="Text" ModifiedByUser="true"> <DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>DELETE FROM TBMT_TEMPLATE_ITEMS <CommandText>DELETE FROM TBMT_TEMPLATE_ITEMS
WHERE (GUID = @Original_GUID)</CommandText> WHERE (GUID = @Original_GUID)</CommandText>
<Parameters> <Parameters>
<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="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" />
</Parameters> </Parameters>
</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="true"> <DbCommand CommandType="Text" ModifiedByUser="false">
<CommandText>SELECT TBMT_TEMPLATE_ITEMS.* <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,
FROM TBMT_TEMPLATE_ITEMS</CommandText> TBMT_TEMPLATE_ITEMS.IS_VISIBLE, TBMT_TEMPLATE_ITEMS.IS_REQUIRED, TBMT_TEMPLATE_ITEMS.IS_VIRTUAL, TBMT_TEMPLATE_ITEMS.ACTIVE, TBMT_TEMPLATE_ITEMS.COMMENT,
<Parameters /> 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,
TBTABLES.NAME AS TABLE_NAME, TBMT_TEMPLATE_ITEMS.PREFER_EXTERNAL
FROM TBMT_TEMPLATE_ITEMS 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
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="true"> <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="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="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="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="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="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="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="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="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="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_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="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_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="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_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="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="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="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" 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="true" AutogeneratedName="FUNCTION_PARAMETERS" ColumnName="FUNCTION_PARAMETERS" DataSourceName="DD_ECM.dbo.TBMT_TEMPLATE_ITEMS" 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="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="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="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="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="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="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="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_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="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="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="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="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="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" /> <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>
@@ -80,20 +88,26 @@ 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" />
<Mapping SourceColumn="CHANGED_WHEN" DataSetColumn="CHANGED_WHEN" /> <Mapping SourceColumn="CHANGED_WHEN" DataSetColumn="CHANGED_WHEN" />
<Mapping SourceColumn="ACTIVE" DataSetColumn="ACTIVE" />
<Mapping SourceColumn="COMMENT" DataSetColumn="COMMENT" />
<Mapping SourceColumn="TEMPLATE_NAME" DataSetColumn="TEMPLATE_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>
@@ -385,175 +399,284 @@ 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_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_UserTableName="TBMT_TEMPLATE_ITEMS" msprop:Generator_RowChangedName="TBMT_TEMPLATE_ITEMSRowChanged" msprop:Generator_RowEvArgName="TBMT_TEMPLATE_ITEMSRowChangeEvent" msprop:Generator_RowClassName="TBMT_TEMPLATE_ITEMSRow"> <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:sequence> <xs:element name="ACTIVE" msprop:Generator_ColumnPropNameInRow="ACTIVE" msprop:Generator_ColumnPropNameInTable="ACTIVEColumn" msprop:Generator_ColumnVarNameInTable="columnACTIVE" msprop:Generator_UserColumnName="ACTIVE" type="xs:boolean" />
</xs:complexType> <xs:element name="COMMENT" msprop:Generator_ColumnPropNameInRow="COMMENT" msprop:Generator_ColumnPropNameInTable="COMMENTColumn" msprop:Generator_ColumnVarNameInTable="columnCOMMENT" msprop:Generator_UserColumnName="COMMENT" minOccurs="0">
</xs:element>
<xs:element name="TBEDI_XML_TYPES" msprop:Generator_TableClassName="TBEDI_XML_TYPESDataTable" msprop:Generator_TableVarName="tableTBEDI_XML_TYPES" 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_UserTableName="TBEDI_XML_TYPES" msprop:Generator_RowChangedName="TBEDI_XML_TYPESRowChanged" msprop:Generator_RowEvArgName="TBEDI_XML_TYPESRowChangeEvent" msprop:Generator_RowClassName="TBEDI_XML_TYPESRow">
<xs:complexType>
<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="NAME" msprop:Generator_ColumnVarNameInTable="columnNAME" msprop:Generator_ColumnPropNameInRow="NAME" msprop:Generator_ColumnPropNameInTable="NAMEColumn" msprop:Generator_UserColumnName="NAME">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="20" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="TBMT_TEMPLATES" msprop:Generator_TableClassName="TBMT_TEMPLATESDataTable" msprop:Generator_TableVarName="tableTBMT_TEMPLATES" 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_UserTableName="TBMT_TEMPLATES" msprop:Generator_RowChangedName="TBMT_TEMPLATESRowChanged" msprop:Generator_RowEvArgName="TBMT_TEMPLATESRowChangeEvent" msprop:Generator_RowClassName="TBMT_TEMPLATESRow">
<xs:complexType>
<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="NAME" msprop:Generator_ColumnVarNameInTable="columnNAME" msprop:Generator_ColumnPropNameInRow="NAME" msprop:Generator_ColumnPropNameInTable="NAMEColumn" msprop:Generator_UserColumnName="NAME">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="20" />
</xs:restriction>
</xs:simpleType>
</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:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2147483647" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="TBEDI_XML_NODES" msprop:Generator_TableClassName="TBEDI_XML_NODESDataTable" msprop:Generator_TableVarName="tableTBEDI_XML_NODES" 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_UserTableName="TBEDI_XML_NODES" msprop:Generator_RowChangedName="TBEDI_XML_NODESRowChanged" msprop:Generator_RowEvArgName="TBEDI_XML_NODESRowChangeEvent" msprop:Generator_RowClassName="TBEDI_XML_NODESRow">
<xs:complexType>
<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="NAME" msprop:Generator_ColumnVarNameInTable="columnNAME" msprop:Generator_ColumnPropNameInRow="NAME" msprop:Generator_ColumnPropNameInTable="NAMEColumn" 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_ColumnVarNameInTable="columnTEMPLATE_ID" msprop:Generator_ColumnPropNameInRow="TEMPLATE_ID" msprop:Generator_ColumnPropNameInTable="TEMPLATE_IDColumn" 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:sequence>
</xs:complexType>
</xs:element>
<xs:element name="TBMT_FUNCTIONS" msprop:Generator_TableClassName="TBMT_FUNCTIONSDataTable" msprop:Generator_TableVarName="tableTBMT_FUNCTIONS" 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_UserTableName="TBMT_FUNCTIONS" msprop:Generator_RowChangedName="TBMT_FUNCTIONSRowChanged" msprop:Generator_RowEvArgName="TBMT_FUNCTIONSRowChangeEvent" msprop:Generator_RowClassName="TBMT_FUNCTIONSRow">
<xs:complexType>
<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="NAME" msprop:Generator_ColumnVarNameInTable="columnNAME" msprop:Generator_ColumnPropNameInRow="NAME" msprop:Generator_ColumnPropNameInTable="NAMEColumn" msprop:Generator_UserColumnName="NAME">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2147483647" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="DESCRIPTION" msprop:Generator_ColumnVarNameInTable="columnDESCRIPTION" msprop:Generator_ColumnPropNameInRow="DESCRIPTION" msprop:Generator_ColumnPropNameInTable="DESCRIPTIONColumn" msprop:Generator_UserColumnName="DESCRIPTION">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2147483647" />
</xs:restriction>
</xs:simpleType>
</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:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2147483647" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="TBMT_CONFIG" msprop:Generator_TableClassName="TBMT_CONFIGDataTable" msprop:Generator_TableVarName="tableTBMT_CONFIG" 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_UserTableName="TBMT_CONFIG" msprop:Generator_RowChangedName="TBMT_CONFIGRowChanged" msprop:Generator_RowEvArgName="TBMT_CONFIGRowChangeEvent" msprop:Generator_RowClassName="TBMT_CONFIGRow">
<xs:complexType>
<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="KEY" msprop:Generator_ColumnVarNameInTable="columnKEY" msprop:Generator_ColumnPropNameInRow="KEY" msprop:Generator_ColumnPropNameInTable="KEYColumn" 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="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:restriction base="xs:string">
<xs:maxLength value="20" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<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:restriction base="xs:string">
<xs:maxLength value="2147483647" />
</xs:restriction>
</xs:simpleType>
</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:complexType>
</xs:element>
<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: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="20" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<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: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="20" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<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:restriction base="xs:string">
<xs:maxLength value="2147483647" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<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: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:sequence>
</xs:complexType>
</xs:element>
<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: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="DESCRIPTION" msprop:Generator_ColumnPropNameInRow="DESCRIPTION" msprop:Generator_ColumnPropNameInTable="DESCRIPTIONColumn" msprop:Generator_ColumnVarNameInTable="columnDESCRIPTION" msprop:Generator_UserColumnName="DESCRIPTION">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="2147483647" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<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:restriction base="xs:string">
<xs:maxLength value="2147483647" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<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: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="KEY" msprop:Generator_ColumnPropNameInRow="KEY" msprop:Generator_ColumnPropNameInTable="KEYColumn" msprop:Generator_ColumnVarNameInTable="columnKEY" msprop:Generator_UserColumnName="KEY">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="100" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<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" />
@@ -563,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">
@@ -589,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_ParentPropName="TBMT_TEMPLATE_ITEMSRow" msprop:Generator_RelationVarName="relationTBMT_TEMPLATE_ITEMS_TBMT_FUNCTIONS" msprop:Generator_UserParentTable="TBMT_TEMPLATE_ITEMS" /> <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_ParentPropName="TBMT_TEMPLATE_ITEMSRow" msprop:Generator_RelationVarName="relationTBMT_TEMPLATE_ITEMS_TBEDI_XML_TYPES" msprop:Generator_UserParentTable="TBMT_TEMPLATE_ITEMS" /> <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_RelationVarName="relationTBEDI_XML_NODES_TBMT_TEMPLATES" msprop:Generator_UserParentTable="TBEDI_XML_NODES" msprop:Generator_ParentPropName="TBEDI_XML_NODESRow" />
</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

@@ -48,6 +48,12 @@ Public Class GridLoader
.VisibleIndex = oVisibleIndex .VisibleIndex = oVisibleIndex
} }
' TODO: Correclty format all values, but especially currency and numbers
'If oCol.DataType = ColumnType.Decimal Then
' oColumn.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric
' oColumn.DisplayFormat.FormatString = "c2"
'End If
oView.Columns.Add(oColumn) oView.Columns.Add(oColumn)
Next Next

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" />
@@ -158,6 +152,7 @@
<Import Include="System.Threading.Tasks" /> <Import Include="System.Threading.Tasks" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="ApplicationEvents.vb" />
<Compile Include="DS_DD_ECM.Designer.vb"> <Compile Include="DS_DD_ECM.Designer.vb">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
@@ -246,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>
@@ -305,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>
@@ -338,6 +343,7 @@
<ItemGroup> <ItemGroup>
<Content Include="CREATE_DATABASE.sql" /> <Content Include="CREATE_DATABASE.sql" />
<Content Include="MultiTool.ico" /> <Content Include="MultiTool.ico" />
<None Include="Resources\highimportance1.svg" />
<None Include="Resources\highimportance.svg" /> <None Include="Resources\highimportance.svg" />
<None Include="Resources\refreshpivottable.svg" /> <None Include="Resources\refreshpivottable.svg" />
<None Include="Resources\update.svg" /> <None Include="Resources\update.svg" />

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.2.9.1")> <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.2.9.1")> <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()> _
@@ -370,6 +370,16 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
'''</summary>
Friend ReadOnly Property highimportance1() As DevExpress.Utils.Svg.SvgImage
Get
Dim obj As Object = ResourceManager.GetObject("highimportance1", resourceCulture)
Return CType(obj,DevExpress.Utils.Svg.SvgImage)
End Get
End Property
'''<summary> '''<summary>
''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage. ''' Sucht eine lokalisierte Ressource vom Typ DevExpress.Utils.Svg.SvgImage.
'''</summary> '''</summary>

View File

@@ -187,9 +187,6 @@
<data name="actions_arrow4down" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="actions_arrow4down" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\actions_arrow4down.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\actions_arrow4down.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="open1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\open1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="bo_unknown1" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="bo_unknown1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\bo_unknown1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\bo_unknown1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
@@ -199,6 +196,9 @@
<data name="open3" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="open3" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\open3.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\open3.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="bo_sale" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\bo_sale.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="actions_checkcircled" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="actions_checkcircled" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\actions_checkcircled.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\actions_checkcircled.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
@@ -220,9 +220,6 @@
<data name="actions_send1" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="actions_send1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\actions_send1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\actions_send1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="actions_send4" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\actions_send4.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="actions_send2" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="actions_send2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\actions_send2.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\actions_send2.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
@@ -238,9 +235,6 @@
<data name="open23" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="open23" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\open23.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\open23.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="insertpagecount" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\insertpagecount.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="actions_reload1" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="actions_reload1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\actions_reload1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\actions_reload1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
@@ -274,6 +268,9 @@
<data name="paymentrefund" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="paymentrefund" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\paymentrefund.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\paymentrefund.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="squarified" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\squarified.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="support" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="support" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\support.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\support.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
@@ -289,8 +286,8 @@
<data name="preview" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="preview" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\preview.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\preview.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="bo_sale" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="insertpagecount" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\bo_sale.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\insertpagecount.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="exporttopdf" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="exporttopdf" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\exporttopdf.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\exporttopdf.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
@@ -310,14 +307,20 @@
<data name="showallfieldcodes" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="showallfieldcodes" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\showallfieldcodes.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\showallfieldcodes.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="actions_delete" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="open1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\actions_delete.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\open1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="highimportance" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\highimportance.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="actions_addcircled" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="actions_addcircled" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\actions_addcircled.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\actions_addcircled.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="squarified" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="actions_delete" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\squarified.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\actions_delete.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="actions_send4" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\actions_send4.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="logical2" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="logical2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\logical2.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\logical2.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
@@ -334,7 +337,7 @@
<data name="actions_checkcircled2" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="actions_checkcircled2" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\actions_checkcircled2.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\actions_checkcircled2.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="highimportance" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="highimportance1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\highimportance.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>..\Resources\highimportance1.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
</root> </root>

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

@@ -87,9 +87,9 @@ Partial Public Class OrderReport
Me.XrTableCell18 = New DevExpress.XtraReports.UI.XRTableCell() Me.XrTableCell18 = New DevExpress.XtraReports.UI.XRTableCell()
Me.tableCell46 = New DevExpress.XtraReports.UI.XRTableCell() Me.tableCell46 = New DevExpress.XtraReports.UI.XRTableCell()
Me.XrTableCell8 = New DevExpress.XtraReports.UI.XRTableCell() Me.XrTableCell8 = New DevExpress.XtraReports.UI.XRTableCell()
Me.ObjectDataSource1 = New DevExpress.DataAccess.ObjectBinding.ObjectDataSource(Me.components)
Me.GroupFooter1 = New DevExpress.XtraReports.UI.GroupFooterBand() Me.GroupFooter1 = New DevExpress.XtraReports.UI.GroupFooterBand()
Me.label2 = New DevExpress.XtraReports.UI.XRLabel() Me.label2 = New DevExpress.XtraReports.UI.XRLabel()
Me.ObjectDataSource1 = New DevExpress.DataAccess.ObjectBinding.ObjectDataSource(Me.components)
CType(Me.XrTable2, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.XrTable2, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.XrTable1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.XrTable1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.table3, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.table3, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -488,7 +488,7 @@ Partial Public Class OrderReport
Me.tableCell31.Multiline = True Me.tableCell31.Multiline = True
Me.tableCell31.Name = "tableCell31" Me.tableCell31.Name = "tableCell31"
Me.tableCell31.StyleName = "DetailCaption2" Me.tableCell31.StyleName = "DetailCaption2"
Me.tableCell31.Text = "Artikelnummer" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "Lieferant" Me.tableCell31.Text = "Positionstext"
Me.tableCell31.Weight = 0.13529574805877542R Me.tableCell31.Weight = 0.13529574805877542R
' '
'XrTableCell13 'XrTableCell13
@@ -688,11 +688,6 @@ Partial Public Class OrderReport
Me.XrTableCell8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight Me.XrTableCell8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight
Me.XrTableCell8.Weight = 0.089263976911086243R Me.XrTableCell8.Weight = 0.089263976911086243R
' '
'ObjectDataSource1
'
Me.ObjectDataSource1.DataSource = GetType(MultiTool.Common.Report.ReportSource)
Me.ObjectDataSource1.Name = "ObjectDataSource1"
'
'GroupFooter1 'GroupFooter1
' '
Me.GroupFooter1.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.label2}) Me.GroupFooter1.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.label2})
@@ -711,6 +706,11 @@ Partial Public Class OrderReport
Me.label2.StylePriority.UseBackColor = False Me.label2.StylePriority.UseBackColor = False
Me.label2.StylePriority.UseBorders = False Me.label2.StylePriority.UseBorders = False
' '
'ObjectDataSource1
'
Me.ObjectDataSource1.DataSource = GetType(MultiTool.Common.Report.ReportSource)
Me.ObjectDataSource1.Name = "ObjectDataSource1"
'
'OrderReport 'OrderReport
' '
Me.Bands.AddRange(New DevExpress.XtraReports.UI.Band() {Me.TopMargin, Me.BottomMargin, Me.ReportHeader, Me.Detail, Me.DetailReport}) Me.Bands.AddRange(New DevExpress.XtraReports.UI.Band() {Me.TopMargin, Me.BottomMargin, Me.ReportHeader, Me.Detail, Me.DetailReport})

View File

@@ -0,0 +1,19 @@
<?xml version='1.0' encoding='UTF-8'?>
<svg x="0px" y="0px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" id="Layer_1" style="enable-background:new 0 0 32 32">
<style type="text/css">
.Yellow{fill:#FFB115;}
.Red{fill:#D11C1C;}
.Blue{fill:#1177D7;}
.Green{fill:#039C23;}
.Black{fill:#727272;}
.White{fill:#FFFFFF;}
.st0{opacity:0.5;}
.st1{display:none;}
.st2{display:inline;fill:#039C23;}
.st3{display:inline;fill:#D11C1C;}
.st4{display:inline;fill:#727272;}
</style>
<g id="HighImportance">
<path d="M16,2C8.3,2,2,8.3,2,16s6.3,14,14,14s14-6.3,14-14S23.7,2,16,2z M16,24c-1.1,0-2-0.9-2-2s0.9-2,2-2s2,0.9,2,2 S17.1,24,16,24z M18,18h-4V8h4V18z" class="Red" />
</g>
</svg>

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,13 +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="TBMT_CONFIGBindingSource.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>758, 17</value> <value>1210, 16</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">
@@ -143,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"
' '
@@ -264,6 +265,7 @@ Partial Class frmExportMain
Me.GridViewDocuments.OptionsSelection.CheckBoxSelectorField = "IsSelected" Me.GridViewDocuments.OptionsSelection.CheckBoxSelectorField = "IsSelected"
Me.GridViewDocuments.OptionsSelection.MultiSelect = True Me.GridViewDocuments.OptionsSelection.MultiSelect = True
Me.GridViewDocuments.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CheckBoxRowSelect Me.GridViewDocuments.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CheckBoxRowSelect
Me.GridViewDocuments.SortInfo.AddRange(New DevExpress.XtraGrid.Columns.GridColumnSortInfo() {New DevExpress.XtraGrid.Columns.GridColumnSortInfo(Me.colNumber, DevExpress.Data.ColumnSortOrder.Descending)})
' '
'colImported 'colImported
' '
@@ -854,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)
@@ -215,6 +212,7 @@ Public Class frmExportMain
If oDocuments Is Nothing Then If oDocuments Is Nothing Then
FormHelper.ShowWarning("There was an error in the Query.") FormHelper.ShowWarning("There was an error in the Query.")
Exit Sub
End If End If
GridControlDocuments.DataSource = oDocuments GridControlDocuments.DataSource = oDocuments
@@ -226,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
@@ -244,13 +243,11 @@ Public Class frmExportMain
SplashScreenManager.SetWaitFormDescription(oMessage) SplashScreenManager.SetWaitFormDescription(oMessage)
Await WebService.ExportDocumentFromWinline(oDocument, CurrentTemplate, oMandator) Await WebService.ExportDocumentFromWinline(oDocument, CurrentTemplate, oMandator)
Dim oFinalSqlResult = Await Winline.ExecuteFinalSQL(oDocument, CurrentTemplate, oMandator) Dim oFinalSqlResult = Await Winline.ExecuteFinalSQLForExport(oDocument, CurrentTemplate, oMandator)
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)
@@ -263,6 +260,7 @@ Public Class frmExportMain
Finally Finally
SplashScreenManager.CloseWaitForm() SplashScreenManager.CloseWaitForm()
btnExport.Enabled = True
SearchDocuments() SearchDocuments()
End Try End Try

View File

@@ -58,6 +58,7 @@ Partial Class frmImportMain
Me.btnCalculatePrices = New DevExpress.XtraBars.BarButtonItem() Me.btnCalculatePrices = New DevExpress.XtraBars.BarButtonItem()
Me.btnOpenLogDirectory2 = New DevExpress.XtraBars.BarButtonItem() Me.btnOpenLogDirectory2 = New DevExpress.XtraBars.BarButtonItem()
Me.txtErrors = New DevExpress.XtraBars.BarStaticItem() Me.txtErrors = New DevExpress.XtraBars.BarStaticItem()
Me.btnShowErrors = New DevExpress.XtraBars.BarButtonItem()
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage() Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
Me.RibbonPageGroupLoad = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageGroupLoad = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroupReport = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageGroupReport = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
@@ -223,9 +224,9 @@ Partial Class frmImportMain
'RibbonControl 'RibbonControl
' '
Me.RibbonControl.ExpandCollapseItem.Id = 0 Me.RibbonControl.ExpandCollapseItem.Id = 0
Me.RibbonControl.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl.ExpandCollapseItem, Me.RibbonControl.SearchEditItem, Me.txtFilesLoaded, Me.btnLoadFiles, Me.btnTransferFile, Me.btnOpenInputDirectory, Me.btnOpenOutputDirectory, Me.btnOpenSchemaDirectory, Me.btnReloadFile, Me.btnTransferAllFiles, Me.btnOpenReport, Me.btnShowXml, Me.btnOpenLogDirectory, Me.btnOpenConfigDirectory, Me.txtCurrentFile, Me.btnConfig, Me.btnRemoveRow, Me.btnTestTransferFile, Me.BarButtonItem1, Me.btnDebugExportReport, Me.btnEditRow, Me.btnCalculatePrices, Me.btnOpenLogDirectory2, Me.txtErrors}) Me.RibbonControl.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl.ExpandCollapseItem, Me.RibbonControl.SearchEditItem, Me.txtFilesLoaded, Me.btnLoadFiles, Me.btnTransferFile, Me.btnOpenInputDirectory, Me.btnOpenOutputDirectory, Me.btnOpenSchemaDirectory, Me.btnReloadFile, Me.btnTransferAllFiles, Me.btnOpenReport, Me.btnShowXml, Me.btnOpenLogDirectory, Me.btnOpenConfigDirectory, Me.txtCurrentFile, Me.btnConfig, Me.btnRemoveRow, Me.btnTestTransferFile, Me.BarButtonItem1, Me.btnDebugExportReport, Me.btnEditRow, Me.btnCalculatePrices, Me.btnOpenLogDirectory2, Me.txtErrors, Me.btnShowErrors})
resources.ApplyResources(Me.RibbonControl, "RibbonControl") resources.ApplyResources(Me.RibbonControl, "RibbonControl")
Me.RibbonControl.MaxItemId = 39 Me.RibbonControl.MaxItemId = 40
Me.RibbonControl.Name = "RibbonControl" Me.RibbonControl.Name = "RibbonControl"
Me.RibbonControl.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1, Me.RibbonPage2}) Me.RibbonControl.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1, Me.RibbonPage2})
Me.RibbonControl.RepositoryItems.AddRange(New DevExpress.XtraEditors.Repository.RepositoryItem() {Me.RepositoryItemComboBox1, Me.RepositoryItemProgressBar1}) Me.RibbonControl.RepositoryItems.AddRange(New DevExpress.XtraEditors.Repository.RepositoryItem() {Me.RepositoryItemComboBox1, Me.RepositoryItemProgressBar1})
@@ -400,6 +401,14 @@ Partial Class frmImportMain
Me.txtErrors.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph Me.txtErrors.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph
Me.txtErrors.Tag = "Fehler: {0}" Me.txtErrors.Tag = "Fehler: {0}"
' '
'btnShowErrors
'
resources.ApplyResources(Me.btnShowErrors, "btnShowErrors")
Me.btnShowErrors.Enabled = False
Me.btnShowErrors.Id = 39
Me.btnShowErrors.ImageOptions.SvgImage = Global.MultiTool.Form.My.Resources.Resources.highimportance1
Me.btnShowErrors.Name = "btnShowErrors"
'
'RibbonPage1 'RibbonPage1
' '
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroupLoad, Me.RibbonPageGroupReport, Me.RibbonPageGroupTransfer, Me.RibbonPageGroupEdit}) Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroupLoad, Me.RibbonPageGroupReport, Me.RibbonPageGroupTransfer, Me.RibbonPageGroupEdit})
@@ -434,6 +443,7 @@ Partial Class frmImportMain
Me.RibbonPageGroupEdit.ItemLinks.Add(Me.btnEditRow) Me.RibbonPageGroupEdit.ItemLinks.Add(Me.btnEditRow)
Me.RibbonPageGroupEdit.ItemLinks.Add(Me.btnRemoveRow) Me.RibbonPageGroupEdit.ItemLinks.Add(Me.btnRemoveRow)
Me.RibbonPageGroupEdit.ItemLinks.Add(Me.btnCalculatePrices) Me.RibbonPageGroupEdit.ItemLinks.Add(Me.btnCalculatePrices)
Me.RibbonPageGroupEdit.ItemLinks.Add(Me.btnShowErrors)
Me.RibbonPageGroupEdit.Name = "RibbonPageGroupEdit" Me.RibbonPageGroupEdit.Name = "RibbonPageGroupEdit"
resources.ApplyResources(Me.RibbonPageGroupEdit, "RibbonPageGroupEdit") resources.ApplyResources(Me.RibbonPageGroupEdit, "RibbonPageGroupEdit")
' '
@@ -760,4 +770,5 @@ Partial Class frmImportMain
Friend WithEvents btnCalculatePrices As DevExpress.XtraBars.BarButtonItem Friend WithEvents btnCalculatePrices As DevExpress.XtraBars.BarButtonItem
Friend WithEvents btnOpenLogDirectory2 As DevExpress.XtraBars.BarButtonItem Friend WithEvents btnOpenLogDirectory2 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents txtErrors As DevExpress.XtraBars.BarStaticItem Friend WithEvents txtErrors As DevExpress.XtraBars.BarStaticItem
Friend WithEvents btnShowErrors As DevExpress.XtraBars.BarButtonItem
End Class End Class

View File

@@ -256,6 +256,9 @@
<data name="txtErrors.Caption" xml:space="preserve"> <data name="txtErrors.Caption" xml:space="preserve">
<value>Fehler: 0</value> <value>Fehler: 0</value>
</data> </data>
<data name="btnShowErrors.Caption" xml:space="preserve">
<value>Fehler anzeigen</value>
</data>
<data name="RibbonControl.Location" type="System.Drawing.Point, System.Drawing"> <data name="RibbonControl.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value> <value>0, 0</value>
</data> </data>
@@ -373,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>
@@ -962,6 +968,12 @@
<data name="&gt;&gt;txtErrors.Type" xml:space="preserve"> <data name="&gt;&gt;txtErrors.Type" xml:space="preserve">
<value>DevExpress.XtraBars.BarStaticItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>DevExpress.XtraBars.BarStaticItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="&gt;&gt;btnShowErrors.Name" xml:space="preserve">
<value>btnShowErrors</value>
</data>
<data name="&gt;&gt;btnShowErrors.Type" xml:space="preserve">
<value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;RibbonPage1.Name" xml:space="preserve"> <data name="&gt;&gt;RibbonPage1.Name" xml:space="preserve">
<value>RibbonPage1</value> <value>RibbonPage1</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,9 +95,14 @@ 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 Documents.DocumentLoader(LogConfig, Winline, My.MappingConfiguration, My.TemplateConfiguration, ConfigManager.Config) DocumentLoader = New DocumentLoader(LogConfig, Winline, Database,
DocumentCleaner = New Documents.DocumentCleaner(LogConfig, CurrentTemplate) My.MappingConfiguration,
My.TemplateConfiguration,
My.GeneralConfiguration,
ConfigManager.Config)
DocumentCleaner = New DocumentCleaner(LogConfig, CurrentTemplate)
GridLoader = New GridLoader(LogConfig) GridLoader = New GridLoader(LogConfig)
ReportGenerator = New ReportGenerator(Of OrderReport)(LogConfig, Database, My.TemplateConfiguration, My.GeneralConfiguration) ReportGenerator = New ReportGenerator(Of OrderReport)(LogConfig, Database, My.TemplateConfiguration, My.GeneralConfiguration)
@@ -110,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
@@ -189,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
@@ -223,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)
@@ -233,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
@@ -280,11 +302,22 @@ Public Class frmImportMain
Dim oDocument As Document = GridViewFiles.GetRow(GridViewFiles.FocusedRowHandle) Dim oDocument As Document = GridViewFiles.GetRow(GridViewFiles.FocusedRowHandle)
' Generate the report ' Generate the report
Dim oReport = ReportGenerator.GenerateReport(oDocument, CurrentTemplate) Dim oReportResult = ReportGenerator.GenerateReport(oDocument, CurrentTemplate)
Dim oFilePath = ReportGenerator.GetReportFilePath(oDocument, CurrentTemplate) Dim oFileInfo = New FileInfo(oReportResult.FileName)
' Export it to pdf ' Export it to pdf
oReport.ExportToPdf(oFilePath) oReportResult.Report.ExportToPdf(oReportResult.FileName)
Dim oMessage = $"Die Datei wurde im Verzeichnis '{oFileInfo.Directory}' abgelegt. Möchten Sie die Datei jetzt öffnen?"
Dim oDialogResult = MsgBox(oMessage, MsgBoxStyle.Question Or MsgBoxStyle.YesNo, Text)
If oDialogResult = MsgBoxResult.Yes Then
Try
Process.Start(oReportResult.FileName)
Catch ex As Exception
FormHelper.ShowError(ex, "Export Report")
End Try
End If
End Sub End Sub
Private Async Sub btnTestTransferFile_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnTestTransferFile.ItemClick Private Async Sub btnTestTransferFile_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnTestTransferFile.ItemClick
@@ -390,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
@@ -418,47 +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 NoMandatorException
FormHelper.ShowError(ex, My.Resources.frmImportMainExtra.Neuladen_des_Dokuments, My.Resources.frmImportMainExtra.Es_konnte_kein_passender_Mandant_ermittelt_werden)
Catch ex As MissingAttributeException
FormHelper.ShowError(ex, My.Resources.frmImportMainExtra.Neuladen_des_Dokuments, "Ein benötigtes Attribut wurde nicht gefunden.")
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
@@ -527,8 +538,8 @@ Public Class frmImportMain
Dim oReport As OrderReport = oReportGenerator.GenerateReport(oDocument, CurrentTemplate) Dim oResult = oReportGenerator.GenerateReport(oDocument, CurrentTemplate)
Dim oPrintTool As New ReportPrintTool(oReport) Dim oPrintTool As New ReportPrintTool(oResult.Report)
oPrintTool.Report.CreateDocument(False) oPrintTool.Report.CreateDocument(False)
oPrintTool.ShowPreview() oPrintTool.ShowPreview()
@@ -610,8 +621,10 @@ Public Class frmImportMain
If pDocument.HasErrors = True Then If pDocument.HasErrors = True Then
btnCalculatePrices.Enabled = False btnCalculatePrices.Enabled = False
btnShowErrors.Enabled = True
Else Else
btnCalculatePrices.Enabled = True btnCalculatePrices.Enabled = True
btnShowErrors.Enabled = False
End If End If
If pDocument.Mandator Is Nothing Then If pDocument.Mandator Is Nothing Then
@@ -619,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
@@ -650,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)
@@ -670,19 +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 NoMandatorException
MsgBox(My.Resources.frmImportMainExtra.Es_konnte_kein_passender_Mandant_ermittelt_werden, MsgBoxStyle.Information, Text)
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
@@ -727,29 +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
WebService.RaiseWebServiceProgress("Bericht erzeugen")
' Generate the report ' Generate the report
Dim oReport = ReportGenerator.GenerateReport(pDocument, CurrentTemplate) WebService.RaiseWebServiceProgress("Bericht erzeugen")
Dim oFilePath = ReportGenerator.GetReportFilePath(pDocument, CurrentTemplate) Logger.Debug("Creating report for file [{0}]", pDocument.FileName)
Dim oReportResult = ReportGenerator.GenerateReport(pDocument, CurrentTemplate)
WebService.RaiseWebServiceProgress("Bericht exportieren")
' Export it to pdf ' Export it to pdf
oReport.ExportToPdf(oFilePath) WebService.RaiseWebServiceProgress("Bericht exportieren")
Logger.Debug("Exporting report to [{0}]", oReportResult.FileName)
oReportResult.Report.ExportToPdf(oReportResult.FileName)
WebService.RaiseWebServiceProgress("Datei archivieren") ' Mark Document as Imported, will be moved on Form Close or File Reload
Logger.Debug("Setting file [{0}] to Imported", pDocument.FileName)
' Mark Document as Imported, will be moved on Form Close
pDocument.Imported = True pDocument.Imported = True
Return True Return True
@@ -828,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
@@ -841,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)
@@ -857,16 +900,45 @@ 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 Private Sub btnShowErrors_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnShowErrors.ItemClick
If lookupMandator.EditValue Is Nothing Then If CurrentDocument IsNot Nothing Then
lookupMandator.BackColor = Color.LightCoral Dim oErrors = CurrentDocument.Errors.
Else Select(Function(s) " - " & s).
lookupMandator.BackColor = Nothing ToList()
Dim oMessage = String.Join(vbNewLine, oErrors)
MsgBox($"Datei enthält {oErrors.Count} Fehler:{vbNewLine}{vbNewLine}{oMessage}", MsgBoxStyle.Exclamation, Text)
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
@@ -90,18 +89,17 @@ Public Class frmMain
Private Async Function LoadWinlineData(Winline As WinlineData) As Task Private Async Function LoadWinlineData(Winline As WinlineData) As Task
Winline.Mandators.Clear() Winline.Mandators.Clear()
Winline.LoadEconomicYears() Await Winline.LoadMandatorsAsync()
Await Winline.LoadMandators()
For Each oMandator As Mandator In Winline.Mandators For Each oMandator As Mandator In Winline.Mandators
SplashScreenManager.SetWaitFormDescription(String.Format(My.Resources.frmImportMainExtra.Lade__0__Konten, oMandator.Id)) SplashScreenManager.SetWaitFormDescription(String.Format(My.Resources.frmImportMainExtra.Lade__0__Konten, oMandator.Id))
Await Winline.LoadAccounts(oMandator) Await Winline.LoadAccountsAsync(oMandator)
SplashScreenManager.SetWaitFormDescription(String.Format(My.Resources.frmImportMainExtra.Lade__0__Artikel, oMandator.Id)) SplashScreenManager.SetWaitFormDescription(String.Format(My.Resources.frmImportMainExtra.Lade__0__Artikel, oMandator.Id))
Await Winline.LoadArticles(oMandator) Await Winline.LoadArticlesAsync(oMandator)
SplashScreenManager.SetWaitFormDescription(String.Format(My.Resources.frmImportMainExtra.Lade__0__Belegarten, oMandator.Id)) SplashScreenManager.SetWaitFormDescription(String.Format(My.Resources.frmImportMainExtra.Lade__0__Belegarten, oMandator.Id))
Await Winline.LoadDocumentKinds(oMandator) Await Winline.LoadDocumentKindsAsync(oMandator)
SplashScreenManager.SetWaitFormDescription(String.Format("Lade {0}/Colli", oMandator.Id)) SplashScreenManager.SetWaitFormDescription(String.Format("Lade {0}/Colli", oMandator.Id))
Await Winline.LoadPackingUnits(oMandator) Await Winline.LoadPackingUnitsAsync(oMandator)
Next Next
My.Winline = Winline My.Winline = Winline
@@ -112,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
@@ -287,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
@@ -184,10 +186,10 @@ Public Class frmRowEditor
'End If 'End If
' 03.12.21: For now we always remove the error if ANYTHING changed about the field ' 03.12.21: For now we always remove the error if ANYTHING changed about the field
oFieldValue.Error = FieldError.None oFieldValue.Errors.Clear()
' Save the grid value to the Field ' Save the grid value to the Field
oFieldValue.Final = oValueFromGrid.Trim() oFieldValue.SetValue("Final", oValueFromGrid.Trim())
If _DocumentRow.Fields.ContainsKey(oField.Key) Then If _DocumentRow.Fields.ContainsKey(oField.Key) Then
_DocumentRow.Fields.Item(oField.Key) = oFieldValue _DocumentRow.Fields.Item(oField.Key) = oFieldValue
@@ -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()
@@ -309,20 +311,7 @@ Public Class frmRowEditor
If oField.Value.HasError Then If oField.Value.HasError Then
e.Appearance.BackColor = Color.LightCoral e.Appearance.BackColor = Color.LightCoral
End If End If
' TODO: Remove this workaround if the conditions for errors are good now
'If e.DisplayText = String.Empty And (
' oField.Value.Error = FieldError.AccountNotFound Or
' oField.Value.Error = FieldError.ArticleNotFound) Then
' e.Appearance.BackColor = Color.LightCoral
'End If
End If End If
'If oField.Value.HasError Then
' e.Appearance.BackColor = Color.LightCoral
'End If
End Sub End Sub
Private Sub frmRowEditor_KeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown Private Sub frmRowEditor_KeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown

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

@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.6.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.1" />
<PackageReference Include="coverlet.collector" Version="1.3.0" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,13 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace MultiTool.Test
{
[TestClass]
public class WinlineDataTest
{
[TestMethod]
public void Test_VersionNumber()
{
}
}
}

View File

@@ -9,6 +9,8 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "MultiTool.Common", "MultiTo
EndProject EndProject
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Multitool.Form.Setup", "Multitool.Form.Setup\Multitool.Form.Setup.wixproj", "{A03D1911-C6D6-4AD0-9601-4D277B35E91D}" Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Multitool.Form.Setup", "Multitool.Form.Setup\Multitool.Form.Setup.wixproj", "{A03D1911-C6D6-4AD0-9601-4D277B35E91D}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MultiTool.Test", "MultiTool.Test\MultiTool.Test.csproj", "{2FCD4E08-F750-49D5-854D-719A55074D30}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@@ -39,6 +41,14 @@ Global
{A03D1911-C6D6-4AD0-9601-4D277B35E91D}.Release|Any CPU.ActiveCfg = Release|x86 {A03D1911-C6D6-4AD0-9601-4D277B35E91D}.Release|Any CPU.ActiveCfg = Release|x86
{A03D1911-C6D6-4AD0-9601-4D277B35E91D}.Release|x86.ActiveCfg = Release|x86 {A03D1911-C6D6-4AD0-9601-4D277B35E91D}.Release|x86.ActiveCfg = Release|x86
{A03D1911-C6D6-4AD0-9601-4D277B35E91D}.Release|x86.Build.0 = Release|x86 {A03D1911-C6D6-4AD0-9601-4D277B35E91D}.Release|x86.Build.0 = Release|x86
{2FCD4E08-F750-49D5-854D-719A55074D30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2FCD4E08-F750-49D5-854D-719A55074D30}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2FCD4E08-F750-49D5-854D-719A55074D30}.Debug|x86.ActiveCfg = Debug|Any CPU
{2FCD4E08-F750-49D5-854D-719A55074D30}.Debug|x86.Build.0 = Debug|Any CPU
{2FCD4E08-F750-49D5-854D-719A55074D30}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2FCD4E08-F750-49D5-854D-719A55074D30}.Release|Any CPU.Build.0 = Release|Any CPU
{2FCD4E08-F750-49D5-854D-719A55074D30}.Release|x86.ActiveCfg = Release|Any CPU
{2FCD4E08-F750-49D5-854D-719A55074D30}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE