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

@@ -24,6 +24,8 @@ Partial Class usrctlProcedures
Private Sub InitializeComponent()
Me.TabControl1 = New System.Windows.Forms.TabControl()
Me.TabPage3 = New System.Windows.Forms.TabPage()
Me.Label16 = New System.Windows.Forms.Label()
Me.txtHMRCApplName = New System.Windows.Forms.TextBox()
Me.Button44 = New System.Windows.Forms.Button()
Me.CheckBox6 = New System.Windows.Forms.CheckBox()
Me.TextBox15 = New System.Windows.Forms.TextBox()
@@ -76,6 +78,12 @@ Partial Class usrctlProcedures
Me.Label1 = New System.Windows.Forms.Label()
Me.Button1 = New System.Windows.Forms.Button()
Me.tbxLog = New System.Windows.Forms.TextBox()
Me.TabPage4 = New System.Windows.Forms.TabPage()
Me.Button46 = New System.Windows.Forms.Button()
Me.tctModalTEstLRN = New System.Windows.Forms.TextBox()
Me.Button45 = New System.Windows.Forms.Button()
Me.TabPage5 = New System.Windows.Forms.TabPage()
Me.Button47 = New System.Windows.Forms.Button()
Me.Button18 = New System.Windows.Forms.Button()
Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.lblAnzahl = New System.Windows.Forms.Label()
@@ -129,8 +137,7 @@ Partial Class usrctlProcedures
Me.Button43 = New System.Windows.Forms.Button()
Me.DataGridViewTextBoxColumn1 = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.DataGridViewTextBoxColumn2 = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.txtHMRCApplName = New System.Windows.Forms.TextBox()
Me.Label16 = New System.Windows.Forms.Label()
Me.Button48 = New System.Windows.Forms.Button()
Me.TabControl1.SuspendLayout()
Me.TabPage3.SuspendLayout()
Me.TabPage1.SuspendLayout()
@@ -138,6 +145,8 @@ Partial Class usrctlProcedures
Me.GroupBox1.SuspendLayout()
CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.TabPage2.SuspendLayout()
Me.TabPage4.SuspendLayout()
Me.TabPage5.SuspendLayout()
Me.SuspendLayout()
'
'TabControl1
@@ -145,6 +154,8 @@ Partial Class usrctlProcedures
Me.TabControl1.Controls.Add(Me.TabPage3)
Me.TabControl1.Controls.Add(Me.TabPage1)
Me.TabControl1.Controls.Add(Me.TabPage2)
Me.TabControl1.Controls.Add(Me.TabPage4)
Me.TabControl1.Controls.Add(Me.TabPage5)
Me.TabControl1.Location = New System.Drawing.Point(7, 407)
Me.TabControl1.Name = "TabControl1"
Me.TabControl1.SelectedIndex = 0
@@ -177,6 +188,22 @@ Partial Class usrctlProcedures
Me.TabPage3.Text = "TabPage3"
Me.TabPage3.UseVisualStyleBackColor = True
'
'Label16
'
Me.Label16.AutoSize = True
Me.Label16.Location = New System.Drawing.Point(434, 58)
Me.Label16.Name = "Label16"
Me.Label16.Size = New System.Drawing.Size(169, 13)
Me.Label16.TabIndex = 80
Me.Label16.Text = "fremde HMRC Application (Name):"
'
'txtHMRCApplName
'
Me.txtHMRCApplName.Location = New System.Drawing.Point(437, 71)
Me.txtHMRCApplName.Name = "txtHMRCApplName"
Me.txtHMRCApplName.Size = New System.Drawing.Size(159, 20)
Me.txtHMRCApplName.TabIndex = 79
'
'Button44
'
Me.Button44.Location = New System.Drawing.Point(437, 9)
@@ -662,6 +689,66 @@ Partial Class usrctlProcedures
Me.tbxLog.Size = New System.Drawing.Size(380, 380)
Me.tbxLog.TabIndex = 4
'
'TabPage4
'
Me.TabPage4.Controls.Add(Me.Button46)
Me.TabPage4.Controls.Add(Me.tctModalTEstLRN)
Me.TabPage4.Controls.Add(Me.Button45)
Me.TabPage4.Location = New System.Drawing.Point(4, 22)
Me.TabPage4.Name = "TabPage4"
Me.TabPage4.Padding = New System.Windows.Forms.Padding(3)
Me.TabPage4.Size = New System.Drawing.Size(601, 288)
Me.TabPage4.TabIndex = 3
Me.TabPage4.Text = "MODAL"
Me.TabPage4.UseVisualStyleBackColor = True
'
'Button46
'
Me.Button46.Location = New System.Drawing.Point(221, 42)
Me.Button46.Name = "Button46"
Me.Button46.Size = New System.Drawing.Size(145, 49)
Me.Button46.TabIndex = 67
Me.Button46.Text = "NCTS TEST Senden"
Me.Button46.UseVisualStyleBackColor = True
'
'tctModalTEstLRN
'
Me.tctModalTEstLRN.Location = New System.Drawing.Point(24, 16)
Me.tctModalTEstLRN.Name = "tctModalTEstLRN"
Me.tctModalTEstLRN.Size = New System.Drawing.Size(145, 20)
Me.tctModalTEstLRN.TabIndex = 66
Me.tctModalTEstLRN.Text = "LRN"
'
'Button45
'
Me.Button45.Location = New System.Drawing.Point(24, 42)
Me.Button45.Name = "Button45"
Me.Button45.Size = New System.Drawing.Size(145, 49)
Me.Button45.TabIndex = 16
Me.Button45.Text = "IMPORT TEST Senden"
Me.Button45.UseVisualStyleBackColor = True
'
'TabPage5
'
Me.TabPage5.Controls.Add(Me.Button48)
Me.TabPage5.Controls.Add(Me.Button47)
Me.TabPage5.Location = New System.Drawing.Point(4, 22)
Me.TabPage5.Name = "TabPage5"
Me.TabPage5.Padding = New System.Windows.Forms.Padding(3)
Me.TabPage5.Size = New System.Drawing.Size(601, 288)
Me.TabPage5.TabIndex = 4
Me.TabPage5.Text = "Teleotec"
Me.TabPage5.UseVisualStyleBackColor = True
'
'Button47
'
Me.Button47.Location = New System.Drawing.Point(20, 24)
Me.Button47.Name = "Button47"
Me.Button47.Size = New System.Drawing.Size(145, 49)
Me.Button47.TabIndex = 62
Me.Button47.Text = "getTAD"
Me.Button47.UseVisualStyleBackColor = True
'
'Button18
'
Me.Button18.Location = New System.Drawing.Point(59, 183)
@@ -1141,21 +1228,14 @@ Partial Class usrctlProcedures
Me.DataGridViewTextBoxColumn2.HeaderText = "anz"
Me.DataGridViewTextBoxColumn2.Name = "DataGridViewTextBoxColumn2"
'
'txtHMRCApplName
'Button48
'
Me.txtHMRCApplName.Location = New System.Drawing.Point(437, 71)
Me.txtHMRCApplName.Name = "txtHMRCApplName"
Me.txtHMRCApplName.Size = New System.Drawing.Size(159, 20)
Me.txtHMRCApplName.TabIndex = 79
'
'Label16
'
Me.Label16.AutoSize = True
Me.Label16.Location = New System.Drawing.Point(434, 58)
Me.Label16.Name = "Label16"
Me.Label16.Size = New System.Drawing.Size(169, 13)
Me.Label16.TabIndex = 80
Me.Label16.Text = "fremde HMRC Application (Name):"
Me.Button48.Location = New System.Drawing.Point(209, 24)
Me.Button48.Name = "Button48"
Me.Button48.Size = New System.Drawing.Size(145, 49)
Me.Button48.TabIndex = 63
Me.Button48.Text = "getTAD File"
Me.Button48.UseVisualStyleBackColor = True
'
'usrctlProcedures
'
@@ -1226,6 +1306,9 @@ Partial Class usrctlProcedures
CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit()
Me.TabPage2.ResumeLayout(False)
Me.TabPage2.PerformLayout()
Me.TabPage4.ResumeLayout(False)
Me.TabPage4.PerformLayout()
Me.TabPage5.ResumeLayout(False)
Me.ResumeLayout(False)
Me.PerformLayout()
@@ -1339,4 +1422,11 @@ Partial Class usrctlProcedures
Friend WithEvents Button44 As Button
Friend WithEvents Label16 As Label
Friend WithEvents txtHMRCApplName As TextBox
Friend WithEvents TabPage4 As TabPage
Friend WithEvents tctModalTEstLRN As TextBox
Friend WithEvents Button45 As Button
Friend WithEvents Button46 As Button
Friend WithEvents TabPage5 As TabPage
Friend WithEvents Button47 As Button
Friend WithEvents Button48 As Button
End Class

View File

@@ -123,10 +123,4 @@
<metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

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