Imports System.Data.SqlClient
Imports System.Reflection

Public Class cDakosyNCTSOutAT

    Property nctsAt_Id As Integer
    Property nctsAt_Status As Object = DAKOSY_Worker.cDY_Statusliste.S_00
    Property nctsAt_Status_KEWILL_Equivalent As Object = DAKOSY_Worker.cDY_Statusliste.S_00
    Property nctsAt_dyaArt As String = ""
    Property nctsAt_dyaAnmID As Integer

    Property nctsAt_ANR As Object = Nothing
    Property nctsAt_MRN As Object = Nothing

    Property nctsAt_Erstellung As DateTime = Now
    Property nctsAt_Erstellung_SB As Object = Nothing
    Property nctsAt_LetzteBearbeitung As DateTime = Now
    Property nctsAt_LetzteBearbeitung_SB As Object = Nothing
    Property nctsAt_firma As Object = Nothing
    Property nctsAt_niederlassung As Object = Nothing


    Property nctsAt_Gestellt As Boolean = False
    Property nctsAt_GestelltAm As Object = Nothing
    Property nctsAt_Trans_Partner As Object = Nothing
    Property nctsAt_Trans_Div1 As Object = Nothing
    Property nctsAt_Trans_Div2 As Object = Nothing
    Property nctsAt_Trans_Div3 As Object = Nothing
    Property nctsAt_Trans_Referenz As Object = Nothing
    Property nctsAt_Trans_DatumZeit As DateTime = Now
    Property nctsAt_Trans_Version As Object = Nothing
    Property nctsAt_NachrichtenSenderTIN As Object = Nothing
    Property nctsAt_NachrichtenSenderNLNR As Object = Nothing
    Property nctsAt_NachrichtenempfaengerDST As Object = Nothing

    Property nctsAt_LRN As Object = Nothing 'ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
    Property nctsAt_BezugsnummerVorblendung As Object = Nothing
    Property nctsAt_Bearbeiter As Object = Nothing
    Property nctsAt_VersendungsLandCode As Object = Nothing
    Property nctsAt_BestimmungslandCode As Object = Nothing
    Property nctsAt_ArtAnmeldung As Object = Nothing
    Property nctsAt_BeladungsOrt As Object = Nothing

    Property nctsAt_DurchgangszollstelleDienststellnummer1 As Object = Nothing
    Property nctsAt_DurchgangszollstelleDienststellnummer2 As Object = Nothing
    Property nctsAt_DurchgangszollstelleDienststellnummer3 As Object = Nothing
    Property nctsAt_DurchgangszollstelleDienststellnummer4 As Object = Nothing
    Property nctsAt_DurchgangszollstelleDienststellnummer5 As Object = Nothing
    Property nctsAt_DurchgangszollstelleDienststellnummer6 As Object = Nothing
    Property nctsAt_DurchgangszollstelleDienststellnummer7 As Object = Nothing
    Property nctsAt_DurchgangszollstelleDienststellnummer8 As Object = Nothing
    Property nctsAt_DurchgangszollstelleDienststellnummer9 As Object = Nothing

    Property nctsAt_BestimmungsstelleDienststellennummer As Object = Nothing
    Property nctsAt_AbgangsDienststellennummer As Object = Nothing
    Property nctsAt_Wiedergestellungsdatum As Object = Nothing
    Property nctsAt_KzVereinfachtesVerfahren As Object = Nothing
    Property nctsAt_GesamtRohmasse As Object = Nothing
    Property nctsAt_GesamtAnzahlPackstuecke As Object = Nothing
    Property nctsAt_Verschluss_ArtCode As Object = Nothing
    Property nctsAt_Verschluss_Anzahl As Object = Nothing
    Property nctsAt_Verschluss_Zeichen1 As Object = Nothing
    Property nctsAt_Verschluss_Zeichen2 As Object = Nothing
    Property nctsAt_Verschluss_Zeichen3 As Object = Nothing
    Property nctsAt_Verschluss_Zeichen4 As Object = Nothing
    Property nctsAt_Verschluss_Zeichen5 As Object = Nothing
    Property nctsAt_Verschluss_Zeichen6 As Object = Nothing
    Property nctsAt_Verschluss_Zeichen7 As Object = Nothing
    Property nctsAt_Verschluss_Zeichen8 As Object = Nothing
    Property nctsAt_Verschluss_Zeichen9 As Object = Nothing
    Property nctsAt_Verschluss_Zeichen10 As Object = Nothing
    Property nctsAt_Verschluss_Zeichen11 As Object = Nothing
    Property nctsAt_Verschluss_Zeichen12 As Object = Nothing
    Property nctsAt_Verschluss_Zeichen13 As Object = Nothing
    Property nctsAt_Verschluss_Zeichen14 As Object = Nothing
    Property nctsAt_Verschluss_Zeichen15 As Object = Nothing
    Property nctsAt_Verschluss_Zeichen16 As Object = Nothing
    Property nctsAt_Befoerderungsmittel_KennzeichenAbgang As Object = Nothing
    Property nctsAt_Befoerderungsmittel_SttaszugehoerigkeitAbgangCode As Object = Nothing
    Property nctsAt_Befoerderungsmittel_VerkehrszweigGrenzueberschreitent As Object = Nothing
    Property nctsAt_Befoerderungsmittel_ArtGrenzueberschreitung As Object = Nothing
    Property nctsAt_Befoerderungsmittel_KennzeichenGrenzueberschreitend As Object = Nothing
    Property nctsAt_Befoerderungsmittel_StaatszugehoerigkeitGrenzueberschreitendCode As Object = Nothing
    Property nctsAt_Versender_EORI As Object = Nothing
    Property nctsAt_Versender_NLNR As Object = Nothing
    Property nctsAt_Versender_TIN As Object = Nothing
    Property nctsAt_Versender_Name As Object = Nothing
    Property nctsAt_Versender_StrasseHausnummer As Object = Nothing
    Property nctsAt_Versender_Ort As Object = Nothing
    Property nctsAt_Versender_PLZ As Object = Nothing
    Property nctsAt_Versender_Land As Object = Nothing
    Property nctsAt_Empfaenger_EORI As Object = Nothing
    Property nctsAt_Empfaenger_NLNR As Object = Nothing
    Property nctsAt_Empfaenger_TIN As Object = Nothing
    Property nctsAt_Empfaenger_Name As Object = Nothing
    Property nctsAt_Empfaenger_StrasseHausnummer As Object = Nothing
    Property nctsAt_Empfaenger_Ort As Object = Nothing
    Property nctsAt_Empfaenger_PLZ As Object = Nothing
    Property nctsAt_Empfaenger_Land As Object = Nothing
    Property nctsAt_Hauptverpflichteter_EORI As Object = Nothing
    Property nctsAt_Hauptverpflichteter_NLNR As Object = Nothing
    Property nctsAt_Hauptverpflichteter_TIN As Object = Nothing
    Property nctsAt_Hauptverpflichteter_Name As Object = Nothing
    Property nctsAt_Hauptverpflichteter_StrasseHausnummer As Object = Nothing
    Property nctsAt_Hauptverpflichteter_Ort As Object = Nothing
    Property nctsAt_Hauptverpflichteter_PLZ As Object = Nothing
    Property nctsAt_Hauptverpflichteter_Land As Object = Nothing
    Property nctsAt_ZugelassenerEmpfaenger_IDCarnet As Object = Nothing
    Property nctsAt_ZugelassenerEmpfaenger_BewilligungsnummerVersender As Object = Nothing
    Property nctsAt_ZugelassenerEmpfaenger_EORI As Object = Nothing
    Property nctsAt_ZugelassenerEmpfaenger_TIN As Object = Nothing

    Property nctsAt_SumA_KzSumASicherheit As Object = Nothing
    Property nctsAt_SumA_KennnummerSendung As Object = Nothing
    Property nctsAt_SumA_BesondereUmstaende As Object = Nothing
    Property nctsAt_SumA_NummerBefoerderung As Object = Nothing
    Property nctsAt_SumA_Ladeort As Object = Nothing
    Property nctsAt_SumA_Entladeort As Object = Nothing
    Property nctsAt_SumA_BefoerderungskostenZahlungsweise As Object = Nothing
    Property nctsAt_SumA_BefoerderungsrouteLand1 As Object = Nothing
    Property nctsAt_SumA_BefoerderungsrouteLand2 As Object = Nothing
    Property nctsAt_SumA_BefoerderungsrouteLand3 As Object = Nothing
    Property nctsAt_SumA_BefoerderungsrouteLand4 As Object = Nothing
    Property nctsAt_SumA_BefoerderungsrouteLand5 As Object = Nothing
    Property nctsAt_SumA_BefoerderungsrouteLand6 As Object = Nothing
    Property nctsAt_SumA_BefoerderungsrouteLand7 As Object = Nothing
    Property nctsAt_SumA_BefoerderungsrouteLand8 As Object = Nothing
    Property nctsAt_SumA_BefoerderungsrouteLand9 As Object = Nothing
    Property nctsAt_SumA_BefoerderungsrouteLand10 As Object = Nothing
    Property nctsAt_SumA_BefoerderungsrouteLand11 As Object = Nothing
    Property nctsAt_SumA_BefoerderungsrouteLand12 As Object = Nothing
    Property nctsAt_SumA_Versender_EORI As Object = Nothing
    Property nctsAt_SumA_Versender_NLNR As Object = Nothing
    Property nctsAt_SumA_Versender_TIN As Object = Nothing
    Property nctsAt_SumA_Versender_Name As Object = Nothing
    Property nctsAt_SumA_Versender_StrasseHausnummer As Object = Nothing
    Property nctsAt_SumA_Versender_Land As Object = Nothing
    Property nctsAt_SumA_Versender_PLZ As Object = Nothing
    Property nctsAt_SumA_Versender_Ort As Object = Nothing

    Property nctsAt_SumA_Empfaenger_EORI As Object = Nothing
    Property nctsAt_SumA_Empfaenger_NLNR As Object = Nothing
    Property nctsAt_SumA_Empfaenger_TIN As Object = Nothing
    Property nctsAt_SumA_Empfaenger_Name As Object = Nothing
    Property nctsAt_SumA_Empfaenger_StrasseHausnummer As Object = Nothing
    Property nctsAt_SumA_Empfaenger_Land As Object = Nothing
    Property nctsAt_SumA_Empfaenger_PLZ As Object = Nothing
    Property nctsAt_SumA_Empfaenger_Ort As Object = Nothing

    Property nctsAt_SumA_Befoerderer_EORI As Object = Nothing
    Property nctsAt_SumA_Befoerderer_NLNR As Object = Nothing
    Property nctsAt_SumA_Befoerderer_TIN As Object = Nothing
    Property nctsAt_SumA_Befoerderer_Name As Object = Nothing
    Property nctsAt_SumA_Befoerderer_StrasseHausnummer As Object = Nothing
    Property nctsAt_SumA_Befoerderer_Land As Object = Nothing
    Property nctsAt_SumA_Befoerderer_PLZ As Object = Nothing
    Property nctsAt_SumA_Befoerderer_Ort As Object = Nothing




    'NEU:
    Property nctsAt_AbgangSprachCode As Object = Nothing
    Property nctsAt_BegleitdokumentSprachCode As Object = Nothing
    Property nctsAt_BewilligungsnummerVersender As Object = Nothing
    Property nctsAt_Befoerderungsmittel_Datenverfügbarkeitsindikator As Object = Nothing
    Property nctsAt_GeschaeftsReferenznummer As Object = Nothing
    Property nctsAt_NummerDerBefoerderung As Object = Nothing
    Property nctsAt_AnmeldungAnzeigeDatum As Object = Nothing
    Property nctsAt_AnmeldungAnzeigeOrt As Object = Nothing
    Property nctsAt_AnmeldungAnzeigeSprachCode As Object = Nothing

    Property nctsAt_WarenartCode As Object = Nothing
    Property nctsAt_ZugelassenerWarenortCode As Object = Nothing
    Property nctsAt_Amtsplatz As Object = Nothing
    Property nctsAt_SumA_EntladeortSprachCode As Object = Nothing
    Property nctsAt_Befoerderungsmittel_VerkehrszweigInland As Object = Nothing
    Property nctsAt_Befoerderungsmittel_ArtAbgang As Object = Nothing
    Property nctsAt_Befoerderungsmittel_KennzeichenAbgangSprachCode As Object = Nothing
    Property nctsAt_Befoerderungsmittel_KennzeichenGrenzueberschreitendSprachCode As Object = Nothing
    Property nctsAt_Container As Object = Nothing
    Property nctsAt_Hauptverpflichteter_SprachCode As Object = Nothing
    Property nctsAt_versender_SprachCode As Object = Nothing
    Property nctsAt_empfaenger_SprachCode As Object = Nothing
    Property nctsAt_SumA_Versender_SprachCode As Object = Nothing
    Property nctsAt_SumA_empfaenger_SprachCode As Object = Nothing
    Property nctsAt_SumA_befoerderer_SprachCode As Object = Nothing

    Property nctsAt_Wirtschaftsbeteiligter_TIN As Object = Nothing
    Property nctsAt_Vertreter_RIN As Object = Nothing
    Property nctsAt_DurchgangszollstelleDienststelleAnkunft1 As Object = Nothing
    Property nctsAt_DurchgangszollstelleDienststelleAnkunft2 As Object = Nothing
    Property nctsAt_DurchgangszollstelleDienststelleAnkunft3 As Object = Nothing
    Property nctsAt_DurchgangszollstelleDienststelleAnkunft4 As Object = Nothing
    Property nctsAt_DurchgangszollstelleDienststelleAnkunft5 As Object = Nothing
    Property nctsAt_DurchgangszollstelleDienststelleAnkunft6 As Object = Nothing
    Property nctsAt_DurchgangszollstelleDienststelleAnkunft7 As Object = Nothing
    Property nctsAt_DurchgangszollstelleDienststelleAnkunft8 As Object = Nothing
    Property nctsAt_DurchgangszollstelleDienststelleAnkunft9 As Object = Nothing

    Property nctsAt_Verschluss_ZeichenSprachCode1 As Object = Nothing
    Property nctsAt_Verschluss_ZeichenSprachCode2 As Object = Nothing
    Property nctsAt_Verschluss_ZeichenSprachCode3 As Object = Nothing
    Property nctsAt_Verschluss_ZeichenSprachCode4 As Object = Nothing
    Property nctsAt_Verschluss_ZeichenSprachCode5 As Object = Nothing
    Property nctsAt_Verschluss_ZeichenSprachCode6 As Object = Nothing
    Property nctsAt_Verschluss_ZeichenSprachCode7 As Object = Nothing
    Property nctsAt_Verschluss_ZeichenSprachCode8 As Object = Nothing
    Property nctsAt_Verschluss_ZeichenSprachCode9 As Object = Nothing
    Property nctsAt_KontrolleErgebnisCode As Object = Nothing
    Property nctsAt_Gestellungsfrist As Object = Nothing





    Property nctsAt_SICHERHEITSANGABEN As New List(Of cDakosy_NCTSOutAT_Sicherheitsangaben)
    Property nctsAt_WARENPOS As New List(Of cDakosy_NCTSOutAT_Warenposition)


    Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL


    Sub New()

    End Sub

    Sub New(nctsAt_dyaAnmID As Integer, nctsAt_Erstellung_SB As Integer)
        Me.nctsAt_dyaAnmID = nctsAt_dyaAnmID
        Me.nctsAt_Erstellung_SB = nctsAt_Erstellung_SB
        Me.nctsAt_LetzteBearbeitung_SB = nctsAt_Erstellung_SB
    End Sub

    Sub New(nctsAt_Id)
        Me.nctsAt_Id = nctsAt_Id
        LOAD()
    End Sub

    Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
        Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Id", nctsAt_Id, , True, True))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Status", nctsAt_Status))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Status_KEWILL_Equivalent", nctsAt_Status_KEWILL_Equivalent))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_dyaArt", nctsAt_dyaArt))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_dyaAnmID", nctsAt_dyaAnmID))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_ANR", nctsAt_ANR))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_MRN", nctsAt_MRN))

        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Erstellung", nctsAt_Erstellung))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Erstellung_SB", nctsAt_Erstellung_SB))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_LetzteBearbeitung", nctsAt_LetzteBearbeitung))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_LetzteBearbeitung_SB", nctsAt_LetzteBearbeitung_SB))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_firma", nctsAt_firma))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_niederlassung", nctsAt_niederlassung))

        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Gestellt", nctsAt_Gestellt))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_GestelltAm", nctsAt_GestelltAm))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Trans_Partner", nctsAt_Trans_Partner))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Trans_Div1", nctsAt_Trans_Div1))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Trans_Div2", nctsAt_Trans_Div2))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Trans_Div3", nctsAt_Trans_Div3))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Trans_Referenz", nctsAt_Trans_Referenz))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Trans_DatumZeit", nctsAt_Trans_DatumZeit))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Trans_Version", nctsAt_Trans_Version))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_NachrichtenSenderTIN", nctsAt_NachrichtenSenderTIN))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_NachrichtenSenderNLNR", nctsAt_NachrichtenSenderNLNR))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_NachrichtenempfaengerDST", nctsAt_NachrichtenempfaengerDST))

        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_LRN", nctsAt_LRN))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_BezugsnummerVorblendung", nctsAt_BezugsnummerVorblendung))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Bearbeiter", nctsAt_Bearbeiter))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_VersendungsLandCode", nctsAt_VersendungsLandCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_BestimmungslandCode", nctsAt_BestimmungslandCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_ArtAnmeldung", nctsAt_ArtAnmeldung))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_BeladungsOrt", nctsAt_BeladungsOrt))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_DurchgangszollstelleDienststellnummer1", nctsAt_DurchgangszollstelleDienststellnummer1))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_DurchgangszollstelleDienststellnummer2", nctsAt_DurchgangszollstelleDienststellnummer2))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_DurchgangszollstelleDienststellnummer3", nctsAt_DurchgangszollstelleDienststellnummer3))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_DurchgangszollstelleDienststellnummer4", nctsAt_DurchgangszollstelleDienststellnummer4))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_DurchgangszollstelleDienststellnummer5", nctsAt_DurchgangszollstelleDienststellnummer5))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_DurchgangszollstelleDienststellnummer6", nctsAt_DurchgangszollstelleDienststellnummer6))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_DurchgangszollstelleDienststellnummer7", nctsAt_DurchgangszollstelleDienststellnummer7))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_DurchgangszollstelleDienststellnummer8", nctsAt_DurchgangszollstelleDienststellnummer8))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_DurchgangszollstelleDienststellnummer9", nctsAt_DurchgangszollstelleDienststellnummer9))


        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_BestimmungsstelleDienststellennummer", nctsAt_BestimmungsstelleDienststellennummer))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_AbgangsDienststellennummer", nctsAt_AbgangsDienststellennummer))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Wiedergestellungsdatum", nctsAt_Wiedergestellungsdatum))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_KzVereinfachtesVerfahren", nctsAt_KzVereinfachtesVerfahren))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_GesamtRohmasse", nctsAt_GesamtRohmasse))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_GesamtAnzahlPackstuecke", nctsAt_GesamtAnzahlPackstuecke))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Verschluss_ArtCode", nctsAt_Verschluss_ArtCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Verschluss_Anzahl", nctsAt_Verschluss_Anzahl))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Verschluss_Zeichen1", nctsAt_Verschluss_Zeichen1))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Verschluss_Zeichen2", nctsAt_Verschluss_Zeichen2))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Verschluss_Zeichen3", nctsAt_Verschluss_Zeichen3))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Verschluss_Zeichen4", nctsAt_Verschluss_Zeichen4))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Verschluss_Zeichen5", nctsAt_Verschluss_Zeichen5))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Verschluss_Zeichen6", nctsAt_Verschluss_Zeichen6))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Verschluss_Zeichen7", nctsAt_Verschluss_Zeichen7))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Verschluss_Zeichen8", nctsAt_Verschluss_Zeichen8))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Verschluss_Zeichen9", nctsAt_Verschluss_Zeichen9))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Verschluss_Zeichen10", nctsAt_Verschluss_Zeichen10))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Verschluss_Zeichen11", nctsAt_Verschluss_Zeichen11))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Verschluss_Zeichen12", nctsAt_Verschluss_Zeichen12))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Verschluss_Zeichen13", nctsAt_Verschluss_Zeichen13))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Verschluss_Zeichen14", nctsAt_Verschluss_Zeichen14))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Verschluss_Zeichen15", nctsAt_Verschluss_Zeichen15))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Verschluss_Zeichen16", nctsAt_Verschluss_Zeichen16))

        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Befoerderungsmittel_KennzeichenAbgang", nctsAt_Befoerderungsmittel_KennzeichenAbgang))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Befoerderungsmittel_SttaszugehoerigkeitAbgangCode", nctsAt_Befoerderungsmittel_SttaszugehoerigkeitAbgangCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Befoerderungsmittel_VerkehrszweigGrenzueberschreitent", nctsAt_Befoerderungsmittel_VerkehrszweigGrenzueberschreitent))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Befoerderungsmittel_ArtGrenzueberschreitung", nctsAt_Befoerderungsmittel_ArtGrenzueberschreitung))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Befoerderungsmittel_KennzeichenGrenzueberschreitend", nctsAt_Befoerderungsmittel_KennzeichenGrenzueberschreitend))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Befoerderungsmittel_StaatszugehoerigkeitGrenzueberschreitendCode", nctsAt_Befoerderungsmittel_StaatszugehoerigkeitGrenzueberschreitendCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Versender_EORI", nctsAt_Versender_EORI))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Versender_NLNR", nctsAt_Versender_NLNR))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Versender_TIN", nctsAt_Versender_TIN))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Versender_Name", nctsAt_Versender_Name))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Versender_StrasseHausnummer", nctsAt_Versender_StrasseHausnummer))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Versender_Ort", nctsAt_Versender_Ort))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Versender_PLZ", nctsAt_Versender_PLZ))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Versender_Land", nctsAt_Versender_Land))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Empfaenger_EORI", nctsAt_Empfaenger_EORI))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Empfaenger_NLNR", nctsAt_Empfaenger_NLNR))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Empfaenger_TIN", nctsAt_Empfaenger_TIN))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Empfaenger_Name", nctsAt_Empfaenger_Name))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Empfaenger_StrasseHausnummer", nctsAt_Empfaenger_StrasseHausnummer))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Empfaenger_Ort", nctsAt_Empfaenger_Ort))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Empfaenger_PLZ", nctsAt_Empfaenger_PLZ))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Empfaenger_Land", nctsAt_Empfaenger_Land))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Hauptverpflichteter_EORI", nctsAt_Hauptverpflichteter_EORI))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Hauptverpflichteter_NLNR", nctsAt_Hauptverpflichteter_NLNR))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Hauptverpflichteter_TIN", nctsAt_Hauptverpflichteter_TIN))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Hauptverpflichteter_Name", nctsAt_Hauptverpflichteter_Name))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Hauptverpflichteter_StrasseHausnummer", nctsAt_Hauptverpflichteter_StrasseHausnummer))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Hauptverpflichteter_Ort", nctsAt_Hauptverpflichteter_Ort))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Hauptverpflichteter_PLZ", nctsAt_Hauptverpflichteter_PLZ))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Hauptverpflichteter_Land", nctsAt_Hauptverpflichteter_Land))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_ZugelassenerEmpfaenger_IDCarnet", nctsAt_ZugelassenerEmpfaenger_IDCarnet))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_ZugelassenerEmpfaenger_BewilligungsnummerVersender", nctsAt_ZugelassenerEmpfaenger_BewilligungsnummerVersender))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_ZugelassenerEmpfaenger_EORI", nctsAt_ZugelassenerEmpfaenger_EORI))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_ZugelassenerEmpfaenger_TIN", nctsAt_ZugelassenerEmpfaenger_TIN))

        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_KzSumASicherheit", nctsAt_SumA_KzSumASicherheit))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_KennnummerSendung", nctsAt_SumA_KennnummerSendung))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_NummerBefoerderung", nctsAt_SumA_NummerBefoerderung))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_BesondereUmstaende", nctsAt_SumA_BesondereUmstaende))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_Ladeort", nctsAt_SumA_Ladeort))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_Entladeort", nctsAt_SumA_Entladeort))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_BefoerderungskostenZahlungsweise", nctsAt_SumA_BefoerderungskostenZahlungsweise))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_BefoerderungsrouteLand1", nctsAt_SumA_BefoerderungsrouteLand1))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_BefoerderungsrouteLand2", nctsAt_SumA_BefoerderungsrouteLand2))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_BefoerderungsrouteLand3", nctsAt_SumA_BefoerderungsrouteLand3))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_BefoerderungsrouteLand4", nctsAt_SumA_BefoerderungsrouteLand4))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_BefoerderungsrouteLand5", nctsAt_SumA_BefoerderungsrouteLand5))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_BefoerderungsrouteLand6", nctsAt_SumA_BefoerderungsrouteLand6))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_BefoerderungsrouteLand7", nctsAt_SumA_BefoerderungsrouteLand7))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_BefoerderungsrouteLand8", nctsAt_SumA_BefoerderungsrouteLand8))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_BefoerderungsrouteLand9", nctsAt_SumA_BefoerderungsrouteLand9))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_BefoerderungsrouteLand10", nctsAt_SumA_BefoerderungsrouteLand10))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_BefoerderungsrouteLand11", nctsAt_SumA_BefoerderungsrouteLand11))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_BefoerderungsrouteLand12", nctsAt_SumA_BefoerderungsrouteLand12))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_Versender_EORI", nctsAt_SumA_Versender_EORI))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_Versender_NLNR", nctsAt_SumA_Versender_NLNR))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_Versender_TIN", nctsAt_SumA_Versender_TIN))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_Versender_Name", nctsAt_SumA_Versender_Name))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_Versender_StrasseHausnummer", nctsAt_SumA_Versender_StrasseHausnummer))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_Versender_Land", nctsAt_SumA_Versender_Land))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_Versender_PLZ", nctsAt_SumA_Versender_PLZ))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_Versender_Ort", nctsAt_SumA_Versender_Ort))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_Empfaenger_EORI", nctsAt_SumA_Empfaenger_EORI))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_Empfaenger_NLNR", nctsAt_SumA_Empfaenger_NLNR))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_Empfaenger_TIN", nctsAt_SumA_Empfaenger_TIN))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_Empfaenger_Name", nctsAt_SumA_Empfaenger_Name))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_Empfaenger_StrasseHausnummer", nctsAt_SumA_Empfaenger_StrasseHausnummer))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_Empfaenger_Land", nctsAt_SumA_Empfaenger_Land))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_Empfaenger_PLZ", nctsAt_SumA_Empfaenger_PLZ))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_Empfaenger_Ort", nctsAt_SumA_Empfaenger_Ort))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_Befoerderer_EORI", nctsAt_SumA_Befoerderer_EORI))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_Befoerderer_NLNR", nctsAt_SumA_Befoerderer_NLNR))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_Befoerderer_TIN", nctsAt_SumA_Befoerderer_TIN))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_Befoerderer_Name", nctsAt_SumA_Befoerderer_Name))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_Befoerderer_StrasseHausnummer", nctsAt_SumA_Befoerderer_StrasseHausnummer))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_Befoerderer_Land", nctsAt_SumA_Befoerderer_Land))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_Befoerderer_PLZ", nctsAt_SumA_Befoerderer_PLZ))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_Befoerderer_Ort", nctsAt_SumA_Befoerderer_Ort))



        'NEU:

        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_AbgangSprachCode", nctsAt_AbgangSprachCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_BegleitdokumentSprachCode", nctsAt_BegleitdokumentSprachCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_BewilligungsnummerVersender", nctsAt_BewilligungsnummerVersender))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Befoerderungsmittel_Datenverfügbarkeitsindikator", nctsAt_Befoerderungsmittel_Datenverfügbarkeitsindikator))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_GeschaeftsReferenznummer", nctsAt_GeschaeftsReferenznummer))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_NummerDerBefoerderung", nctsAt_NummerDerBefoerderung))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_AnmeldungAnzeigeDatum", nctsAt_AnmeldungAnzeigeDatum))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_AnmeldungAnzeigeOrt", nctsAt_AnmeldungAnzeigeOrt))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_AnmeldungAnzeigeSprachCode", nctsAt_AnmeldungAnzeigeSprachCode))

        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_WarenartCode", nctsAt_WarenartCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_ZugelassenerWarenortCode", nctsAt_ZugelassenerWarenortCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Amtsplatz", nctsAt_Amtsplatz))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_EntladeortSprachCode", nctsAt_SumA_EntladeortSprachCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Befoerderungsmittel_VerkehrszweigInland", nctsAt_Befoerderungsmittel_VerkehrszweigInland))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Befoerderungsmittel_ArtAbgang", nctsAt_Befoerderungsmittel_ArtAbgang))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Befoerderungsmittel_KennzeichenAbgangSprachCode", nctsAt_Befoerderungsmittel_KennzeichenAbgangSprachCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Befoerderungsmittel_KennzeichenGrenzueberschreitendSprachCode", nctsAt_Befoerderungsmittel_KennzeichenGrenzueberschreitendSprachCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Container", nctsAt_Container))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Hauptverpflichteter_SprachCode", nctsAt_Hauptverpflichteter_SprachCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_versender_SprachCode", nctsAt_versender_SprachCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_empfaenger_SprachCode", nctsAt_empfaenger_SprachCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_Versender_SprachCode", nctsAt_SumA_Versender_SprachCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_empfaenger_SprachCode", nctsAt_SumA_empfaenger_SprachCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_SumA_befoerderer_SprachCode", nctsAt_SumA_befoerderer_SprachCode))

        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Wirtschaftsbeteiligter_TIN", nctsAt_Wirtschaftsbeteiligter_TIN))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Vertreter_RIN", nctsAt_Vertreter_RIN))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_DurchgangszollstelleDienststelleAnkunft1", nctsAt_DurchgangszollstelleDienststelleAnkunft1))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_DurchgangszollstelleDienststelleAnkunft2", nctsAt_DurchgangszollstelleDienststelleAnkunft2))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_DurchgangszollstelleDienststelleAnkunft3", nctsAt_DurchgangszollstelleDienststelleAnkunft3))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_DurchgangszollstelleDienststelleAnkunft4", nctsAt_DurchgangszollstelleDienststelleAnkunft4))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_DurchgangszollstelleDienststelleAnkunft5", nctsAt_DurchgangszollstelleDienststelleAnkunft5))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_DurchgangszollstelleDienststelleAnkunft6", nctsAt_DurchgangszollstelleDienststelleAnkunft6))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_DurchgangszollstelleDienststelleAnkunft7", nctsAt_DurchgangszollstelleDienststelleAnkunft7))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_DurchgangszollstelleDienststelleAnkunft8", nctsAt_DurchgangszollstelleDienststelleAnkunft8))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_DurchgangszollstelleDienststelleAnkunft9", nctsAt_DurchgangszollstelleDienststelleAnkunft9))

        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Verschluss_ZeichenSprachCode1", nctsAt_Verschluss_ZeichenSprachCode1))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Verschluss_ZeichenSprachCode2", nctsAt_Verschluss_ZeichenSprachCode2))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Verschluss_ZeichenSprachCode3", nctsAt_Verschluss_ZeichenSprachCode3))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Verschluss_ZeichenSprachCode4", nctsAt_Verschluss_ZeichenSprachCode4))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Verschluss_ZeichenSprachCode5", nctsAt_Verschluss_ZeichenSprachCode5))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Verschluss_ZeichenSprachCode6", nctsAt_Verschluss_ZeichenSprachCode6))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Verschluss_ZeichenSprachCode7", nctsAt_Verschluss_ZeichenSprachCode7))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Verschluss_ZeichenSprachCode8", nctsAt_Verschluss_ZeichenSprachCode8))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Verschluss_ZeichenSprachCode9", nctsAt_Verschluss_ZeichenSprachCode9))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_KontrolleErgebnisCode", nctsAt_KontrolleErgebnisCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Gestellungsfrist", nctsAt_Gestellungsfrist))



        Return list
    End Function

    Public Function UPDATE_STATUS(status) As Boolean
        Me.nctsAt_Status = status
        Return Me.SAVE
    End Function

    Public Function SAVE() As Boolean
        Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()

        Dim sqlstr = " BEGIN TRAN IF EXISTS(SELECT * FROM tblDakosy_NCTSOutAT WITH(updlock,serializable) WHERE nctsAt_Id=@nctsAt_Id) " &
                       " BEGIN " & getUpdateCmd() & " END " &
                       " Else " &
                       " BEGIN " & getInsertCmd() & " END " &
                       " commit tran "

        nctsAt_Id = SQL.doSQLVarListID(nctsAt_Id, sqlstr, "FMZOLL", , list)
        Return nctsAt_Id > 0
    End Function

    Public Function SAVE_ALL() As Boolean
        If Not SAVE() Then Return False
        If Not SAVE_Warenposition() Then Return False
        If Not SAVE_Sicherheitsangaben() Then Return False
        Return True
    End Function

    Public Function LOAD(Optional loadALL As Boolean = True) As Boolean
        Try
            LOAD = False
            If loadALL Then
                nctsAt_SICHERHEITSANGABEN.Clear()
                nctsAt_WARENPOS.Clear()
            End If
            Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
                Using cmd As New SqlCommand("SELECT * FROM tblDakosy_NCTSOutAT WHERE nctsAt_Id=@nctsAt_Id  ", conn)
                    cmd.Parameters.AddWithValue("@nctsAt_Id", nctsAt_Id)
                    Dim dr = cmd.ExecuteReader()
                    If dr.Read Then
                        For Each l In getParameterList()
                            Dim propInfo As PropertyInfo = Me.GetType.GetProperty(l.Scalarvariable)

                            If dr.Item(l.Text) Is DBNull.Value Then
                                propInfo.SetValue(Me, Nothing)
                            Else
                                propInfo.SetValue(Me, dr.Item(l.Text))
                            End If

                        Next
                        If loadALL Then
                            LOAD_Sicherheitsangaben()
                            LOAD_Warenposition()
                        End If
                        LOAD = True
                    End If
                    dr.Close()

                End Using
            End Using
        Catch ex As Exception
            MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
        End Try
        Return LOAD
    End Function


    Shared Function LOADByAnmIDFull(nctsAt_dyaAnmID As String, loadALL As Boolean) As cDakosyNCTSOutAT
        Try
            Dim NCTS As New cDakosyNCTSOutAT
            Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL

            Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
                Using cmd As New SqlCommand("SELECT TOP 1 * FROM tblDakosy_NCTSOutAT WHERE nctsAt_dyaAnmID=@nctsAt_dyaAnmID  ", conn)
                    cmd.Parameters.AddWithValue("@nctsAt_dyaAnmID", nctsAt_dyaAnmID)
                    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_Sicherheitsangaben()
                            NCTS.LOAD_Warenposition()
                        End If

                        dr.Close()
                        Return NCTS
                    End If
                    dr.Close()
                End Using
            End Using
        Catch ex As Exception
            MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
        End Try
        Return Nothing
    End Function

    Shared Function UPDATE_StatusById(nctsAt_Id As Integer, status As Integer) As String
        If nctsAt_Id > 0 Then
            Try
                Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
                list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Id", nctsAt_Id, , True))
                list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Status_KEWILL_Equivalent", status, , True))
                list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Status", status, , True))
                'dy_Status_KEWILL_Equivalent = status
                'dy_Status = status
                Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL

                Return SQL.doSQLVarList(" UPDATE [tblDakosy_NCTSOutAT] SET nctsAt_Status_KEWILL_Equivalent=@nctsAt_Status_KEWILL_Equivalent,nctsAt_Status=@nctsAt_Status WHERE nctsAt_Id=@nctsAt_Id ", "FMZOLL", , list)

            Catch ex As Exception
                MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
            End Try
        End If
        Return ""
    End Function


    Public Function LOADByAnmID(nctsAt_dyaAnmID As String, loadALL As Boolean) As Boolean
        Try
            LOADByAnmID = False
            If loadALL Then
                nctsAt_SICHERHEITSANGABEN.Clear()
                nctsAt_WARENPOS.Clear()
            End If
            Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
                Using cmd As New SqlCommand("SELECT TOP 1 * FROM tblDakosy_NCTSOutAT WHERE nctsAt_dyaAnmID=@nctsAt_dyaAnmID  ", conn)
                    cmd.Parameters.AddWithValue("@nctsAt_dyaAnmID", nctsAt_dyaAnmID)
                    Dim dr = cmd.ExecuteReader()
                    If dr.Read Then
                        For Each l In getParameterList()
                            Dim propInfo As PropertyInfo = Me.GetType.GetProperty(l.Scalarvariable)

                            If dr.Item(l.Text) Is DBNull.Value Then
                                propInfo.SetValue(Me, Nothing)
                            Else
                                propInfo.SetValue(Me, dr.Item(l.Text))
                            End If

                        Next
                        If loadALL Then
                            LOAD_Sicherheitsangaben()
                            LOAD_Warenposition()
                        End If
                        LOADByAnmID = True
                    End If
                    dr.Close()
                End Using
            End Using
        Catch ex As Exception
            MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
        End Try
        Return LOADByAnmID
    End Function
    Shared Function LOADByBezugsNr(bezugsNr As String, loadALL As Boolean) As cDakosyNCTSOutAT
        Try
            Dim NCTS As New cDakosyNCTSOutAT
            Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL

            Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
                Using cmd As New SqlCommand("SELECT TOP 1 * FROM tblDakosy_NCTSOutAT WHERE nctsAt_ObjectName=@bezugsNr  ", conn)
                    cmd.Parameters.AddWithValue("@bezugsNr", bezugsNr)
                    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_Sicherheitsangaben()
                            NCTS.LOAD_Warenposition()
                        End If

                        dr.Close()
                        Return NCTS
                    End If
                    dr.Close()
                End Using
            End Using
        Catch ex As Exception
            MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
        End Try
        Return Nothing
    End Function


    Public Function UPDATE_Status(status As Integer) As String
        If nctsAt_Id > 0 Then
            Try
                Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
                list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Id", nctsAt_Id, , True))
                list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Status", status, , True))
                list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsAt_Status_KEWILL_Equivalent", status, , True))
                nctsAt_Status = status
                nctsAt_Status_KEWILL_Equivalent = status
                Return SQL.doSQLVarList(" UPDATE [tblDakosy_NCTSOutAT] SET nctsAt_Status=@nctsAt_Status WHERE nctsAt_Id=@nctsAt_Id ", "FMZOLL", , list)

            Catch ex As Exception
                MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
            End Try
        End If
        Return ""
    End Function


    Public Function getUpdateCmd() As String
        Try
            Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()

            Dim str As String = ""
            For Each i In list
                If Not i.isPrimaryParam Then
                    str &= "[" & i.Text & "] = @" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
                End If
            Next
            str = str.Substring(0, str.Length - 1) 'wg. ','
            Return (" UPDATE [tblDakosy_NCTSOutAT] SET " & str & " WHERE nctsAt_Id=@nctsAt_Id ")

        Catch ex As Exception
            MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
        End Try
        Return ""
    End Function


    Public Function getInsertCmd() As String
        Try
            Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
            Dim str As String = ""
            Dim values As String = ""
            For Each i In list
                If Not i.isPrimaryParam Then
                    str &= "[" & i.Text & "],"
                    values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
                End If
            Next
            str = str.Substring(0, str.Length - 1) 'wg. ','
            values = values.Substring(0, values.Length - 1) 'wg. ','
            Return (" INSERT INTO tblDakosy_NCTSOutAT  (" & str & ") VALUES(" & values & ")  ")
        Catch ex As Exception
            MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
        End Try
        Return ""
    End Function

    Public Sub LOAD_Sicherheitsangaben()
        Try
            nctsAt_SICHERHEITSANGABEN.Clear()
            Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
                Using cmd As New SqlCommand("SELECT * FROM tblDakosy_NCTSOutAT_Sicherheitsangaben WHERE nctsSA_NctsId=@nctsAt_Id  ", conn)
                    cmd.Parameters.AddWithValue("@nctsAt_Id", Me.nctsAt_Id)
                    Dim dr = cmd.ExecuteReader()
                    While dr.Read
                        Dim l As New cDakosy_NCTSOutAT_Sicherheitsangaben
                        For Each i In l.getParameterList()
                            Dim propInfo As PropertyInfo = l.GetType.GetProperty(i.Scalarvariable)
                            If dr.Item(i.Text) Is DBNull.Value Then
                                propInfo.SetValue(l, Nothing)
                            Else
                                propInfo.SetValue(l, dr.Item(i.Text))
                            End If
                        Next
                        l.LOAD_SicherheitsangabenBezug()
                        nctsAt_SICHERHEITSANGABEN.Add(l)
                    End While
                    dr.Close()
                End Using
            End Using
        Catch ex As Exception
            MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
        End Try
    End Sub

    Public Sub LOAD_Warenposition()
        Try
            nctsAt_WARENPOS.Clear()
            Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
                Using cmd As New SqlCommand("SELECT * FROM tblDakosy_NCTSOutAT_Warenposition WHERE nctsWP_NctsId=@nctsAt_Id  ", conn)
                    cmd.Parameters.AddWithValue("@nctsAt_Id", Me.nctsAt_Id)
                    Dim dr = cmd.ExecuteReader()
                    While dr.Read
                        Dim l As New cDakosy_NCTSOutAT_Warenposition()
                        For Each i In l.getParameterList()
                            Dim propInfo As PropertyInfo = l.GetType.GetProperty(i.Scalarvariable)
                            If dr.Item(i.Text) Is DBNull.Value Then
                                propInfo.SetValue(l, Nothing)
                            Else
                                propInfo.SetValue(l, dr.Item(i.Text))
                            End If
                        Next
                        l.LOAD_WarenpositionPackstuecke()
                        l.LOAD_WarenpositionUnterlagen()
                        l.LOAD_WarenpositionZusatzangaben()
                        l.LOAD_WarenpositionVorpapiere()
                        nctsAt_WARENPOS.Add(l)
                    End While
                    dr.Close()
                End Using
            End Using
        Catch ex As Exception
            MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
        End Try
    End Sub

    Function DELETE_Warenpositionen() As Boolean 'obj As Object, tablename As String, where As String) As Boolean
        Dim sqlstr = " DELETE FROM [tblDakosy_NCTSOutAT_Warenposition] WHERE nctsWP_NctsId=" & Me.nctsAt_Id & " "
        Return SQL.doSQL(sqlstr, "FMZOLL")
    End Function

    Function DELETE_WarenpositionPackstuecke() As Boolean 'obj As Object, tablename As String, where As String) As Boolean
        Dim sqlstr = " DELETE FROM [tblDakosy_NCTSOutAT_WarenpositionPackstuecke] WHERE nctsWpPk_NctsId=" & Me.nctsAt_Id & " "
        Return SQL.doSQL(sqlstr, "FMZOLL")
    End Function

    Function DELETE_WarenpositionUnterlagen() As Boolean 'obj As Object, tablename As String, where As String) As Boolean
        Dim sqlstr = " DELETE FROM [tblDakosy_NCTSOutAT_WarenpositionVorgelegteUnterlagen] WHERE nctsWpUl_NctsId =" & Me.nctsAt_Id & " "
        Return SQL.doSQL(sqlstr, "FMZOLL")
    End Function


    Public Function DELETE_WarenpositionVorpapiere() As Boolean 'obj As Object, tablename As String, where As String) As Boolean
        Dim sqlstr = " DELETE FROM [tblDakosy_NCTSOutAT_WarenpositionVorpapier] WHERE nctsWpVp_NctsId=" & Me.nctsAt_Id & " "
        Return SQL.doSQL(sqlstr, "FMZOLL")
    End Function


    Public Function DELETE_WarenpositionZusatzangaben() As Boolean 'obj As Object, tablename As String, where As String) As Boolean
        Dim sqlstr = " DELETE FROM [tblDakosy_NCTSOutAT_WarenpositionZusatzangaben] WHERE nctsWpZa_NctsId=" & Me.nctsAt_Id & " "
        Return SQL.doSQL(sqlstr, "FMZOLL")
    End Function


    Public Function DELETE_SicherheitsangebenBezug() As Boolean 'obj As Object, tablename As String, where As String) As Boolean
        Dim sqlstr = " DELETE FROM [tblDakosy_NCTSOutAT_WarenpositionZusatzangaben] WHERE nctsWpZa_NctsId=" & Me.nctsAt_Id & " "
        Return SQL.doSQL(sqlstr, "FMZOLL")
    End Function

    Public Function SAVE_Warenposition() As Boolean
        'Zuserst alle OffertenPos von dem Offert löschen
        If DELETE_Warenpositionen() And DELETE_WarenpositionPackstuecke() And DELETE_WarenpositionUnterlagen() And DELETE_WarenpositionVorpapiere() And DELETE_WarenpositionVorpapiere() Then
            'jetzt die Standartofferten  einfügen
            For Each p In nctsAt_WARENPOS
                p.nctsWP_NctsId = nctsAt_Id
                If p.INSERT() Then
                    p.INSERT_WarenpositionPackstuecke(p.nctsWP_Id, Me.nctsAt_Id)
                    p.INSERT_WarenpositionUnterlagen(p.nctsWP_Id, Me.nctsAt_Id)
                    p.INSERT_WarenpositionVorpapiere(p.nctsWP_Id, Me.nctsAt_Id)
                    p.INSERT_WarenpositionZusatzangaben(p.nctsWP_Id, Me.nctsAt_Id)
                Else
                    Return False
                End If
            Next
        Else
            Return False
        End If

        Return True
    End Function

    Function DELETE_Sicherheitsangaben() As Boolean 'obj As Object, tablename As String, where As String) As Boolean
        Dim sqlstr = " DELETE FROM [tblDakosy_NCTSOutAT_SicherheitsangabenBezug] WHERE nctsSAb_NctsId=" & Me.nctsAt_Id & " "
        Return SQL.doSQL(sqlstr, "FMZOLL")
    End Function

    Public Function SAVE_Sicherheitsangaben() As Boolean
        'Zuserst alle OffertenPos von dem Offert löschen
        If DELETE_Sicherheitsangaben() And DELETE_SicherheitsangebenBezug() Then
            'jetzt die Standartofferten  einfügen
            For Each p In nctsAt_SICHERHEITSANGABEN
                p.nctsSA_NctsId = nctsAt_Id
                If Not p.INSERT() Then
                    p.INSERT_SicherheitsangabenBezug(p.nctsSA_Id, Me.nctsAt_Id)

                    Return False
                End If
            Next
        Else
            Return False
        End If
        Return True
    End Function

