VERAG_CustomsDeclarations, einheitliches Datenmodell IMPORT + Rountinemanager Anpassung

This commit is contained in:
2026-01-01 00:55:46 +01:00
parent eab90bc81a
commit ff7682582d
12 changed files with 1564 additions and 304 deletions

View File

@@ -637,6 +637,48 @@ Public Class cTelotec_Anmeldung
End Function
Shared Function LOADByCRN(telanm_CRN As String, Optional loadALL As Boolean = True) As cTelotec_Anmeldung
Try
Dim NCTS As New cTelotec_Anmeldung
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
If loadALL Then
NCTS.POSITIONSDATEN.Clear()
NCTS.SICHERHEIT.Clear()
NCTS.ABGABEN.Clear()
End If
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
Using cmd As New SqlCommand("SELECT TOP 1 * FROM tblTelotec_Anmeldung WHERE telanm_CRN=@telanm_CRN ", conn)
cmd.Parameters.AddWithValue("@telanm_CRN", telanm_CRN)
Dim dr = cmd.ExecuteReader()
If dr.Read Then
For Each l In NCTS.getParameterList()
Dim propInfo As PropertyInfo = NCTS.GetType.GetProperty(l.Scalarvariable)
If dr.Item(l.Text) Is DBNull.Value Then
propInfo.SetValue(NCTS, Nothing)
Else
propInfo.SetValue(NCTS, dr.Item(l.Text))
End If
Next
If loadALL Then
NCTS.LOAD_Positionsdaten()
NCTS.LOAD_Sicherheit()
NCTS.LOAD_Abgaben()
End If
dr.Close()
Return NCTS
End If
dr.Close()
End Using
End Using
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return Nothing
End Function
Shared Function LOADByBezugsNr(bezugsNr As String, Optional MsgType As String = "", Optional loadALL As Boolean = True) As cTelotec_Anmeldung
Try
Dim NCTS As New cTelotec_Anmeldung