Add Setting for Non-ZUGFeRD Files which are not rejected and instead moved to a special folder
This commit is contained in:
@@ -90,6 +90,11 @@ Public Class ThreadRunner
|
||||
_logger.Warn("RejectedEmailDirectory {0} does not exist!", oArgs.RejectedEmailDirectory)
|
||||
End If
|
||||
|
||||
_logger.Debug("Checking Non ZUGFeRD Directory {0}", oArgs.NonZugferdDirectory)
|
||||
If Not Directory.Exists(oArgs.NonZugferdDirectory) Then
|
||||
_logger.Warn("RejectedEmailDirectory {0} does not exist!", oArgs.RejectedEmailDirectory)
|
||||
End If
|
||||
|
||||
_logger.Debug("Checking Exception Email Adress {0}", oArgs.ExceptionEmailAddress)
|
||||
If oArgs.ExceptionEmailAddress = String.Empty Then
|
||||
_logger.Warn("ExceptionEmailAddress {0} is not set!", oArgs.ExceptionEmailAddress)
|
||||
@@ -171,27 +176,30 @@ Public Class ThreadRunner
|
||||
Dim oSQL As String = "SELECT T1.FOLDER_TYPE, T.FOLDER_PATH FROM TBEDM_FOLDER T, TBEDM_FOLDER_TYPE T1 WHERE T.FOLDER_TYPE_ID = T1.GUID AND T1.""ACTIVE"" = True AND T.""ACTIVE"" = True"
|
||||
Dim oResult As DataTable = _firebird.GetDatatable(oSQL)
|
||||
|
||||
For Each row As DataRow In oResult.Rows
|
||||
Dim oFolderType = row.Item("FOLDER_TYPE")
|
||||
For Each oRow As DataRow In oResult.Rows
|
||||
Dim oFolderType = oRow.Item("FOLDER_TYPE")
|
||||
|
||||
Select Case oFolderType
|
||||
Case ZUGFERD_IN
|
||||
pArgs.WatchDirectories.Add(row.Item("FOLDER_PATH"))
|
||||
pArgs.WatchDirectories.Add(oRow.Item("FOLDER_PATH"))
|
||||
|
||||
Case ZUGFERD_SUCCESS
|
||||
pArgs.SuccessDirectory = row.Item("FOLDER_PATH")
|
||||
pArgs.SuccessDirectory = oRow.Item("FOLDER_PATH")
|
||||
|
||||
Case ZUGFERD_ERROR
|
||||
pArgs.ErrorDirectory = row.Item("FOLDER_PATH")
|
||||
pArgs.ErrorDirectory = oRow.Item("FOLDER_PATH")
|
||||
|
||||
Case ZUGFERD_EML
|
||||
pArgs.OriginalEmailDirectory = row.Item("FOLDER_PATH")
|
||||
pArgs.OriginalEmailDirectory = oRow.Item("FOLDER_PATH")
|
||||
|
||||
Case ZUGFERD_REJECTED_EML
|
||||
pArgs.RejectedEmailDirectory = row.Item("FOLDER_PATH")
|
||||
pArgs.RejectedEmailDirectory = oRow.Item("FOLDER_PATH")
|
||||
|
||||
Case ZUGFERD_ATTACHMENTS
|
||||
pArgs.AttachmentsSubDirectory = row.Item("FOLDER_PATH")
|
||||
pArgs.AttachmentsSubDirectory = oRow.Item("FOLDER_PATH")
|
||||
|
||||
Case ZUGFERD_NO_ZUGFERD
|
||||
pArgs.NonZugferdDirectory = oRow.Item("FOLDER_PATH")
|
||||
|
||||
End Select
|
||||
Next
|
||||
|
||||
Reference in New Issue
Block a user