End Class



Public Class cDakosy_NCTSOutAT_Sicherheitsangaben

    Property nctsSA_Id As Integer
    Property nctsSA_NctsId As Object = Nothing
    Property nctsSA_Typ As Object = Nothing

    Property nctsAt_SICHERHEITSANGABEN_BEZUG As New List(Of cDakosy_NCTSOutAT_SicherheitsangabenBezug)

    'Public selButton As Object = Nothing ' Für die GUI
    'Public SA_OBJECT As Object = Nothing ' Für die GUI

    Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL

    Sub New()
    End Sub

    'Sub New(nctsSA_Id)
    '    Me.nctsSA_Id = nctsSA_Id
    ' LOAD()
    ' End Sub


    Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
        Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsSA_Id", nctsSA_Id, , True, True))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsSA_NctsId", nctsSA_NctsId))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsSA_Typ", nctsSA_Typ)) 

        Return list
    End Function


    Public Function INSERT() As Boolean
        Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
        'Return SQL.doSQLVarList(getInsertCmd, "FMZOLL", , list)
        nctsSA_Id = SQL.doSQLVarListID(nctsSA_Id, getInsertCmd, "FMZOLL", , list)
        Return nctsSA_Id > 0
    End Function

    Public Function getInsertCmd() As String
        Try
            Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
            Dim str As String = ""
            Dim values As String = ""
            For Each i In list
                If Not i.isPrimaryParam Then
                    str &= "[" & i.Text & "],"
                    values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
                End If
            Next
            str = str.Substring(0, str.Length - 1) 'wg. ','
            values = values.Substring(0, values.Length - 1) 'wg. ','
            Return (" INSERT INTO tblDakosy_NCTSOutAT_Sicherheitsangaben  (" & str & ") VALUES(" & values & ")  ")
        Catch ex As Exception
            MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
        End Try
        Return ""
    End Function







    Public Sub LOAD_SicherheitsangabenBezug()
        Try
            nctsAt_SICHERHEITSANGABEN_BEZUG.Clear()
            Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
                Using cmd As New SqlCommand("SELECT * FROM tblDakosy_NCTSOutAT_WarenpositionSicherheitsangabenBezug WHERE nctsSAb_nctsSAId=@nctsSA_Id  ", conn)
                    cmd.Parameters.AddWithValue("@nctsSA_Id", Me.nctsSA_Id)
                    Dim dr = cmd.ExecuteReader()
                    While dr.Read
                        Dim l As New cDakosy_NCTSOutAT_SicherheitsangabenBezug()
                        For Each i In l.getParameterList()
                            Dim propInfo As PropertyInfo = l.GetType.GetProperty(i.Scalarvariable)
                            If dr.Item(i.Text) Is DBNull.Value Then
                                propInfo.SetValue(l, Nothing)
                            Else
                                propInfo.SetValue(l, dr.Item(i.Text))
                            End If
                        Next
                        nctsAt_SICHERHEITSANGABEN_BEZUG.Add(l)
                    End While
                    dr.Close()
                End Using
            End Using
        Catch ex As Exception
            MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
        End Try
    End Sub

    Public Function DELETE_SicherheitsangabenBezug() As Boolean 'obj As Object, tablename As String, where As String) As Boolean
        Dim sqlstr = " DELETE FROM [tblDakosy_NCTSOutAT_WarenpositionSicherheitsangabenBezug] WHERE nctsSAb_nctsSAId=" & Me.nctsSA_Id & " "
        Return SQL.doSQL(sqlstr, "FMZOLL")
    End Function

    Public Function INSERT_SicherheitsangabenBezug(wp_id, nctsAt_id) As Boolean
        'Zuserst alle OffertenPos von dem Offert löschen

        'jetzt die Standartofferten  einfügen
        For Each p In nctsAt_SICHERHEITSANGABEN_BEZUG
            p.nctsSAb_NctsSAId = wp_id
            p.nctsSAb_NctsId = nctsAt_id
            If Not p.INSERT() Then
                Return False
            End If
        Next

        Return True
    End Function




