Update GetPropertyValue

This commit is contained in:
Jonathan Jenne
2019-05-09 17:07:53 +02:00
parent 809f8e2b43
commit ce21ae5dab
6 changed files with 104 additions and 45 deletions

View File

@@ -1,9 +1,9 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class Form1
Inherits System.Windows.Forms.Form
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _
<System.Diagnostics.DebuggerNonUserCode()>
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
@@ -20,7 +20,7 @@ Partial Class Form1
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog()
Me.Button1 = New System.Windows.Forms.Button()
@@ -54,7 +54,7 @@ Partial Class Form1
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(12, 41)
Me.Button2.Location = New System.Drawing.Point(12, 122)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(221, 23)
Me.Button2.TabIndex = 2
@@ -63,7 +63,7 @@ Partial Class Form1
'
'Button3
'
Me.Button3.Location = New System.Drawing.Point(12, 70)
Me.Button3.Location = New System.Drawing.Point(12, 151)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(221, 23)
Me.Button3.TabIndex = 3
@@ -72,7 +72,7 @@ Partial Class Form1
'
'Button4
'
Me.Button4.Location = New System.Drawing.Point(12, 112)
Me.Button4.Location = New System.Drawing.Point(12, 193)
Me.Button4.Name = "Button4"
Me.Button4.Size = New System.Drawing.Size(221, 23)
Me.Button4.TabIndex = 4
@@ -82,7 +82,7 @@ Partial Class Form1
'txtMD5Checksum
'
Me.txtMD5Checksum.DataBindings.Add(New System.Windows.Forms.Binding("Text", Global.ZUGFeRDTest.My.MySettings.Default, "MD5Cheksum", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
Me.txtMD5Checksum.Location = New System.Drawing.Point(12, 141)
Me.txtMD5Checksum.Location = New System.Drawing.Point(12, 222)
Me.txtMD5Checksum.Name = "txtMD5Checksum"
Me.txtMD5Checksum.Size = New System.Drawing.Size(360, 20)
Me.txtMD5Checksum.TabIndex = 5

View File

@@ -54,24 +54,28 @@ Public Class Form1
Return args
End Function
Private Function LoadPropertyMapFor(args As WorkerArgs, specification As String)
Dim oSQL As String = $"SELECT * FROM TBEDM_XML_ITEMS WHERE SPECIFICATION = '{specification}' AND ACTIVE = True"
Private Function LoadPropertyMapFor(Args As WorkerArgs, Specification As String)
Dim oSQL As String = $"SELECT * FROM TBEDM_XML_ITEMS WHERE SPECIFICATION = '{Specification}' AND ACTIVE = True"
Dim oResult As DataTable = _firebird.GetDatatable(oSQL)
For Each row As DataRow In oResult.Rows
Dim xmlPath = row.Item("XML_PATH")
Dim tableName = row.Item("TABLE_NAME")
Dim description = row.Item("DESCRIPTION")
Dim isRequired = row.Item("IS_REQUIRED")
For Each oRow As DataRow In oResult.Rows
Dim xmlPath = oRow.Item("XML_PATH")
Dim tableName = oRow.Item("TABLE_NAME")
Dim description = oRow.Item("DESCRIPTION")
Dim isRequired = oRow.Item("IS_REQUIRED")
Dim isGrouped = oRow.Item("IS_GROUPED")
Dim groupScope = oRow.Item("GROUP_SCOPE")
args.PropertyMap.Add(xmlPath, New XmlItemProperty() With {
Args.PropertyMap.Add(xmlPath, New XmlItemProperty() With {
.Description = description,
.TableName = tableName,
.IsRequired = isRequired
.IsRequired = isRequired,
.IsGrouped = isGrouped,
.GroupScope = groupScope
})
Next
Return args
Return Args
End Function
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click