cbam
This commit is contained in:
@@ -224,8 +224,9 @@ Public Class cVERAG_CustomsDeclarations
|
||||
' ------------------------------------------------------------
|
||||
' CBAM Pattern (HSCode)
|
||||
' ------------------------------------------------------------
|
||||
Dim cbamWhere As String =
|
||||
VERAG_PROG_ALLGEMEIN.cGreendeal_CBAM_Trn.BuildCBAMPatternWhereClause("i.zaItem_HSCode")
|
||||
Dim cbamWhere As String = VERAG_PROG_ALLGEMEIN.cGreendeal_CBAM_Trn.BuildCBAMPatternWhereClause("i.zaItem_HSCode")
|
||||
Dim cbamWhereSnd As String = " AND " & cbamWhere.Replace("i.zaItem_HSCode", "zaItem_HSCode")
|
||||
|
||||
|
||||
' ------------------------------------------------------------
|
||||
' SQL: ZA-IDs ermitteln
|
||||
@@ -263,6 +264,7 @@ Public Class cVERAG_CustomsDeclarations
|
||||
If CustomsSystem <> "" Then
|
||||
sqlstr &= " AND z.za_System = @sys "
|
||||
End If
|
||||
|
||||
Using conn = SQL.GetNewOpenConnectionFMZOLL()
|
||||
Using cmd As New SqlCommand(sqlstr, conn)
|
||||
|
||||
@@ -306,7 +308,7 @@ Public Class cVERAG_CustomsDeclarations
|
||||
' ------------------------------------------------
|
||||
If loadAll Then
|
||||
CD.Parties = cVERAG_CustomsDeclarations_Parties.LOAD_BY_ZAID(CD.za_Id)
|
||||
CD.Items = cVERAG_CustomsDeclarations_Item.LOAD_BY_ZAID(CD.za_Id)
|
||||
CD.Items = cVERAG_CustomsDeclarations_Item.LOAD_BY_ZAID(CD.za_Id, cbamWhereSnd)
|
||||
CD.Duties = cVERAG_CustomsDeclarations_Duty.LOAD_BY_ZAID(CD.za_Id)
|
||||
CD.Documents = cVERAG_CustomsDeclarations_Document.LOAD_HEAD_BY_ZAID(CD.za_Id)
|
||||
End If
|
||||
@@ -988,7 +990,7 @@ Public Class cVERAG_CustomsDeclarations_Item
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Shared Function LOAD_BY_ZAID(zaId As Integer) As List(Of cVERAG_CustomsDeclarations_Item)
|
||||
Public Shared Function LOAD_BY_ZAID(zaId As Integer, Optional where As String = "") As List(Of cVERAG_CustomsDeclarations_Item)
|
||||
|
||||
Dim result As New List(Of cVERAG_CustomsDeclarations_Item)
|
||||
|
||||
@@ -996,8 +998,7 @@ Public Class cVERAG_CustomsDeclarations_Item
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||
|
||||
Using cmd As New SqlCommand(
|
||||
"SELECT * FROM tblVERAG_CustomsDeclarations_Items WHERE zaItem_zaId=@zaId",
|
||||
conn)
|
||||
"SELECT * FROM tblVERAG_CustomsDeclarations_Items WHERE zaItem_zaId=@zaId " & where, conn)
|
||||
|
||||
cmd.Parameters.AddWithValue("@zaId", zaId)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user