End Class



Public Class cDakosy_NCTSOutAT_SicherheitsangabenBezug

    Property nctsSAb_Id As Integer
    Property nctsSAb_NctsId As Object = Nothing
    Property nctsSAb_NctsSAId As Object = Nothing


    '???????????????
    Property nctsSAb_ArtCode As Object = Nothing
    Property nctsSAb_BezeichnungBescheinigun As Object = Nothing
    Property nctsSAb_AbgabenBetrag As Object = Nothing
    Property nctsSAb_GRN As Object = Nothing
    Property nctsSAb_Zugriffcode As Object = Nothing
    Property nctsSAb_TIN As Object = Nothing

    Property nctsSAb_AndereGarantieRef As Object = Nothing
    Property nctsSAb_Waehrung As Object = Nothing
    Property nctsSAb_NichtGueltigFuerEU As Object = Nothing
    Property nctsSAb_NichtGueltigFuerAndVertragsParteien1 As Object = Nothing
    Property nctsSAb_NichtGueltigFuerAndVertragsParteien2 As Object = Nothing
    Property nctsSAb_NichtGueltigFuerAndVertragsParteien3 As Object = Nothing
    Property nctsSAb_NichtGueltigFuerAndVertragsParteien4 As Object = Nothing
    Property nctsSAb_NichtGueltigFuerAndVertragsParteien5 As Object = Nothing
    Property nctsSAb_NichtGueltigFuerAndVertragsParteien6 As Object = Nothing
    Property nctsSAb_NichtGueltigFuerAndVertragsParteien7 As Object = Nothing
    Property nctsSAb_NichtGueltigFuerAndVertragsParteien8 As Object = Nothing
    Property nctsSAb_NichtGueltigFuerAndVertragsParteien9 As Object = Nothing


    'Public selButton As Object = Nothing ' Für die GUI
    'Public SA_OBJECT As Object = Nothing ' Für die GUI

    Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL

    Sub New()
    End Sub

    'Sub New(nctsSAb_Id)
    '    Me.nctsSAb_Id = nctsSAb_Id
    ' LOAD()
    ' End Sub


    Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
        Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsSAb_Id", nctsSAb_Id, , True, True))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsSAb_NctsId", nctsSAb_NctsId))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsSAb_ArtCode", nctsSAb_ArtCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsSAb_BezeichnungBescheinigun", nctsSAb_BezeichnungBescheinigun))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsSAb_AbgabenBetrag", nctsSAb_AbgabenBetrag))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsSAb_GRN", nctsSAb_GRN))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsSAb_Zugriffcode", nctsSAb_Zugriffcode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsSAb_TIN", nctsSAb_TIN))



        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsSAb_AndereGarantieRef", nctsSAb_AndereGarantieRef))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsSAb_Waehrung", nctsSAb_Waehrung))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsSAb_NichtGueltigFuerEU", nctsSAb_NichtGueltigFuerEU))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsSAb_NichtGueltigFuerAndVertragsParteien1", nctsSAb_NichtGueltigFuerAndVertragsParteien1))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsSAb_NichtGueltigFuerAndVertragsParteien2", nctsSAb_NichtGueltigFuerAndVertragsParteien2))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsSAb_NichtGueltigFuerAndVertragsParteien3", nctsSAb_NichtGueltigFuerAndVertragsParteien3))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsSAb_NichtGueltigFuerAndVertragsParteien4", nctsSAb_NichtGueltigFuerAndVertragsParteien4))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsSAb_NichtGueltigFuerAndVertragsParteien5", nctsSAb_NichtGueltigFuerAndVertragsParteien5))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsSAb_NichtGueltigFuerAndVertragsParteien6", nctsSAb_NichtGueltigFuerAndVertragsParteien6))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsSAb_NichtGueltigFuerAndVertragsParteien7", nctsSAb_NichtGueltigFuerAndVertragsParteien7))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsSAb_NichtGueltigFuerAndVertragsParteien8", nctsSAb_NichtGueltigFuerAndVertragsParteien8))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsSAb_NichtGueltigFuerAndVertragsParteien9", nctsSAb_NichtGueltigFuerAndVertragsParteien9))

        Return list
    End Function


    Public Function INSERT() As Boolean
        Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
        'Return SQL.doSQLVarList(getInsertCmd, "FMZOLL", , list)
        nctsSAb_Id = SQL.doSQLVarListID(nctsSAb_Id, getInsertCmd, "FMZOLL", , list)
        Return nctsSAb_Id > 0
    End Function

    Public Function getInsertCmd() As String
        Try
            Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
            Dim str As String = ""
            Dim values As String = ""
            For Each i In list
                If Not i.isPrimaryParam Then
                    str &= "[" & i.Text & "],"
                    values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
                End If
            Next
            str = str.Substring(0, str.Length - 1) 'wg. ','
            values = values.Substring(0, values.Length - 1) 'wg. ','
            Return (" INSERT INTO tblDakosy_NCTSOutAT_SicherheitsangabenBezug  (" & str & ") VALUES(" & values & ")  ")
        Catch ex As Exception
            MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
        End Try
        Return ""
    End Function

