kundenubersicht, etc.

This commit is contained in:
2026-04-21 10:57:49 +02:00
parent 63fec5fa9f
commit aa6be2876b
2 changed files with 23 additions and 2 deletions

View File

@@ -3370,7 +3370,14 @@ Public Class usrCntlKundenuebersicht
Dim withPDF As Boolean = True '#wenn PDF und JSON in einem geht withPDF aus true! Dim withPDF As Boolean = True '#wenn PDF und JSON in einem geht withPDF aus true!
Dim failureDesc As String = cs.getReport(company, withPDF) Dim failureDesc As String = ""
If withPDF Then
cs.getReport(company, withPDF, pdfObject)
Else
cs.getReport(company, withPDF, Nothing)
End If
If failureDesc <> "" Then If failureDesc <> "" Then
MsgBox(failureDesc) MsgBox(failureDesc)
Cursor = Cursors.Default Cursor = Cursors.Default

View File

@@ -5,6 +5,7 @@ Imports System.Net
Imports System.Reflection Imports System.Reflection
Imports System.Text.RegularExpressions Imports System.Text.RegularExpressions
Imports System.Threading Imports System.Threading
Imports iTextSharp.text.pdf
Public Class cCreditSafeAPI Public Class cCreditSafeAPI
@@ -1111,7 +1112,7 @@ Public Class cCreditSafeAPI
End Sub End Sub
Shared Function getReport(ByRef company As Company, withPDF As Boolean) As String 'Shared Function getReport(ByRef company As Company, withPDF As Boolean, ByRef bytes As Byte()) As String Shared Function getReport(ByRef company As Company, withPDF As Boolean, Optional ByRef bytes As Byte() = Nothing) As String
Dim failureDesc As String = "" Dim failureDesc As String = ""
Dim myUrl As String = API_STRING & "/v1/companies/" & company.creditSafeId & "/" Dim myUrl As String = API_STRING & "/v1/companies/" & company.creditSafeId & "/"
If company.country = "DE" Then If company.country = "DE" Then
@@ -1289,6 +1290,19 @@ Public Class cCreditSafeAPI
company.csFailure = json.StringOf("details") company.csFailure = json.StringOf("details")
End If End If
If jsonRespString IsNot Nothing Then
Dim PDFReport As Chilkat.JsonObject = json.ObjectOf("pdfReportStream")
Dim pdfString = json.StringOf("pdfReportStream")
Dim pdfData2 As New Chilkat.BinData
success = pdfData2.AppendEncoded(pdfString, "base64")
If success Then
bytes = pdfData2.GetBinary
End If
Return failureDesc
End If
Return failureDesc Return failureDesc
End Function End Function