ZUGFeRD Service - Verarbeitung von XML-Belegen
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
Imports System.IO
|
||||
Imports System.Security.Cryptography
|
||||
Imports DigitalData.Modules
|
||||
Imports DigitalData.Modules.Config
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Interfaces
|
||||
Imports DigitalData.Modules.Jobs
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Config
|
||||
|
||||
Public Class Form1
|
||||
Private _logConfig As LogConfig
|
||||
@@ -67,7 +66,7 @@ Public Class Form1
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
Private Sub btRunJob_Click(sender As Object, e As EventArgs) Handles btRunJob.Click
|
||||
Dim oInputPath As String = "E:\TestFiles\ZUGFERDService\Input"
|
||||
|
||||
Dim DI As DirectoryInfo = New DirectoryInfo(oInputPath)
|
||||
@@ -95,7 +94,7 @@ Public Class Form1
|
||||
}
|
||||
args = LoadPropertyMapFor(args)
|
||||
|
||||
Dim job As New Jobs.ImportZUGFeRDFiles(_logConfig, _mssql)
|
||||
Dim job As New ImportZUGFeRDFiles(_logConfig, _mssql)
|
||||
|
||||
job.Start(args)
|
||||
End If
|
||||
@@ -116,6 +115,40 @@ Public Class Form1
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ButtonValidateXMLOnly_Click(sender As Object, e As EventArgs) Handles ButtonValidateXMLOnly.Click
|
||||
Dim oInputPath As String = "E:\DocumentProcessing\Input\"
|
||||
|
||||
Dim DI As DirectoryInfo = New DirectoryInfo(oInputPath)
|
||||
|
||||
Dim oResult As DialogResult = DialogResult.OK
|
||||
If DI.Exists = False Then
|
||||
' Nur öffnen, wenn Pfad ungültig ist
|
||||
oResult = FolderBrowserDialog1.ShowDialog()
|
||||
oInputPath = FolderBrowserDialog1.SelectedPath
|
||||
End If
|
||||
|
||||
If oResult = DialogResult.OK Then
|
||||
Dim args As New WorkerArgs() With {
|
||||
.MaxAttachmentSizeInMegaBytes = 10,
|
||||
.IgnoreRejectionStatus = False,
|
||||
.NamePortal = "XML TEST FROM FORM",
|
||||
.WatchDirectory = oInputPath,
|
||||
.SuccessDirectory = "E:\DocumentProcessing\Output\File\DocumentKindAssigned\ZUGFeRD\Success",
|
||||
.ErrorDirectory = "E:\DocumentProcessing\Output\File\DocumentKindAssigned\ZUGFeRD\Error\",
|
||||
.OriginalEmailDirectory = "E:\DocumentProcessing\Output\Original_Eml\",
|
||||
.RejectedEmailDirectory = "E:\DocumentProcessing\Output\Rejected_eml",
|
||||
.AttachmentsSubDirectory = "Attachments",
|
||||
.RejectionTemplateId = 1,
|
||||
.MinFileAgeInMinutes = 1
|
||||
}
|
||||
args = LoadPropertyMapFor(args)
|
||||
|
||||
Dim job As New ImportZUGFeRDFiles(_logConfig, _mssql)
|
||||
|
||||
job.Start(args)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub WriteLog(pMessage As String, ParamArray pParams As String())
|
||||
ListBox1.Items.Add(String.Format(pMessage, pParams))
|
||||
End Sub
|
||||
@@ -246,4 +279,6 @@ Public Class Form1
|
||||
Stream.Close()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user