End Class


Public Class cDakosy_NCTSOutAT_Warenposition
    Property nctsWP_Id As Integer
    Property nctsWP_NctsId As Integer
    Property nctsWP_PositionsNummer As Object = Nothing
    Property nctsWP_Warennummer As Object = Nothing
    Property nctsWP_ArtAnmeldungPositionCode As Object = Nothing
    Property nctsWP_Warenbezeichnung As Object = Nothing
    Property nctsWP_Warenwert As Object = Nothing
    Property nctsWP_WarenwertWaehrung As Object = Nothing
    Property nctsWP_SchaetzKz As Object = Nothing
    Property nctsWP_WarenwertProzent As Object = Nothing
    Property nctsWP_VersendungslandPositionCode As Object = Nothing
    Property nctsWP_BestimmungslandPositionCode As Object = Nothing
    Property nctsWP_Rohmasse As Object = Nothing
    Property nctsWP_Eigenmasse As Object = Nothing


    Property nctsWP_VorpapierTyp As Object = Nothing
    Property nctsWP_VorpapierReferenz1 As Object = Nothing
    Property nctsWP_VorpapierZusatz1 As Object = Nothing
    Property nctsWP_VorpapierReferenz2 As Object = Nothing
    Property nctsWP_VorpapierZusatz2 As Object = Nothing
    Property nctsWP_VorpapierReferenz3 As Object = Nothing
    Property nctsWP_VorpapierZusatz3 As Object = Nothing
    Property nctsWP_VorpapierReferenz4 As Object = Nothing
    Property nctsWP_VorpapierZusatz4 As Object = Nothing
    Property nctsWP_VorpapierReferenz5 As Object = Nothing
    Property nctsWP_VorpapierZusatz5 As Object = Nothing
    Property nctsWP_VorpapierReferenz6 As Object = Nothing
    Property nctsWP_VorpapierZusatz6 As Object = Nothing
    Property nctsWP_VorpapierReferenz7 As Object = Nothing
    Property nctsWP_VorpapierZusatz7 As Object = Nothing
    Property nctsWP_VorpapierReferenz8 As Object = Nothing
    Property nctsWP_VorpapierZusatz8 As Object = Nothing
    Property nctsWP_VorpapierReferenz9 As Object = Nothing
    Property nctsWP_VorpapierZusatz9 As Object = Nothing



    Property nctsWP_BesondereVermeke_ExportAusEU As Object = Nothing
    Property nctsWP_BesondereVermeke_ExportAusLand As Object = Nothing
    Property nctsWP_BesondereVermeke_Export As Object = Nothing

    Property nctsWP_BesondereVermeke_ExportBeschraenkung As Object = Nothing
    Property nctsWP_BesondereVermeke_ExportAbgaben As Object = Nothing
    Property nctsWP_BesondereVermeke_Vermerk As Object = Nothing
    Property nctsWP_BesondereVermeke_Kz10600 As Object = Nothing


    Property nctsWP_Versender_EORI As Object = Nothing
    Property nctsWP_Versender_NLNR As Object = Nothing
    Property nctsWP_Versender_TIN As Object = Nothing
    Property nctsWP_Versender_Name As Object = Nothing
    Property nctsWP_Versender_StrasseHausnummer As Object = Nothing
    Property nctsWP_Versender_Ort As Object = Nothing
    Property nctsWP_Versender_PLZ As Object = Nothing
    Property nctsWP_Versender_Land As Object = Nothing
    Property nctsWP_Empfaenger_EORI As Object = Nothing
    Property nctsWP_Empfaenger_NLNR As Object = Nothing
    Property nctsWP_Empfaenger_TIN As Object = Nothing
    Property nctsWP_Empfaenger_Name As Object = Nothing
    Property nctsWP_Empfaenger_StrasseHausnummer As Object = Nothing
    Property nctsWP_Empfaenger_Ort As Object = Nothing
    Property nctsWP_Empfaenger_PLZ As Object = Nothing
    Property nctsWP_Empfaenger_Land As Object = Nothing
    Property nctsWP_SumAKennnummerSendung As Object = Nothing
    Property nctsWP_SumABefoerderungskostenZahlungsweise As Object = Nothing
    Property nctsWP_SumAUNGefahrgutnummer As Object = Nothing
    Property nctsWP_SumAVersender_EORI As Object = Nothing
    Property nctsWP_SumAVersender_NLNR As Object = Nothing
    Property nctsWP_SumAVersender_TIN As Object = Nothing
    Property nctsWP_SumAVersender_Name As Object = Nothing
    Property nctsWP_SumAVersender_StrasseHausnummer As Object = Nothing
    Property nctsWP_SumAVersender_Ort As Object = Nothing
    Property nctsWP_SumAVersender_PLZ As Object = Nothing
    Property nctsWP_SumAVersender_Land As Object = Nothing
    Property nctsWP_SumAEmpfaenger_EORI As Object = Nothing
    Property nctsWP_SumAEmpfaenger_NLNR As Object = Nothing
    Property nctsWP_SumAEmpfaenger_TIN As Object = Nothing
    Property nctsWP_SumAEmpfaenger_Name As Object = Nothing
    Property nctsWP_SumAEmpfaenger_StrasseHausnummer As Object = Nothing
    Property nctsWP_SumAEmpfaenger_Ort As Object = Nothing
    Property nctsWP_SumAEmpfaenger_PLZ As Object = Nothing
    Property nctsWP_SumAEmpfaenger_Land As Object = Nothing


    'NEU:

    Property nctsWP_WarenbezeichnungSprachCode As Object = Nothing
    Property nctsWP_GeschaeftsReferenzNummer As Object = Nothing
    Property nctsWP_versender_SprachCode As Object = Nothing
    Property nctsWP_empfaenger_SprachCode As Object = Nothing
    Property nctsWP_SumAversender_SprachCode As Object = Nothing
    Property nctsWP_SumAempfaenger_SprachCode As Object = Nothing
    Property nctsWP_SensibleWarenCode1 As Object = Nothing
    Property nctsWP_SensibleWarenCode2 As Object = Nothing
    Property nctsWP_SensibleWarenCode3 As Object = Nothing
    Property nctsWP_SensibleWarenCode4 As Object = Nothing
    Property nctsWP_SensibleWarenCode5 As Object = Nothing
    Property nctsWP_SensibleWarenCode6 As Object = Nothing
    Property nctsWP_SensibleWarenCode7 As Object = Nothing
    Property nctsWP_SensibleWarenCode8 As Object = Nothing
    Property nctsWP_SensibleWarenCode9 As Object = Nothing

    Property nctsWP_SensibleWarenMenge1 As Object = Nothing
    Property nctsWP_SensibleWarenMenge2 As Object = Nothing
    Property nctsWP_SensibleWarenMenge3 As Object = Nothing
    Property nctsWP_SensibleWarenMenge4 As Object = Nothing
    Property nctsWP_SensibleWarenMenge5 As Object = Nothing
    Property nctsWP_SensibleWarenMenge6 As Object = Nothing
    Property nctsWP_SensibleWarenMenge7 As Object = Nothing
    Property nctsWP_SensibleWarenMenge8 As Object = Nothing
    Property nctsWP_SensibleWarenMenge9 As Object = Nothing



    Property nctsWP_PACKSTUECKE As New List(Of cDakosy_NCTSOutAT_WarenpositionPackstuecke)
    Property nctsWP_UNTERLAGEN As New List(Of cDakosy_NCTSOutAT_WarenpositionVorgelegteUnterlagen)


    Property nctsWP_VORPAPIERE As New List(Of cDakosy_NCTSOutAT_WarenpositionVorpapier)
    Property nctsWP_ZUSATZANGABEN As New List(Of cDakosy_AES_WarenpositionZusatzangaben)


    Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL

    Sub New()
        '  Me.nctsWP_NctsId = nctsWP_NctsId
    End Sub

    'Sub New(nctsSA_Id)
    '    Me.nctsSA_Id = nctsSA_Id
    ' LOAD()
    ' End Sub


    Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
        Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_Id", nctsWP_Id, , True, True))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_NctsId", nctsWP_NctsId))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_PositionsNummer", nctsWP_PositionsNummer))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_Warennummer", nctsWP_Warennummer))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_ArtAnmeldungPositionCode", nctsWP_ArtAnmeldungPositionCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_Warenbezeichnung", nctsWP_Warenbezeichnung))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_Warenwert", nctsWP_Warenwert))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_WarenwertWaehrung", nctsWP_WarenwertWaehrung))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SchaetzKz", nctsWP_SchaetzKz))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_WarenwertProzent", nctsWP_WarenwertProzent))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_VersendungslandPositionCode", nctsWP_VersendungslandPositionCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_BestimmungslandPositionCode", nctsWP_BestimmungslandPositionCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_Rohmasse", nctsWP_Rohmasse))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_Eigenmasse", nctsWP_Eigenmasse))

        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_VorpapierTyp", nctsWP_VorpapierTyp))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_VorpapierReferenz1", nctsWP_VorpapierReferenz1))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_VorpapierZusatz1", nctsWP_VorpapierZusatz1))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_VorpapierReferenz2", nctsWP_VorpapierReferenz2))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_VorpapierZusatz2", nctsWP_VorpapierZusatz2))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_VorpapierReferenz3", nctsWP_VorpapierReferenz3))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_VorpapierZusatz3", nctsWP_VorpapierZusatz3))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_VorpapierReferenz4", nctsWP_VorpapierReferenz4))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_VorpapierZusatz4", nctsWP_VorpapierZusatz4))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_VorpapierReferenz5", nctsWP_VorpapierReferenz5))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_VorpapierZusatz5", nctsWP_VorpapierZusatz5))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_VorpapierReferenz6", nctsWP_VorpapierReferenz6))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_VorpapierZusatz6", nctsWP_VorpapierZusatz6))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_VorpapierReferenz7", nctsWP_VorpapierReferenz7))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_VorpapierZusatz7", nctsWP_VorpapierZusatz7))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_VorpapierReferenz8", nctsWP_VorpapierReferenz8))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_VorpapierZusatz8", nctsWP_VorpapierZusatz8))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_VorpapierReferenz9", nctsWP_VorpapierReferenz9))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_VorpapierZusatz9", nctsWP_VorpapierZusatz9))


        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_BesondereVermeke_ExportAusEU", nctsWP_BesondereVermeke_ExportAusEU))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_BesondereVermeke_ExportAusLand", nctsWP_BesondereVermeke_ExportAusLand))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_BesondereVermeke_Export", nctsWP_BesondereVermeke_Export))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_BesondereVermeke_ExportBeschraenkung", nctsWP_BesondereVermeke_ExportBeschraenkung))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_BesondereVermeke_ExportAbgaben", nctsWP_BesondereVermeke_ExportAbgaben))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_BesondereVermeke_Vermerk", nctsWP_BesondereVermeke_Vermerk))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_BesondereVermeke_Kz10600", nctsWP_BesondereVermeke_Kz10600))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_Versender_EORI", nctsWP_Versender_EORI))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_Versender_NLNR", nctsWP_Versender_NLNR))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_Versender_TIN", nctsWP_Versender_TIN))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_Versender_Name", nctsWP_Versender_Name))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_Versender_StrasseHausnummer", nctsWP_Versender_StrasseHausnummer))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_Versender_Ort", nctsWP_Versender_Ort))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_Versender_PLZ", nctsWP_Versender_PLZ))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_Versender_Land", nctsWP_Versender_Land))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_Empfaenger_EORI", nctsWP_Empfaenger_EORI))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_Empfaenger_NLNR", nctsWP_Empfaenger_NLNR))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_Empfaenger_TIN", nctsWP_Empfaenger_TIN))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_Empfaenger_Name", nctsWP_Empfaenger_Name))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_Empfaenger_StrasseHausnummer", nctsWP_Empfaenger_StrasseHausnummer))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_Empfaenger_Ort", nctsWP_Empfaenger_Ort))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_Empfaenger_PLZ", nctsWP_Empfaenger_PLZ))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_Empfaenger_Land", nctsWP_Empfaenger_Land))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SumAKennnummerSendung", nctsWP_SumAKennnummerSendung))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SumABefoerderungskostenZahlungsweise", nctsWP_SumABefoerderungskostenZahlungsweise))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SumAUNGefahrgutnummer", nctsWP_SumAUNGefahrgutnummer))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SumAVersender_EORI", nctsWP_SumAVersender_EORI))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SumAVersender_NLNR", nctsWP_SumAVersender_NLNR))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SumAVersender_TIN", nctsWP_SumAVersender_TIN))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SumAVersender_Name", nctsWP_SumAVersender_Name))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SumAVersender_StrasseHausnummer", nctsWP_SumAVersender_StrasseHausnummer))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SumAVersender_Ort", nctsWP_SumAVersender_Ort))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SumAVersender_PLZ", nctsWP_SumAVersender_PLZ))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SumAVersender_Land", nctsWP_SumAVersender_Land))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SumAEmpfaenger_EORI", nctsWP_SumAEmpfaenger_EORI))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SumAEmpfaenger_NLNR", nctsWP_SumAEmpfaenger_NLNR))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SumAEmpfaenger_TIN", nctsWP_SumAEmpfaenger_TIN))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SumAEmpfaenger_Name", nctsWP_SumAEmpfaenger_Name))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SumAEmpfaenger_StrasseHausnummer", nctsWP_SumAEmpfaenger_StrasseHausnummer))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SumAEmpfaenger_Ort", nctsWP_SumAEmpfaenger_Ort))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SumAEmpfaenger_PLZ", nctsWP_SumAEmpfaenger_PLZ))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SumAEmpfaenger_Land", nctsWP_SumAEmpfaenger_Land))




        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_WarenbezeichnungSprachCode", nctsWP_WarenbezeichnungSprachCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_GeschaeftsReferenzNummer", nctsWP_GeschaeftsReferenzNummer))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_versender_SprachCode", nctsWP_versender_SprachCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_empfaenger_SprachCode", nctsWP_empfaenger_SprachCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SumAversender_SprachCode", nctsWP_SumAversender_SprachCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SumAempfaenger_SprachCode", nctsWP_SumAempfaenger_SprachCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SensibleWarenCode1", nctsWP_SensibleWarenCode1))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SensibleWarenCode2", nctsWP_SensibleWarenCode2))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SensibleWarenCode3", nctsWP_SensibleWarenCode3))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SensibleWarenCode4", nctsWP_SensibleWarenCode4))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SensibleWarenCode5", nctsWP_SensibleWarenCode5))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SensibleWarenCode6", nctsWP_SensibleWarenCode6))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SensibleWarenCode7", nctsWP_SensibleWarenCode7))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SensibleWarenCode8", nctsWP_SensibleWarenCode8))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SensibleWarenCode9", nctsWP_SensibleWarenCode9))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SensibleWarenMenge1", nctsWP_SensibleWarenMenge1))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SensibleWarenMenge2", nctsWP_SensibleWarenMenge2))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SensibleWarenMenge3", nctsWP_SensibleWarenMenge3))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SensibleWarenMenge4", nctsWP_SensibleWarenMenge4))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SensibleWarenMenge5", nctsWP_SensibleWarenMenge5))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SensibleWarenMenge6", nctsWP_SensibleWarenMenge6))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SensibleWarenMenge7", nctsWP_SensibleWarenMenge7))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SensibleWarenMenge8", nctsWP_SensibleWarenMenge8))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWP_SensibleWarenMenge9", nctsWP_SensibleWarenMenge9))


        Return list
    End Function


    Public Function INSERT() As Boolean
        Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
        'Return SQL.doSQLVarList(getInsertCmd, "FMZOLL", , list)
        nctsWP_Id = SQL.doSQLVarListID(nctsWP_Id, getInsertCmd, "FMZOLL", , list)
        Return nctsWP_Id > 0
    End Function

    Public Function getInsertCmd() As String
        Try
            Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
            Dim str As String = ""
            Dim values As String = ""
            For Each i In list
                If Not i.isPrimaryParam Then
                    str &= "[" & i.Text & "],"
                    values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
                End If
            Next
            str = str.Substring(0, str.Length - 1) 'wg. ','
            values = values.Substring(0, values.Length - 1) 'wg. ','
            Return (" INSERT INTO tblDakosy_NCTSOutAT_Warenposition (" & str & ") VALUES(" & values & ")  ")
        Catch ex As Exception
            MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
        End Try
        Return ""
    End Function




    Public Sub LOAD_WarenpositionPackstuecke()
        Try
            nctsWP_PACKSTUECKE.Clear()
            Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
                Using cmd As New SqlCommand("SELECT * FROM tblDakosy_NCTSOutAT_WarenpositionPackstuecke WHERE nctsWpPk_nctsWPId=@nctsWP_Id  ", conn)
                    cmd.Parameters.AddWithValue("@nctsWP_Id", Me.nctsWP_Id)
                    Dim dr = cmd.ExecuteReader()
                    While dr.Read
                        Dim l As New cDakosy_NCTSOutAT_WarenpositionPackstuecke()
                        For Each i In l.getParameterList()
                            Dim propInfo As PropertyInfo = l.GetType.GetProperty(i.Scalarvariable)
                            If dr.Item(i.Text) Is DBNull.Value Then
                                propInfo.SetValue(l, Nothing)
                            Else
                                propInfo.SetValue(l, dr.Item(i.Text))
                            End If
                        Next
                        nctsWP_PACKSTUECKE.Add(l)
                    End While
                    dr.Close()
                End Using
            End Using
        Catch ex As Exception
            MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
        End Try
    End Sub

    Public Function DELETE_WarenpositionPackstuecke() As Boolean 'obj As Object, tablename As String, where As String) As Boolean
        Dim sqlstr = " DELETE FROM [tblDakosy_NCTSOutAT_WarenpositionPackstuecke] WHERE nctsWpPk_nctsWPId=" & Me.nctsWP_Id & " "
        Return SQL.doSQL(sqlstr, "FMZOLL")
    End Function

    Public Function INSERT_WarenpositionPackstuecke(wp_id, nctsAt_id) As Boolean
        'Zuserst alle OffertenPos von dem Offert löschen

        'jetzt die Standartofferten  einfügen
        For Each p In nctsWP_PACKSTUECKE
            p.nctsWpPk_nctsWPId = wp_id
            p.nctsWpPk_NctsId = nctsAt_id
            If Not p.INSERT() Then
                Return False
            End If
        Next

        Return True
    End Function



    Public Sub LOAD_WarenpositionUnterlagen()
        Try
            nctsWP_UNTERLAGEN.Clear()
            Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
                Using cmd As New SqlCommand("SELECT * FROM tblDakosy_NCTSOutAT_WarenpositionVorgelegteUnterlagen WHERE nctsWpUl_nctsWPId=@nctsWP_Id  ", conn)
                    cmd.Parameters.AddWithValue("@nctsWP_Id", Me.nctsWP_Id)
                    Dim dr = cmd.ExecuteReader()
                    While dr.Read
                        Dim l As New cDakosy_NCTSOutAT_WarenpositionVorgelegteUnterlagen
                        For Each i In l.getParameterList()
                            Dim propInfo As PropertyInfo = l.GetType.GetProperty(i.Scalarvariable)
                            If dr.Item(i.Text) Is DBNull.Value Then
                                propInfo.SetValue(l, Nothing)
                            Else
                                propInfo.SetValue(l, dr.Item(i.Text))
                            End If
                        Next
                        nctsWP_UNTERLAGEN.Add(l)
                    End While
                    dr.Close()
                End Using
            End Using
        Catch ex As Exception
            MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
        End Try
    End Sub

    Public Function DELETE_WarenpositionUnterlagen() As Boolean 'obj As Object, tablename As String, where As String) As Boolean
        Dim sqlstr = " DELETE FROM [tblDakosy_NCTSOutAT_WarenpositionVorgelegteUnterlagen] WHERE nctsWpUl_nctsWPId=" & Me.nctsWP_Id & " "
        Return SQL.doSQL(sqlstr, "FMZOLL")
    End Function

    Public Function INSERT_WarenpositionUnterlagen(wp_id, nctsAt_id) As Boolean
        'Zuserst alle OffertenPos von dem Offert löschen

        'jetzt die Standartofferten  einfügen
        For Each p In nctsWP_UNTERLAGEN
            p.nctsWpUl_nctsWPId = wp_id
            p.nctsWpUl_NctsId = nctsAt_id
            If Not p.INSERT() Then
                Return False
            End If
        Next

        Return True
    End Function











    Public Sub LOAD_WarenpositionVorpapiere()
        Try
            nctsWP_VORPAPIERE.Clear()
            Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
                Using cmd As New SqlCommand("SELECT * FROM tblDakosy_NCTSOutAT_WarenpositionVorpapier WHERE nctsWpVp_nctsWPId=@nctsWP_Id  ", conn)
                    cmd.Parameters.AddWithValue("@nctsWP_Id", Me.nctsWP_Id)
                    Dim dr = cmd.ExecuteReader()
                    While dr.Read
                        Dim l As New cDakosy_NCTSOutAT_WarenpositionVorpapier()
                        For Each i In l.getParameterList()
                            Dim propInfo As PropertyInfo = l.GetType.GetProperty(i.Scalarvariable)
                            If dr.Item(i.Text) Is DBNull.Value Then
                                propInfo.SetValue(l, Nothing)
                            Else
                                propInfo.SetValue(l, dr.Item(i.Text))
                            End If
                        Next
                        nctsWP_VORPAPIERE.Add(l)
                    End While
                    dr.Close()
                End Using
            End Using
        Catch ex As Exception
            MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
        End Try
    End Sub

    Public Function DELETE_WarenpositionVorpapiere() As Boolean 'obj As Object, tablename As String, where As String) As Boolean
        Dim sqlstr = " DELETE FROM [tblDakosy_NCTSOutAT_WarenpositionVorpapier] WHERE nctsWpVp_nctsWPId=" & Me.nctsWP_Id & " "
        Return SQL.doSQL(sqlstr, "FMZOLL")
    End Function

    Public Function INSERT_WarenpositionVorpapiere(wp_id, nctsAt_id) As Boolean
        'Zuserst alle OffertenPos von dem Offert löschen

        'jetzt die Standartofferten  einfügen
        For Each p In nctsWP_VORPAPIERE
            p.nctsWpVp_nctsWPId = wp_id
            p.nctsWpVp_NctsId = nctsAt_id
            If Not p.INSERT() Then
                Return False
            End If
        Next

        Return True
    End Function






    Public Sub LOAD_WarenpositionZusatzangaben()
        Try
            nctsWP_Zusatzangaben.Clear()
            Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
                Using cmd As New SqlCommand("SELECT * FROM tblDakosy_NCTSOutAT_WarenpositionZusatzangaben WHERE nctsWpZa_nctsWPId=@nctsWP_Id  ", conn)
                    cmd.Parameters.AddWithValue("@nctsWP_Id", Me.nctsWP_Id)
                    Dim dr = cmd.ExecuteReader()
                    While dr.Read
                        Dim l As New cDakosy_AES_WarenpositionZusatzangaben()
                        For Each i In l.getParameterList()
                            Dim propInfo As PropertyInfo = l.GetType.GetProperty(i.Scalarvariable)
                            If dr.Item(i.Text) Is DBNull.Value Then
                                propInfo.SetValue(l, Nothing)
                            Else
                                propInfo.SetValue(l, dr.Item(i.Text))
                            End If
                        Next
                        nctsWP_ZUSATZANGABEN.Add(l)
                    End While
                    dr.Close()
                End Using
            End Using
        Catch ex As Exception
            MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
        End Try
    End Sub

    Public Function DELETE_WarenpositionZusatzangaben() As Boolean 'obj As Object, tablename As String, where As String) As Boolean
        Dim sqlstr = " DELETE FROM [tblDakosy_NCTSOutAT_WarenpositionZusatzangaben] WHERE nctsWpZa_nctsWPId=" & Me.nctsWP_Id & " "
        Return SQL.doSQL(sqlstr, "FMZOLL")
    End Function

    Public Function INSERT_WarenpositionZusatzangaben(wp_id, nctsAt_id) As Boolean
        'Zuserst alle OffertenPos von dem Offert löschen

        'jetzt die Standartofferten  einfügen
        For Each p In nctsWP_Zusatzangaben
            p.nctsWpZa_nctsWPId = wp_id
            p.nctsWpZa_NctsId = nctsAt_id
            If Not p.INSERT() Then
                Return False
            End If
        Next

        Return True
    End Function







