UID-Prüfung (Mehrfachabfragen derselben UID wird nun unterbunden).
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Reflection
|
||||
Imports System.Threading
|
||||
Imports VERAG_PROG_ALLGEMEIN.UIDPruefung
|
||||
'Imports SDL.eu.europa.ec
|
||||
|
||||
@@ -183,6 +184,10 @@ Public Class cUIDPruefung
|
||||
d.ColumnName = "Error-Code"
|
||||
dt.Columns.Add(d)
|
||||
|
||||
Dim e As New DataColumn
|
||||
e.ColumnName = "Error-Text"
|
||||
dt.Columns.Add(e)
|
||||
|
||||
|
||||
'------------------------------------------------
|
||||
'ENTWEDER ÜBER EU-KOMISSION ODER FINANZONLINE::::
|
||||
@@ -215,26 +220,47 @@ Public Class cUIDPruefung
|
||||
|
||||
For Each r As DataRow In dt.Rows
|
||||
|
||||
counter += 1
|
||||
If IsDBNull(r("Ergebnis")) Then
|
||||
|
||||
Dim errorCode = -99
|
||||
Dim UID_TMP = FO.Call_Web_Service_MethodUID_Abfrage_NEU2020(r("KdNr"),, SaveErgInAdressen, showErr,, errorCode)
|
||||
If UID_TMP IsNot Nothing Then
|
||||
If UID_TMP.uid_valid Then
|
||||
r("Ergebnis") = "OK"
|
||||
counter += 1
|
||||
Dim errorCode = -99
|
||||
Dim UID_TMP = FO.Call_Web_Service_MethodUID_Abfrage_NEU2020(r("KdNr"),, SaveErgInAdressen, showErr,, errorCode)
|
||||
If UID_TMP IsNot Nothing Then
|
||||
If UID_TMP.uid_valid Then
|
||||
r("Ergebnis") = "OK"
|
||||
|
||||
For Each row As DataRow In dt.Select("UstIdnr = '" & r("UstIdnr") & "'")
|
||||
row("Ergebnis") = r("Ergebnis")
|
||||
Next
|
||||
|
||||
Else
|
||||
r("Ergebnis") = "UNGÜLTIG"
|
||||
For Each row As DataRow In dt.Select("UstIdnr = '" & r("UstIdnr") & "'")
|
||||
row("Ergebnis") = r("Ergebnis")
|
||||
Next
|
||||
End If
|
||||
Else
|
||||
r("Ergebnis") = "UNGÜLTIG"
|
||||
r("Ergebnis") = "ERROR"
|
||||
r("Error-Code") = errorCode.ToString()
|
||||
r("Error-Text") = FO.GetCodeText(errorCode)
|
||||
|
||||
For Each row As DataRow In dt.Select("UstIdnr = '" & r("UstIdnr") & "'")
|
||||
row("Ergebnis") = r("Ergebnis")
|
||||
row("Error-Code") = r("Error-Code")
|
||||
row("Error-Text") = r("Error-Text")
|
||||
Next
|
||||
|
||||
End If
|
||||
Else
|
||||
r("Ergebnis") = "ERROR"
|
||||
r("Error-Code") = errorCode.ToString()
|
||||
|
||||
End If
|
||||
|
||||
If counter Mod 100 = 0 Then
|
||||
FO.Call_Web_Service_MethodUID_Logout_NEU2020()
|
||||
Thread.Sleep(2000)
|
||||
FO.Call_Web_Service_MethodUID_Login_NEU2020()
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
|
||||
FO.Call_Web_Service_MethodUID_Logout_NEU2020()
|
||||
|
||||
Reference in New Issue
Block a user