API norsware
This commit is contained in:
@@ -90,7 +90,7 @@
|
|||||||
<SignAssembly>false</SignAssembly>
|
<SignAssembly>false</SignAssembly>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<AssemblyOriginatorKeyFile>SDL_TemporaryKey.pfx</AssemblyOriginatorKeyFile>
|
<AssemblyOriginatorKeyFile>Test.pfx</AssemblyOriginatorKeyFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Accessibility" />
|
<Reference Include="Accessibility" />
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
Imports System.Net
|
Imports System.Net
|
||||||
|
Imports Chilkat
|
||||||
Imports iTextSharp.text.pdf.codec.wmf
|
Imports iTextSharp.text.pdf.codec.wmf
|
||||||
Imports Newtonsoft.Json.Linq
|
Imports Newtonsoft.Json.Linq
|
||||||
|
Imports VERAG_PROG_ALLGEMEIN.cCreditSafeAPI
|
||||||
|
|
||||||
Public Class cNorsware
|
Public Class cNorsware
|
||||||
|
|
||||||
@@ -237,14 +239,14 @@ Public Class cNorsware
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Shared Function getData(authenticationToken As String, acceptContentType As String, ByRef groupID As String) As String
|
Shared Function getData(authenticationToken As String, acceptContentType As String, ByRef groupID As String, ByRef doc As digitDocumnent) As String
|
||||||
|
|
||||||
VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat()
|
VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat()
|
||||||
|
|
||||||
Dim rest As New Chilkat.Rest
|
Dim rest As New Chilkat.Rest
|
||||||
Dim success As Boolean
|
Dim success As Boolean
|
||||||
|
|
||||||
Dim json As Chilkat.JsonObject
|
|
||||||
|
|
||||||
|
|
||||||
Dim bTls As Boolean = False
|
Dim bTls As Boolean = False
|
||||||
@@ -270,8 +272,63 @@ Public Class cNorsware
|
|||||||
Return rest.LastErrorText
|
Return rest.LastErrorText
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'Dim doc = New digitDocumnent()
|
||||||
|
Dim json As New Chilkat.JsonObject
|
||||||
|
success = json.Load(jsonResponseStr)
|
||||||
|
If (success <> True) Then
|
||||||
|
Debug.WriteLine(json.LastErrorText)
|
||||||
|
Return "Verbindungsfehler"
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
doc.abs = json.StringOf("gondericiUnvan")
|
||||||
|
doc.absNr = json.StringOf("gondericiVergiNo")
|
||||||
|
doc.absAdresse = json.StringOf("gondericiAdres")
|
||||||
|
doc.absStadt = json.StringOf("gondericiSehirUlke")
|
||||||
|
|
||||||
|
doc.empf = json.StringOf("aliciUnvan")
|
||||||
|
'doc.empfNr = json.StringOf("gondericiVergiNo")
|
||||||
|
doc.empfAdresse = json.StringOf("aliciAdres")
|
||||||
|
doc.empfStadt = json.StringOf("aliciSehirUlke")
|
||||||
|
|
||||||
|
doc.MRN = json.StringOf("ihracatBeyanNumarasi")
|
||||||
|
doc.pos = json.StringOf("kalemSayisi")
|
||||||
|
doc.pkgSum = json.StringOf("toplamKapAdet")
|
||||||
|
doc.mass = json.StringOf("toplamBrut")
|
||||||
|
doc.totalAmount = json.StringOf("toplamFaturaBedeli")
|
||||||
|
|
||||||
|
|
||||||
|
Dim positions As Chilkat.JsonArray = json.ArrayOf("entityIslenmisVeriEk")
|
||||||
|
If (json.LastMethodSuccess = False) Then
|
||||||
|
'Return "positions not found."
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim numPositions As Integer = positions.Size
|
||||||
|
|
||||||
|
Dim j As Integer = 0
|
||||||
|
While j < numPositions
|
||||||
|
|
||||||
|
Dim posObj As Chilkat.JsonObject = positions.ObjectAt(j)
|
||||||
|
|
||||||
|
Dim R As DataRow = doc.positonTable.NewRow
|
||||||
|
R("esyaTanim") = posObj.StringOf("esyaTanim")
|
||||||
|
R("gtip") = posObj.StringOf("gtip")
|
||||||
|
R("kapAdet") = posObj.IntOf("kapAdet")
|
||||||
|
R("kalemFiyati") = posObj.StringOf("kalemFiyati")
|
||||||
|
R("brut") = posObj.IntOf("brut")
|
||||||
|
R("net") = posObj.StringOf("net")
|
||||||
|
R("parcalimi") = posObj.BoolOf("parcalimi")
|
||||||
|
R("id") = posObj.StringOf("id")
|
||||||
|
R("kayitTarihi") = posObj.StringOf("kayitTarihi")
|
||||||
|
|
||||||
|
doc.positonTable.Rows.Add(R)
|
||||||
|
|
||||||
|
j = j + 1
|
||||||
|
|
||||||
|
|
||||||
|
End While
|
||||||
|
|
||||||
Return jsonResponseStr
|
Return jsonResponseStr
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
@@ -281,3 +338,28 @@ Public Class cNorsware
|
|||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
Public Class digitDocumnent
|
||||||
|
|
||||||
|
Public Property abs As String
|
||||||
|
Public Property absNr As String
|
||||||
|
Public Property absAdresse As String
|
||||||
|
Public Property absStadt As String
|
||||||
|
Public Property empf As String
|
||||||
|
Public Property empfNr As String
|
||||||
|
Public Property empfAdresse As String
|
||||||
|
Public Property empfStadt As String
|
||||||
|
Public Property MRN As String
|
||||||
|
Public Property pos As Integer
|
||||||
|
Public Property pkgSum As Integer
|
||||||
|
Public Property mass As Double
|
||||||
|
Public Property totalAmount As String
|
||||||
|
Public Property positonTable As DataTable
|
||||||
|
|
||||||
|
|
||||||
|
Public Sub New(dt As DataTable)
|
||||||
|
positonTable = dt
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user