End Class



Public Class cDakosy_NCTSOutAT_WarenpositionPackstuecke

    Property nctsWpPk_Id As Integer
    Property nctsWpPk_nctsWPId As Integer
    Property nctsWpPk_NctsId As Integer

    Property nctsWpPk_PackstueckeAnzahl As Object = Nothing
    Property nctsWpPk_Verpackungsart As Object = Nothing
    Property nctsWpPk_ZeichenNummern As Object = Nothing

    Property nctsWpPk_SprachCode As Object = Nothing
    Property nctsWpPk_Nummer As Object = Nothing

    Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL

    Sub New()
        '   Me.nctsWpPk_nctsWPId = nctsWpPk_nctsWPId
    End Sub


    Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
        Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpPk_Id", nctsWpPk_Id, , True, True))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpPk_nctsWPId", nctsWpPk_nctsWPId))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpPk_NctsId", nctsWpPk_NctsId))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpPk_PackstueckeAnzahl", nctsWpPk_PackstueckeAnzahl))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpPk_Verpackungsart", nctsWpPk_Verpackungsart))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpPk_ZeichenNummern", nctsWpPk_ZeichenNummern))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpPk_SprachCode", nctsWpPk_SprachCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpPk_Nummer", nctsWpPk_Nummer))
        Return list
    End Function


    Public Function INSERT() As Boolean
        Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
        nctsWpPk_Id = SQL.doSQLVarListID(nctsWpPk_Id, getInsertCmd(), "FMZOLL", , list)
        Return nctsWpPk_Id > 0
    End Function

    Public Function getInsertCmd() As String
        Try
            Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
            Dim str As String = ""
            Dim values As String = ""
            For Each i In list
                If Not i.isPrimaryParam Then
                    str &= "[" & i.Text & "],"
                    values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
                End If
            Next
            str = str.Substring(0, str.Length - 1) 'wg. ','
            values = values.Substring(0, values.Length - 1) 'wg. ','
            Return (" INSERT INTO tblDakosy_NCTSOutAT_WarenpositionPackstuecke (" & str & ") VALUES(" & values & ")  ")
        Catch ex As Exception
            MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
        End Try
        Return ""
    End Function

