LeistungenFIBU, Abrechungsmaske, ZE-Buttons, creditsafe, bugfix PLOSE (bei Rechnungsausgang)
This commit is contained in:
@@ -298,6 +298,75 @@ Public Class cCreditSafeAPI
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Shared Function getCompanieEvents(company As Company, ByRef dataTable As DataTable) As String
|
||||
|
||||
VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat()
|
||||
|
||||
Dim failureDesc As String
|
||||
Dim myUrl As String = API_STRING & "/v1/monitoring/companies/" & company.creditSafeId & "/events"
|
||||
Dim jsonRespString = SendGetRequestWithAuthHeader(myUrl, company, "application/json", "GET", token, failureDesc)
|
||||
|
||||
|
||||
Dim json As New Chilkat.JsonObject
|
||||
Dim success As Boolean = json.Load(jsonRespString)
|
||||
If (success <> True) Then
|
||||
Debug.WriteLine(json.LastErrorText)
|
||||
Return "Verbindungsfehler"
|
||||
End If
|
||||
|
||||
Dim num As Integer = json.SizeOfArray("data")
|
||||
If num = 0 Then
|
||||
Return json.StringOf("totalCount")
|
||||
End If
|
||||
|
||||
Dim companieData As Chilkat.JsonArray = json.ArrayOf("data")
|
||||
If (json.LastMethodSuccess = False) Then
|
||||
Return "data not found."
|
||||
End If
|
||||
|
||||
Dim numCompanies As Integer = companieData.Size
|
||||
|
||||
For i = 0 To 1
|
||||
|
||||
|
||||
Dim j As Integer = 0
|
||||
While j < numCompanies
|
||||
|
||||
Dim compObj As Chilkat.JsonObject = companieData.ObjectAt(j)
|
||||
|
||||
Dim index = companieData.FindString("eventId", False)
|
||||
|
||||
Dim dateTime As New Chilkat.CkDateTime
|
||||
Dim dt As New Chilkat.DtObj
|
||||
Dim getAsLocal As Boolean = False
|
||||
|
||||
success = compObj.DateOf("eventDate", dateTime)
|
||||
success = compObj.DateOf("createdDate", dateTime)
|
||||
Debug.WriteLine(dateTime.GetAsTimestamp(getAsLocal))
|
||||
|
||||
|
||||
Dim R As DataRow = dataTable.NewRow
|
||||
R("eventId") = compObj.StringOf("eventId")
|
||||
R("companyId") = compObj.StringOf("companyId")
|
||||
R("portfolioId") = compObj.StringOf("portfolioId")
|
||||
R("ruleName") = compObj.StringOf("ruleName")
|
||||
R("localEventCode") = compObj.StringOf("localEventCode")
|
||||
R("globalEventCode") = compObj.StringOf("globalEventCode")
|
||||
R("newValue") = compObj.StringOf("newValue")
|
||||
R("oldValue") = compObj.StringOf("oldValue")
|
||||
R("eventDate") = dateTime.GetAsTimestamp(getAsLocal)
|
||||
R("createdDate") = dateTime.GetAsTimestamp(getAsLocal)
|
||||
dataTable.Rows.Add(R)
|
||||
|
||||
j = j + 1
|
||||
End While
|
||||
Next
|
||||
|
||||
Return "Anzahl gefundener Datensätze: " & numCompanies
|
||||
|
||||
End Function
|
||||
|
||||
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
|
||||
Dim failureDesc As String = ""
|
||||
Dim myUrl As String = API_STRING & "/v1/companies/" & company.creditSafeId & "/"
|
||||
|
||||
Reference in New Issue
Block a user