Änderungen Fiskalübersicht und Creditsafe

This commit is contained in:
2023-05-26 15:55:53 +02:00
parent a508c89c3a
commit c0ebab418b
6 changed files with 247 additions and 123 deletions

View File

@@ -52,7 +52,7 @@ Public Class cFiskalkundenAnhaenge
Dim ANH_LIST = New List(Of cFiskalkundenAnhaenge)
ANH_LIST.Clear()
Dim SQL As New SQL
Dim dgv = SQL.loadDgvBySql("SELECT fka_id FROM [tblFiskalkundenAnhaenge] WHERE fka_KdNr=" & fka_KdNr & " And fka_fkId = " & fka_fkId & " And fka_Art = " & fka_Art & " ORDER BY fka_Datum desc", "AVISO")
Dim dgv = SQL.loadDgvBySql("SELECT fka_id FROM [tblFiskalkundenAnhaenge] WHERE fka_KdNr=" & fka_KdNr & " And fka_fkId = " & fka_fkId & " And fka_Art = '" & fka_Art & "'" & " ORDER BY fka_Datum desc", "AVISO")
If dgv IsNot Nothing Then
For Each r In dgv.Rows
@@ -145,12 +145,12 @@ Public Class cFiskalkundenAnhaenge
End Function
Public Function DELETE() As Boolean 'obj As Object, tablename As String, where As String) As Boolean
Dim sqlstr = " DELETE FROM [tblFiskalkundenAnhaenge] WITH(updlock,serializable) WHERE fka_id=" & Me.fka_id
Dim sqlstr = " DELETE FROM [tblFiskalkundenAnhaenge] WHERE fka_id=" & fka_id
Return SQL.doSQL(sqlstr, "AVISO")
End Function
Public Function DELETEALL(fka_KdNr As Integer, fka_fkId As Integer) As Boolean
Dim sqlstr = " DELETE FROM [tblFiskalkundenAnhaenge] WITH(updlock,serializable) WHERE fka_KdNr=" & Me.fka_KdNr & " and fka_fkId=" & Me.fka_fkId
Dim sqlstr = " DELETE FROM [tblFiskalkundenAnhaenge] WHERE fka_KdNr=" & fka_KdNr & " and fka_fkId=" & fka_fkId
Return SQL.doSQL(sqlstr, "AVISO")
End Function

View File

@@ -299,12 +299,12 @@ Public Class cCreditSafeAPI
If company.country = "DE" Then ' nur bei DE ausführen!
Dim companyAddInformObj As Chilkat.JsonObject = reportObj.ObjectOf("additionalInformation")
If (reportObj.LastMethodSuccess = True) Then
If (reportObj.LastMethodSuccess = True) And companyAddInformObj IsNot Nothing Then
Dim companyMiscObj As Chilkat.JsonObject = companyAddInformObj.ObjectOf("misc")
company.csBusinessPurpose = companyMiscObj.StringOf("businessPurpose")
If (companyAddInformObj.LastMethodSuccess = True) Then
Dim deCurrentRatingObj As Chilkat.JsonObject = companyMiscObj.ObjectOf("deCurrentRating")
If (companyAddInformObj.LastMethodSuccess = True) Then
If (companyAddInformObj.LastMethodSuccess = True) And deCurrentRatingObj IsNot Nothing Then
If (deCurrentRatingObj.LastMethodSuccess = True) Then
company.csIndex = deCurrentRatingObj.StringOf("value")
Else
@@ -320,10 +320,10 @@ Public Class cCreditSafeAPI
Dim companyIDObj As Chilkat.JsonObject = reportObj.ObjectOf("companyIdentification")
If (reportObj.LastMethodSuccess = True) Then
If (reportObj.LastMethodSuccess = True) And companyIDObj IsNot Nothing Then
Dim basicInfoObj As Chilkat.JsonObject = companyIDObj.ObjectOf("basicInformation")
If (companyIDObj.LastMethodSuccess = True) Then
If (companyIDObj.LastMethodSuccess = True) And basicInfoObj IsNot Nothing Then
Dim dateTime As New Chilkat.CkDateTime
Dim getAsLocal As Boolean = False
@@ -354,38 +354,41 @@ Public Class cCreditSafeAPI
If (reportObj.LastMethodSuccess = True) Then
Dim employeesInformationsArray As Chilkat.JsonArray = otherInformationObject.ArrayOf("employeesInformation")
If (otherInformationObject.LastMethodSuccess = True) Then
Dim employees As Chilkat.JsonObject = employeesInformationsArray.ObjectAt(0)
company.csSumEmployees = employees.StringOf("numberOfEmployees")
Else
Debug.WriteLine("otherInformationObject object not found.")
End If
If otherInformationObject IsNot Nothing Then
Dim bankersArray As Chilkat.JsonArray = otherInformationObject.ArrayOf("bankers")
If (otherInformationObject.LastMethodSuccess = True) Then
Dim bankers As Chilkat.JsonObject = bankersArray.ObjectAt(0)
company.csBank = bankers.StringOf("name") & " - " & bankers.StringOf("bankCode")
Else
Debug.WriteLine("otherInformationObject object not found.")
Dim employeesInformationsArray As Chilkat.JsonArray = otherInformationObject.ArrayOf("employeesInformation")
If (otherInformationObject.LastMethodSuccess = True) And employeesInformationsArray IsNot Nothing Then
Dim employees As Chilkat.JsonObject = employeesInformationsArray.ObjectAt(0)
company.csSumEmployees = employees.StringOf("numberOfEmployees")
Else
Debug.WriteLine("otherInformationObject object not found.")
End If
Dim bankersArray As Chilkat.JsonArray = otherInformationObject.ArrayOf("bankers")
If (otherInformationObject.LastMethodSuccess = True) And bankersArray IsNot Nothing Then
Dim bankers As Chilkat.JsonObject = bankersArray.ObjectAt(0)
company.csBank = bankers.StringOf("name") & " - " & bankers.StringOf("bankCode")
Else
Debug.WriteLine("otherInformationObject object not found.")
End If
End If
Dim creditRatingObj As Chilkat.JsonObject = creditScoreObj.ObjectOf("currentCreditRating")
If (creditScoreObj.LastMethodSuccess = True) Then
If (creditScoreObj.LastMethodSuccess = True) And creditRatingObj IsNot Nothing Then
company.csRiskclass = creditRatingObj.StringOf("commonValue")
Dim creditLimitObj As Chilkat.JsonObject = creditRatingObj.ObjectOf("creditLimit")
If (creditRatingObj.LastMethodSuccess = True) Then
If (creditRatingObj.LastMethodSuccess = True) And creditLimitObj IsNot Nothing Then
company.csMaxCreditAmount = creditLimitObj.StringOf("value")
Else
Debug.WriteLine("creditRating object not found.")
End If
Dim providerValueObj As Chilkat.JsonObject = creditRatingObj.ObjectOf("providerValue")
If (creditRatingObj.LastMethodSuccess = True) Then
If (creditRatingObj.LastMethodSuccess = True) And providerValueObj IsNot Nothing Then
company.csScore = providerValueObj.StringOf("value")
Else
Debug.WriteLine("providerValue object not found.")