End Class





Public Class cDakosy_NCTSOutAT_WarenpositionVorpapier

    Property nctsWpVp_Id As Integer
    Property nctsWpVp_nctsWPId As Integer
    Property nctsWpVp_NctsId As Integer


    Property nctsWpVp_VorpapierArt As Object = Nothing
    Property nctsWpVp_Referenz As Object = Nothing
    Property nctsWpVp_SprachCode As Object = Nothing
    Property nctsWpVp_ErgaenzendeInfo As Object = Nothing
    Property nctsWpVp_ErgaenzendeInfoSprachCode As Object = Nothing



    Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL

    Sub New()
        '   Me.nctsWpVp_nctsWPId = nctsWpVp_nctsWPId
    End Sub


    Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
        Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpVp_Id", nctsWpVp_Id, , True, True))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpVp_nctsWPId", nctsWpVp_nctsWPId))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpVp_NctsId", nctsWpVp_NctsId))


        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpVp_VorpapierArt", nctsWpVp_VorpapierArt))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpVp_Referenz", nctsWpVp_Referenz))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpVp_SprachCode", nctsWpVp_SprachCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpVp_ErgaenzendeInfo", nctsWpVp_ErgaenzendeInfo))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpVp_ErgaenzendeInfoSprachCode", nctsWpVp_ErgaenzendeInfoSprachCode))
        Return list
    End Function


    Public Function INSERT() As Boolean
        Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
        nctsWpVp_Id = SQL.doSQLVarListID(nctsWpVp_Id, getInsertCmd(), "FMZOLL", , list)
        Return nctsWpVp_Id > 0
    End Function

    Public Function getInsertCmd() As String
        Try
            Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
            Dim str As String = ""
            Dim values As String = ""
            For Each i In list
                If Not i.isPrimaryParam Then
                    str &= "[" & i.Text & "],"
                    values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
                End If
            Next
            str = str.Substring(0, str.Length - 1) 'wg. ','
            values = values.Substring(0, values.Length - 1) 'wg. ','
            Return (" INSERT INTO tblDakosy_NCTSOutAT_WarenpositionVorpapier (" & str & ") VALUES(" & values & ")  ")
        Catch ex As Exception
            MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
        End Try
        Return ""
    End Function

