Telotec API

This commit is contained in:
2025-04-24 17:06:16 +02:00
parent 14383d5cbe
commit 37fc5ad3ad
5 changed files with 305 additions and 25 deletions

View File

@@ -19,6 +19,7 @@ Imports Chilkat
Imports TELOTEC_Worker
Imports GrapeCity
Imports VERAG_PROG_ALLGEMEIN
Imports VERAG_PROG_ALLGEMEIN.cTelotecAPI
'Imports Microsoft.Office.Interop
Public Class usrctlProcedures
@@ -3907,6 +3908,63 @@ Public Class usrctlProcedures
End If
End Sub
Private Sub Button45_Click(sender As Object, e As EventArgs) Handles Button45.Click
VERAG_PROG_ALLGEMEIN.cModalTransIMPORT.CreateAndSendMinimalImportDeclaration(tctModalTEstLRN.Text)
End Sub
Private Sub Button46_Click(sender As Object, e As EventArgs) Handles Button46.Click
VERAG_PROG_ALLGEMEIN.cModalTransNCTS.TestNCTSSend()
End Sub
Private Sub Button47_Click(sender As Object, e As EventArgs) Handles Button47.Click
Dim TELO As New VERAG_PROG_ALLGEMEIN.cTelotecAPI
Dim messages As List(Of VERAG_PROG_ALLGEMEIN.cTelotecAPI.TAMessage) = TELO.GetTAMessages()
MsgBox(messages.Count)
For Each mmm In messages
MsgBox(mmm.lrn)
MsgBox(mmm.declarationContent.anmeldedatum)
Next
End Sub
Private Sub Button48_Click(sender As Object, e As EventArgs) Handles Button48.Click
Dim TELO As New VERAG_PROG_ALLGEMEIN.cTelotecAPI
Dim messages As New List(Of TAMessage)()
Using ofd As New OpenFileDialog()
ofd.Title = "Wähle eine JSON-Datei mit TA-Nachrichten"
ofd.InitialDirectory = "\\datenarchiv\Datenarchiv\TELOTEC\ECHTSYSTEM\Nachrichtendaten_Ablage_JSON\"
ofd.Filter = "JSON-Dateien (*.json)|*.json|Alle Dateien (*.*)|*.*"
If ofd.ShowDialog() = DialogResult.OK Then
Dim selectedPath As String = ofd.FileName
messages = TELO.ParseTAMessagesFromFile(selectedPath)
MsgBox(messages.Count)
For Each mmm In messages
MsgBox(mmm.lrn)
Dim TELO_ANM = TELOTEC_Worker.cTelotec_Anmeldung.ConvertTAMessageToTelotec(mmm)
If TELO_ANM.SAVE() Then
MsgBox("SUSSSSS")
End If
Next
Else
Console.WriteLine("🔕 Keine Datei ausgewählt.")
End If
End Using
End Sub