Laufzettel; EZABestätigung, Kafka, CBAM, KVI Report
This commit is contained in:
@@ -23,8 +23,8 @@ Public Class cATEZ_Greenpulse_KafkaDecs
|
||||
'== Kafka: Konfiguration (Klassenebene)
|
||||
'========================
|
||||
Public Shared BootstrapServers As String = "192.168.85.250:9092" 'http://192.168.85.250:8888
|
||||
' Public Shared TopicName As String = "greenpulse.declarationdata.v1"
|
||||
Public Shared TopicName As String = "dev.greenpulse.declarationdata.v1"
|
||||
Public Shared TopicName As String = "greenpulse.declarationdata.v1"
|
||||
' Public Shared TopicName As String = "dev.greenpulse.declarationdata.v1"
|
||||
' Falls SASL/TLS benötigt:
|
||||
Public Shared UseSasl As Boolean = False
|
||||
Public Shared SaslUsername As String = ""
|
||||
|
||||
@@ -381,6 +381,46 @@ Public Class cVERAG_CustomsDeclarations
|
||||
Return ZA
|
||||
End Function
|
||||
|
||||
|
||||
Public Shared Function loadBySendungsID(za_SendungsId As String, loadall As Boolean) As cVERAG_CustomsDeclarations
|
||||
Dim ZA As New cVERAG_CustomsDeclarations
|
||||
If If(za_SendungsId, "") = "" Then Return ZA
|
||||
Try
|
||||
ZA.hasEntry = False
|
||||
Using conn = SQL.GetNewOpenConnectionFMZOLL()
|
||||
Using cmd As New SqlCommand(
|
||||
"SELECT * FROM tblVERAG_CustomsDeclarations WHERE za_SendungsId=@_BASE_id", conn)
|
||||
|
||||
cmd.Parameters.AddWithValue("@_BASE_id", za_SendungsId)
|
||||
Dim dr = cmd.ExecuteReader()
|
||||
If dr.Read Then
|
||||
For Each li In ZA.getParameterList()
|
||||
Dim pi = ZA.GetType.GetProperty(li.Scalarvariable)
|
||||
If dr.Item(li.Text) Is DBNull.Value Then
|
||||
pi.SetValue(ZA, Nothing)
|
||||
Else
|
||||
pi.SetValue(ZA, dr.Item(li.Text))
|
||||
End If
|
||||
Next
|
||||
ZA.hasEntry = True
|
||||
End If
|
||||
dr.Close()
|
||||
End Using
|
||||
End Using
|
||||
If loadall Then
|
||||
|
||||
ZA.Parties = cVERAG_CustomsDeclarations_Parties.LOAD_BY_ZAID(ZA.za_Id)
|
||||
ZA.Items = cVERAG_CustomsDeclarations_Item.LOAD_BY_ZAID(ZA.za_Id)
|
||||
ZA.Duties = cVERAG_CustomsDeclarations_Duty.LOAD_BY_ZAID(ZA.za_Id)
|
||||
ZA.Documents = cVERAG_CustomsDeclarations_Document.LOAD_HEAD_BY_ZAID(ZA.za_Id)
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
cErrorHandler.ERR(ex.Message, ex.StackTrace, MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
Return ZA
|
||||
End Function
|
||||
|
||||
Public Sub checkfreshCBAMWarning()
|
||||
Try
|
||||
Dim CBAM_ITEMS As New List(Of cVERAG_CustomsDeclarations_Item)
|
||||
@@ -1315,5 +1355,3 @@ Public Class cVERAG_CustomsDeclarations_Document
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -43,6 +43,54 @@ Public Class cProgramFunctions
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Public Shared Function ExpandNumbers(input As String) As String
|
||||
If String.IsNullOrWhiteSpace(input) Then Return ""
|
||||
|
||||
Dim result As New HashSet(Of Integer)
|
||||
|
||||
Dim parts = input.Split(","c)
|
||||
|
||||
For Each part In parts
|
||||
Dim p = part.Trim()
|
||||
|
||||
If p.Contains("-") Then
|
||||
' Range z.B. 8-10
|
||||
Dim r = p.Split("-"c)
|
||||
If r.Length = 2 Then
|
||||
Dim startVal, endVal As Integer
|
||||
If Integer.TryParse(r(0), startVal) AndAlso Integer.TryParse(r(1), endVal) Then
|
||||
For i = startVal To endVal
|
||||
result.Add(i)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
ElseIf p.Contains("+") OrElse p.Contains("&") Then
|
||||
' Mehrere Werte z.B. 5+7 oder 2&10
|
||||
Dim separators() As Char = {"+"c, "&"c}
|
||||
Dim nums = p.Split(separators, StringSplitOptions.RemoveEmptyEntries)
|
||||
|
||||
For Each Numb In nums
|
||||
Dim val As Integer
|
||||
If Integer.TryParse(Numb.Trim(), val) Then
|
||||
result.Add(val)
|
||||
End If
|
||||
Next
|
||||
|
||||
Else
|
||||
' Einzelwert
|
||||
Dim val As Integer
|
||||
If Integer.TryParse(p, val) Then
|
||||
result.Add(val)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
' Sortiert zurückgeben
|
||||
Return String.Join(",", result.OrderBy(Function(x) x))
|
||||
|
||||
End Function
|
||||
Public Shared Function printdefaultOutlookAccount(outlookApp As Outlook.Application) As String
|
||||
|
||||
' Get the MAPI namespace
|
||||
|
||||
Reference in New Issue
Block a user