End Class




Public Class cDakosy_AES_WarenpositionZusatzangaben

    Property nctsWpZa_Id As Integer
    Property nctsWpZa_nctsWPId As Integer
    Property nctsWpZa_NctsId As Integer




    Property nctsWpZa_ZusaetzlicheInformation As Object = Nothing
    Property nctsWpZa_ZusaetzlicheInformationSprachCode As Object = Nothing
    Property nctsWpZa_Code As Object = Nothing
    Property nctsWpZa_AusfuhrAusEU As Object = Nothing
    Property nctsWpZa_AusfuhrLand As Object = Nothing


    Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL

    Sub New()
        '   Me.nctsWpZa_nctsWPId = nctsWpZa_nctsWPId
    End Sub


    Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
        Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpZa_Id", nctsWpZa_Id, , True, True))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpZa_nctsWPId", nctsWpZa_nctsWPId))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpZa_NctsId", nctsWpZa_NctsId))


        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpZa_ZusaetzlicheInformation", nctsWpZa_ZusaetzlicheInformation))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpZa_ZusaetzlicheInformationSprachCode", nctsWpZa_ZusaetzlicheInformationSprachCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpZa_Code", nctsWpZa_Code))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpZa_AusfuhrAusEU", nctsWpZa_AusfuhrAusEU))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpZa_AusfuhrLand", nctsWpZa_AusfuhrLand))
        Return list
    End Function


    Public Function INSERT() As Boolean
        Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
        nctsWpZa_Id = SQL.doSQLVarListID(nctsWpZa_Id, getInsertCmd(), "FMZOLL", , list)
        Return nctsWpZa_Id > 0
    End Function

    Public Function getInsertCmd() As String
        Try
            Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
            Dim str As String = ""
            Dim values As String = ""
            For Each i In list
                If Not i.isPrimaryParam Then
                    str &= "[" & i.Text & "],"
                    values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
                End If
            Next
            str = str.Substring(0, str.Length - 1) 'wg. ','
            values = values.Substring(0, values.Length - 1) 'wg. ','
            Return (" INSERT INTO tblDakosy_NCTSOutAT_WarenpositionZusatzangaben (" & str & ") VALUES(" & values & ")  ")
        Catch ex As Exception
            MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
        End Try
        Return ""
    End Function

