ATEZ & Fiskalübersicht

This commit is contained in:
2023-09-15 13:49:55 +02:00
parent 887a89a4e0
commit 2cf78e49dd
2 changed files with 12 additions and 6 deletions

View File

@@ -500,7 +500,7 @@ Public Class usrcntlFiskaluebersicht
End If
If txtWaren.Text = "" Then
txtWaren.Text = SQL.getValueTxtBySql("SELECT Top(1) [Bemerkungen] as Bemerkungen FROM [Speditionsbuch] WHERE " & kdNr & " In([AbsenderKundenNr], [EmpfängerKundenNr], [FrachtführerKundenNr], [VermittlerKundenNr], [EndempfängerKundenNr]) AND ISNULL(CAST([Bemerkungen] as NVARCHAR(max)),'') <> '' Order by Abfertigungsdatum desc", "FMZOLL")
txtWaren.Text = SQL.getValueTxtBySql("SELECT Top(1) [Packstücke] as Bemerkungen FROM [Speditionsbuch] WHERE " & kdNr & " In([AbsenderKundenNr], [EmpfängerKundenNr], [FrachtführerKundenNr], [VermittlerKundenNr], [EndempfängerKundenNr]) AND ISNULL(CAST([Bemerkungen] as NVARCHAR(max)),'') <> '' Order by Abfertigungsdatum desc", "FMZOLL")
End If
If txtUID.Text = "" Then

View File

@@ -5,6 +5,7 @@ Imports System.Threading
Imports System.Web.Routing
Imports System.Windows.Forms
Imports System.Windows.Forms.VisualStyles.VisualStyleElement
Imports Chilkat
Imports Newtonsoft.Json.Linq
Public Class cATEZ_NCTS_DATA
@@ -39,6 +40,7 @@ Public Class cATEZ_NCTS_DATA
Public Property dakosy_ref As String
Public Property selectedDocuments As String
Public Property fehlerbeschreibung As String
Public Property json As String
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
@@ -501,7 +503,9 @@ End Class
Public Class cATEZ_NCTS_IN
'DEV
Shared API_STRING As String = "https://dev-tds.singlewindow.io"
'Shared API_STRING As String = "https://dev-tds.singlewindow.io"
'PROD
Shared API_STRING As String = "https://transcom.singlewindow.io/"
Shared token As String = ""
Public dataTable As New DataTable()
Shared jsonData As New Chilkat.JsonObject
@@ -606,14 +610,14 @@ Public Class cATEZ_NCTS_IN
'rest.DebugMode = True
'rest.PercentDoneOnSend = True
rest.IdleTimeoutMs = 5000 * 16
rest.IdleTimeoutMs = 5000 * 31
rest.VerboseLogging = True
success = rest.SendReqSb("POST", "/api/integrations/verag", sbRequestBody)
Dim responseStatusCode = rest.ReadResponseHeader()
If (responseStatusCode < 0) Then
For i = 0 To 15 'Versuche den Header 16x abzufragen (funktioniert ab und zu nicht).
For i = 0 To 30 'Versuche den Header 16x abzufragen (funktioniert ab und zu nicht).
responseStatusCode = rest.ReadResponseHeader()
If responseStatusCode > 0 Then Exit For
Thread.Sleep(5000)
@@ -673,6 +677,7 @@ Public Class cATEZ_NCTS_IN
Shared Function setJson(ncts As cATEZ_NCTS_DATA)
jsonData.Clear()
ncts.json = ""
Dim success As Boolean
success = jsonData.UpdateString("VERAG_LRN", ncts.VERAG_LRN)
@@ -727,7 +732,6 @@ Public Class cATEZ_NCTS_IN
Dim i As Integer = 0
For Each r As DataGridViewRow In dgv.Rows
Dim isSelected = IIf(DBNull.Value Is r.Cells("anh_selekt").Value, False, r.Cells("anh_selekt").Value)
i = 0
If isSelected Then
Dim bd As New Chilkat.BinData
@@ -740,10 +744,12 @@ Public Class cATEZ_NCTS_IN
End If
Next
ncts.json &= jsonData.Emit()
Debug.WriteLine(jsonData.Emit())
Return success
End Function
End Class