Artikelstamm, EZA Vorlagen XLS, WiseApi
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports System.Web
|
||||
Imports System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel
|
||||
Imports Newtonsoft.Json
|
||||
Imports VERAG_PROG_ALLGEMEIN.cATEZ_Tariff
|
||||
@@ -27,6 +28,75 @@ Public Class cATEZ_Tariff
|
||||
Public Property description As String
|
||||
End Class
|
||||
|
||||
Public Shared Function GetFullTariff_Only1Result(commodityCode As String, fromCountry As String, Optional toCountry As String = "EU", Optional languageCode As String = "DE") As String
|
||||
Dim list As New List(Of String)
|
||||
list.Add(commodityCode)
|
||||
|
||||
Dim COMM_TARIFF = VERAG_PROG_ALLGEMEIN.cATEZ_Tariff.GetTariffInfo(list, fromCountry, toCountry)
|
||||
|
||||
Dim result = COMM_TARIFF.Find(Function(x) x.code = commodityCode)
|
||||
Dim found = False
|
||||
|
||||
If result IsNot Nothing Then
|
||||
If result.error <> "" Then
|
||||
'Error bei der Abfrage der TNR
|
||||
' MsgBox(result.error)
|
||||
|
||||
Else
|
||||
''Bei einem Ergebnis -> Treffer
|
||||
|
||||
If result.mappings.Count > 0 Then
|
||||
If result.mappings.Count = 1 Then
|
||||
found = True
|
||||
Return result.mappings(0).commodity_code
|
||||
Else
|
||||
|
||||
found = True
|
||||
Return "" ' -> problem
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
Public Shared Function GetFullTariff(commodityCode As String, fromCountry As String, Optional toCountry As String = "EU", Optional languageCode As String = "DE") As List(Of String)
|
||||
Dim Resultlist As New List(Of String)
|
||||
Dim list As New List(Of String)
|
||||
list.Add(commodityCode)
|
||||
|
||||
Dim COMM_TARIFF = VERAG_PROG_ALLGEMEIN.cATEZ_Tariff.GetTariffInfo(list, fromCountry, toCountry)
|
||||
|
||||
Dim result = COMM_TARIFF.Find(Function(x) x.code = commodityCode)
|
||||
Dim found = False
|
||||
|
||||
If result IsNot Nothing Then
|
||||
If result.error <> "" Then
|
||||
'Error bei der Abfrage der TNR
|
||||
' MsgBox(result.error)
|
||||
|
||||
Else
|
||||
''Bei einem Ergebnis -> Treffer
|
||||
|
||||
If result.mappings.Count > 0 Then
|
||||
If result.mappings.Count = 1 Then
|
||||
found = True
|
||||
Resultlist.Add(result.mappings(0).commodity_code)
|
||||
Else
|
||||
For Each item In result.mappings.OfType(Of VERAG_PROG_ALLGEMEIN.cATEZ_Tariff.cATEZ_TariffItem_Mapping)()
|
||||
If item.commodity_code IsNot Nothing AndAlso item.commodity_code <> "" Then
|
||||
Resultlist.Add(item.commodity_code)
|
||||
End If
|
||||
Next
|
||||
|
||||
found = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Return Resultlist
|
||||
End Function
|
||||
|
||||
Public Shared Function GetTariffInfo(commodities As List(Of String), fromCountry As String, Optional toCountry As String = "EU", Optional languageCode As String = "DE") As List(Of cATEZ_TariffItem_RootItem)
|
||||
Try
|
||||
VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat()
|
||||
|
||||
Reference in New Issue
Block a user