End Class

Public Class cDakosy_NCTSOutAT_WarenpositionVorgelegteUnterlagen

    Property nctsWpUl_Id As Integer
    Property nctsWpUl_nctsWPId As Integer
    Property nctsWpUl_NctsId As Integer
    Property nctsWpUl_Typ As Object = Nothing
    Property nctsWpUl_Referenz As Object = Nothing
    Property nctsWpUl_Zusatz As Object = Nothing

    'NEU:
    Property nctsWpUl_TypBezeichnung As Object = Nothing
    Property nctsWpUl_ReferenzSprachcode As Object = Nothing
    Property nctsWpUl_Ausstellungsdatum As Object = Nothing
    Property nctsWpUl_AusstellungsLand As Object = Nothing
    Property nctsWpUl_Name As Object = Nothing
    Property nctsWpUl_StrasseHausnummer As Object = Nothing
    Property nctsWpUl_PLZ As Object = Nothing
    Property nctsWpUl_Ort As Object = Nothing
    Property nctsWpUl_Land As Object = Nothing
    Property nctsWpUl_SprachCode As Object = Nothing
    Property nctsWpUl_DokumentenTIN As Object = Nothing
    Property nctsWpUl_DokumentenUID As Object = Nothing
    Property nctsWpUl_Ausstellungsbehoerde As Object = Nothing
    Property nctsWpUl_EndeGueltigkeit As Object = Nothing
    Property nctsWpUl_EndeGueltigkeitMax As Object = Nothing
    Property nctsWpUl_ErgaenzendeInfo As Object = Nothing
    Property nctsWpUl_ErgaenzendeInfoSprachCode As Object = Nothing


    Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL

    Sub New()
        '  Me.nctsWpUl_nctsWPId = nctsWpUl_nctsWPId
    End Sub


    Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
        Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpUl_Id", nctsWpUl_Id, , True, True))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpUl_nctsWPId", nctsWpUl_nctsWPId))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpUl_NctsId", nctsWpUl_NctsId))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpUl_Typ", nctsWpUl_Typ))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpUl_Referenz", nctsWpUl_Referenz))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpUl_Zusatz", nctsWpUl_Zusatz))

        'NEU:

        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpUl_TypBezeichnung", nctsWpUl_TypBezeichnung))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpUl_ReferenzSprachcode", nctsWpUl_ReferenzSprachcode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpUl_Ausstellungsdatum", nctsWpUl_Ausstellungsdatum))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpUl_AusstellungsLand", nctsWpUl_AusstellungsLand))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpUl_Name", nctsWpUl_Name))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpUl_StrasseHausnummer", nctsWpUl_StrasseHausnummer))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpUl_PLZ", nctsWpUl_PLZ))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpUl_Ort", nctsWpUl_Ort))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpUl_Land", nctsWpUl_Land))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpUl_SprachCode", nctsWpUl_SprachCode))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpUl_DokumentenTIN", nctsWpUl_DokumentenTIN))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpUl_DokumentenUID", nctsWpUl_DokumentenUID))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpUl_Ausstellungsbehoerde", nctsWpUl_Ausstellungsbehoerde))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpUl_EndeGueltigkeit", nctsWpUl_EndeGueltigkeit))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpUl_EndeGueltigkeitMax", nctsWpUl_EndeGueltigkeitMax))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpUl_ErgaenzendeInfo", nctsWpUl_ErgaenzendeInfo))
        list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsWpUl_ErgaenzendeInfoSprachCode", nctsWpUl_ErgaenzendeInfoSprachCode))
        Return list
    End Function


    Public Function INSERT() As Boolean
        Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
        nctsWpUl_Id = SQL.doSQLVarListID(nctsWpUl_Id, getInsertCmd(), "FMZOLL", , list)
        Return nctsWpUl_Id > 0
    End Function

    Public Function getInsertCmd() As String
        Try
            Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()
            Dim str As String = ""
            Dim values As String = ""
            For Each i In list
                If Not i.isPrimaryParam Then
                    str &= "[" & i.Text & "],"
                    values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & ","
                End If
            Next
            str = str.Substring(0, str.Length - 1) 'wg. ','
            values = values.Substring(0, values.Length - 1) 'wg. ','
            Return (" INSERT INTO tblDakosy_NCTSOutAT_WarenpositionVorgelegteUnterlagen (" & str & ") VALUES(" & values & ")  ")
        Catch ex As Exception
            MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
        End Try
        Return ""
    End Function

End Class
