EXG, DY Atilla

This commit is contained in:
2025-02-12 12:40:11 +01:00
parent 3ab3e525ee
commit afcfd962fe
6 changed files with 139 additions and 51 deletions

View File

@@ -214,6 +214,69 @@ Public Class cATEZ_ncts_api
End Try
Return False
End Function
Public Shared Function updateStatusByMRN(MRN As String) As Boolean
Try
Dim result = False
' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat()
Dim http As New Chilkat.Http
Dim success As Boolean
'http.SetRequestHeader("API-KEY", "{{API-KEY}}")
http.SetRequestHeader("API-KEY", API_KEY)
Dim sbResponseBody As New Chilkat.StringBuilder
success = http.QuickGetSb("https://transcode.singlewindow.io/api/tds/integrations/verag/declarations/messages/ie015-by-mrn/" & MRN, sbResponseBody)
If (success = False) Then
Debug.WriteLine(http.LastErrorText)
Return False
End If
Debug.WriteLine("Response status code = " & http.LastStatus)
Dim responseString = (sbResponseBody.GetAsString())
If responseString <> "" Then
MsgBox(responseString)
Dim tempFilePath = saveStringToTmpXML(responseString)
Dim NCTS_P5 = VERAG_PROG_ALLGEMEIN.NCTS_P5_CC015C.CC015CType.LoadFromFile(tempFilePath)
' result = saveXMLtoNCTS_FREMD(NCTS_P5, MRN)
' Dim NCTS_FREMD = VERAG_PROG_ALLGEMEIN.cNCTS_FREMD.LOADByMRN(NCTS_TMP.Mrn, True)
'If NCTS_FREMD Is Nothing Then NCTS_FREMD = New cNCTS_FREMD
'NCTS_FREMD.ncts_Partnersystem = "ATEZ"
'NCTS_FREMD.ncts_MRN = NCTS_TMP.Mrn
'NCTS_FREMD.ncts_Eroeffnung = NCTS_TMP.MrnDate
'If NCTS_TMP.MrnDate IsNot Nothing Then
' If If(NCTS_FREMD.ncts_LimitDate, "").ToString = "" Then NCTS_FREMD.ncts_LimitDate = CDate(NCTS_TMP.MrnDate).AddDays(10)
'End If
If File.Exists(tempFilePath) Then
File.Delete(tempFilePath)
Console.WriteLine("Temporäre Datei gelöscht.")
End If
End If
Return result
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return False
End Function
Private Shared Function saveStringToTmpXML(xmlString) As String
' Beispiel-XML-String
' Dim xmlString As String = "<?xml version=""1.0"" encoding=""UTF-8""?><root><element>Wert</element></root>"

View File

@@ -10,7 +10,7 @@ Public Class cAllgemein
Public Shared STAMMFILIALE As String 'IMEX,UNISPED;ATILLA...
Public Shared WARENORT_ZUGANG As Boolean = False
Public Shared WARENORT As String
Public Shared ATILLA_SND As Boolean = False
Public Shared ATILLA_SND As Boolean = True
Public Shared CLUSTER As String = "" 'Firmenverbund
' Public Shared SPECIFIC As cSPECIFIC = New cSPECIFIC