This commit is contained in:
2024-08-16 11:43:32 +02:00
parent 311cb70fca
commit 68d609a3ce
9 changed files with 64 additions and 18 deletions

View File

@@ -7,9 +7,11 @@ Public Class cMSEAPI
Public API_STRING
Dim API As New DataTable
Dim rest As New Chilkat.Rest
Dim defaultDebugLogFilePath = ""
Dim SQL As New SQL
Dim apiSettingsloaded As Boolean = False
Dim test As Boolean = False
Public PDFRECHNUNGENPFAD As String
Sub New(program As String)
@@ -20,11 +22,26 @@ Public Class cMSEAPI
Else
apiSettingsloaded = True
API_STRING = API.Rows(0).Item("api_url")
If Not IsDBNull(API.Rows(0).Item("api_debugpath")) AndAlso API.Rows(0).Item("api_debugpath") <> "" Then
rest.VerboseLogging = True
rest.DebugLogFilePath = API.Rows(0).Item("api_debugpath") & program & IIf(VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM, "_Test", "") & ".txt"
Else
rest.VerboseLogging = False
End If
PDFRECHNUNGENPFAD = Me.GET_PARAM_ByName("PDFRECHNUNGEN-PFAD", VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM)
End If
End Sub
Shared Function GET_PARAM_ByName(tcParam_name, TESTSYSTEM) As String
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
Return SQL.getValueTxtBySql("SELECT TOP 1 [Param_value] FROM [tblPartnersystem_Paramter] WHERE Param_system='MSE' AND [Param_name]='" & tcParam_name & "'", , , SQL.GetNewOpenConnectionFMZOLL_SYSTEM(TESTSYSTEM))
End Function
Public Function createJWT(ByRef failureText As String) As String
Try
@@ -65,7 +82,6 @@ Public Class cMSEAPI
rest.DebugMode = test
rest.VerboseLogging = True
Dim bTls As Boolean = True
Dim port As Integer = 443
Dim bAutoReconnect As Boolean = True
@@ -152,7 +168,6 @@ Public Class cMSEAPI
rest.DebugMode = test
rest.VerboseLogging = True
Dim bTls As Boolean = True
Dim port As Integer = 443
Dim bAutoReconnect As Boolean = True
@@ -225,7 +240,6 @@ Public Class cMSEAPI
rest.DebugMode = test
rest.VerboseLogging = True
Dim bTls As Boolean = True
Dim port As Integer = 443
Dim bAutoReconnect As Boolean = True
@@ -315,7 +329,6 @@ Public Class cMSEAPI
rest.DebugMode = test
rest.VerboseLogging = True
Dim bTls As Boolean = True
Dim port As Integer = 443
Dim bAutoReconnect As Boolean = True
@@ -417,10 +430,8 @@ Public Class cMSEAPI
Dim success As Boolean
rest.DebugMode = test
rest.VerboseLogging = True
Dim bTls As Boolean = True
Dim port As Integer = 443
Dim bAutoReconnect As Boolean = True
@@ -511,7 +522,6 @@ Public Class cMSEAPI
rest.DebugMode = test
rest.VerboseLogging = True
Dim bTls As Boolean = True
Dim port As Integer = 443
Dim bAutoReconnect As Boolean = True
@@ -606,7 +616,6 @@ Public Class cMSEAPI
rest.DebugMode = test
rest.VerboseLogging = True
Dim bTls As Boolean = True
Dim port As Integer = 443
Dim bAutoReconnect As Boolean = True
@@ -749,7 +758,6 @@ Public Class cMSEAPI
rest.DebugMode = test
rest.VerboseLogging = True
Dim bTls As Boolean = True
Dim port As Integer = 443
Dim bAutoReconnect As Boolean = True
@@ -894,7 +902,7 @@ Public Class cMSEAPI
'\\datenarchiv\Datenarchiv\MDM_SCHNITTSTELLEN\ECHTSYSTEM\Nachrichtendaten_ZIEL\MSE
If r("url") <> "" AndAlso r("name") <> "" AndAlso r("name").contains("VAT") Then 'only VAT-Invoices
VERAG_PROG_ALLGEMEIN.cFormularManager.getPDFViaSpirePDF_FromURLStream(r("url"), r("name"), "\\fmzoll\f\FMZoll\MSE\TESTRECHNUNGEN", False)
VERAG_PROG_ALLGEMEIN.cFormularManager.getPDFViaSpirePDF_FromURLStream(r("url"), r("name"), PDFRECHNUNGENPFAD, False)
End If
Next
@@ -1765,4 +1773,4 @@ Public Class cMSECustomers
End Try
Return ""
End Function
End Class
End Class