neu
This commit is contained in:
@@ -206,331 +206,333 @@ Public Class frmDYNachrichtenVerarbeitung
|
||||
Dim statusTMP As DAKOSY_Worker.cDakosy_Statusmeldungen = Nothing
|
||||
|
||||
Dim fi As FileInfo = New FileInfo(d)
|
||||
If Not fi.Name.StartsWith(".") Then
|
||||
|
||||
' EDIFACT
|
||||
' If fi.Extension = ".edi" Then
|
||||
Dim alreadyMoved = False
|
||||
If fi.Extension = ".nlc" Then ' Or fi.Name.StartsWith("ZA") Then
|
||||
If Not IO.Directory.Exists(VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.getRootDir() & "DAKOSY\ECHTSYSTEM\nlc\") Then IO.Directory.CreateDirectory(VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.getRootDir() & "DAKOSY\ECHTSYSTEM\nlc\")
|
||||
frmStartOptions.moveFile(d, VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.getRootDir() & "DAKOSY\ECHTSYSTEM\nlc\")
|
||||
alreadyMoved = True
|
||||
addDGVEinarbeitung("** NLC-Datei **", fi.Name)
|
||||
ElseIf fi.Extension = ".edi" Then ' Or fi.Name.StartsWith("ZA") Then
|
||||
Dim s As String = File.ReadAllText(d, System.Text.UTF8Encoding.Default)
|
||||
If s.Contains("'") Then
|
||||
Dim lines = s.Split("'")
|
||||
For i = 0 To lines.Count - 1
|
||||
lines(i) = lines(i).Replace("?+", "|plus|").Replace("?:", "|dppkt|").Replace("?.", "|pkt|") ' Da '+' ein Splitter ist, wird ein '+' als Text wie folgt dargestellt: '?+', --> Ersezten
|
||||
Next
|
||||
|
||||
'NCTS: Versandanmeldung
|
||||
If Not found AndAlso cGetMsgType.isNCTS_Versandanmeldung(lines) Then
|
||||
Dim bezugsNr = cWorker_NCTS.readNCTS_Versandanmeldung(Me, lines)
|
||||
If bezugsNr <> "" Then addDGVEinarbeitung("NCTS: Versandanmeldung", bezugsNr) : found = True
|
||||
End If
|
||||
|
||||
'EZA: FreierVerkehrAktVeredelUmwandlung
|
||||
If Not found AndAlso cGetMsgType.isEZA_FreierVerkehrAktVeredelUmwandlung(lines) Then
|
||||
Dim bezugsNr = readEZA_FreierVerkehrAktVeredelUmwandlung(lines)
|
||||
If bezugsNr <> "" Then
|
||||
addDGVEinarbeitung("EZA: FreierVerkehr", bezugsNr) : found = True
|
||||
found = True
|
||||
End If
|
||||
End If
|
||||
|
||||
'NCTS: Ankunftsanzeige
|
||||
If Not found AndAlso cGetMsgType.isNCTS_Ankunftsanzeige(lines) Then
|
||||
Dim bezugsNr = cWorker_NCTS.readNCTS_Ankunftsanzeige(Me, lines)
|
||||
If bezugsNr <> "" Then addDGVEinarbeitung("NCTS: Ankunftsanzeige", bezugsNr) : found = True
|
||||
End If
|
||||
|
||||
' EDIFACT
|
||||
' If fi.Extension = ".edi" Then
|
||||
Dim alreadyMoved = False
|
||||
If fi.Extension = ".nlc" Then ' Or fi.Name.StartsWith("ZA") Then
|
||||
If Not IO.Directory.Exists(VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.getRootDir() & "DAKOSY\ECHTSYSTEM\nlc\") Then IO.Directory.CreateDirectory(VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.getRootDir() & "DAKOSY\ECHTSYSTEM\nlc\")
|
||||
frmStartOptions.moveFile(d, VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.getRootDir() & "DAKOSY\ECHTSYSTEM\nlc\")
|
||||
alreadyMoved = True
|
||||
addDGVEinarbeitung("** NLC-Datei **", fi.Name)
|
||||
ElseIf fi.Extension = ".edi" Then ' Or fi.Name.StartsWith("ZA") Then
|
||||
Dim s As String = File.ReadAllText(d, System.Text.UTF8Encoding.Default)
|
||||
If s.Contains("'") Then
|
||||
Dim lines = s.Split("'")
|
||||
For i = 0 To lines.Count - 1
|
||||
lines(i) = lines(i).Replace("?+", "|plus|").Replace("?:", "|dppkt|").Replace("?.", "|pkt|") ' Da '+' ein Splitter ist, wird ein '+' als Text wie folgt dargestellt: '?+', --> Ersezten
|
||||
Next
|
||||
|
||||
'NCTS: Versandanmeldung
|
||||
If Not found AndAlso cGetMsgType.isNCTS_Versandanmeldung(lines) Then
|
||||
Dim bezugsNr = cWorker_NCTS.readNCTS_Versandanmeldung(Me, lines)
|
||||
If bezugsNr <> "" Then addDGVEinarbeitung("NCTS: Versandanmeldung", bezugsNr) : found = True
|
||||
End If
|
||||
|
||||
'EZA: FreierVerkehrAktVeredelUmwandlung
|
||||
If Not found AndAlso cGetMsgType.isEZA_FreierVerkehrAktVeredelUmwandlung(lines) Then
|
||||
Dim bezugsNr = readEZA_FreierVerkehrAktVeredelUmwandlung(lines)
|
||||
'XML
|
||||
ElseIf fi.Extension = ".xml" Then
|
||||
Dim xmlWriterSettings As XmlWriterSettings = New XmlWriterSettings With {.Encoding = System.Text.Encoding.UTF8, .CheckCharacters = True}
|
||||
|
||||
Dim doc As New XmlDocument()
|
||||
|
||||
|
||||
Dim XML_Code = System.IO.File.ReadAllText(d, System.Text.UTF8Encoding.Default)
|
||||
|
||||
doc.LoadXml(SanitizeXmlString(XML_Code))
|
||||
|
||||
Dim VERSION As String = ""
|
||||
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------
|
||||
' ATLAS
|
||||
'------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
'------------------------------------------
|
||||
'------------------ NCTS ------------------
|
||||
'------------------------------------------
|
||||
|
||||
'NCTS: Versandanmeldung
|
||||
If Not found AndAlso cGetMsgType.isNCTS_VersandanmeldungXML(doc) Then
|
||||
If cWorker_NCTS.readNCTS_VersandanmeldungXML(Me, doc, statusTMP) <> "" Then found = True
|
||||
End If
|
||||
|
||||
'NCTS: Ankunftsanzeige
|
||||
If Not found AndAlso cGetMsgType.isNCTS_AnkunftsanzeigeXML(doc) Then
|
||||
If cWorker_NCTS.readNCTS_AnkunftsanzeigeXML(doc) <> "" Then found = True
|
||||
End If
|
||||
|
||||
'NCTS: Versandbestätigung
|
||||
If Not found And cGetMsgType.isNCTS_Versandbestaetigung(doc) Then
|
||||
If cWorker_NCTS.readNCTS_Versandbestaetigung(Me, d) <> "" Then found = True
|
||||
' If bezugsNr <> "" Then addDGVEinarbeitung("NCTS: Versandbestätigung", bezugsNr) : found = True
|
||||
End If
|
||||
|
||||
'NCTS: Ueberlassungsmeldung
|
||||
If Not found And cGetMsgType.isNCTS_Ueberlassungsmeldung(doc, VERSION) Then
|
||||
Select Case VERSION
|
||||
Case "007" : If cWorker_NCTS.readNCTS_Ueberlassungsmeldung007(Me, d, statusTMP) <> "" Then found = True ': MsgBox("005!")
|
||||
Case "006" : If cWorker_NCTS.readNCTS_Ueberlassungsmeldung006(Me, d, statusTMP) <> "" Then found = True ': MsgBox("005!")
|
||||
Case "005" : If cWorker_NCTS.readNCTS_Ueberlassungsmeldung005(Me, d, statusTMP) <> "" Then found = True ': MsgBox("005!")
|
||||
Case Else : If cWorker_NCTS.readNCTS_Ueberlassungsmeldung(Me, d, statusTMP) <> "" Then found = True
|
||||
End Select
|
||||
End If
|
||||
|
||||
'NCTS: AnrechnungReferenzbetraege
|
||||
If Not found And cGetMsgType.isNCTS_AnrechnungReferenzbetraege(doc) Then
|
||||
If cWorker_NCTS.readNCTS_AnrechnungReferenzbetraege(Me, d) <> "" Then found = True
|
||||
End If
|
||||
|
||||
'NCTS: Erledigungsmeldung
|
||||
If Not found And cGetMsgType.isNCTS_Erledigungsmeldung(doc) Then
|
||||
If cWorker_NCTS.readNCTS_Erledigungsmeldung(Me, d) <> "" Then found = True
|
||||
End If
|
||||
|
||||
'NCTS: StatusmeldungNCTSDE
|
||||
If Not found And cGetMsgType.isNCTS_StatusmeldungNCTSDE(doc) Then
|
||||
If cWorker_NCTS.readNCTS_StatusmeldungNCTSDE(Me, d) <> "" Then found = True
|
||||
End If
|
||||
|
||||
'NCTS: UngueltigkeitSicherheitenNCTSDE
|
||||
If Not found And cGetMsgType.isNCTS_UngueltigkeitSicherheitenNCTSDE(doc, VERSION) Then
|
||||
Select Case VERSION
|
||||
Case "003" : If cWorker_NCTS.readNCTS_UngueltigkeitSicherheitenNCTSDE003(Me, d) <> "" Then found = True ': MsgBox("005!")
|
||||
Case Else : If cWorker_NCTS.readNCTS_UngueltigkeitSicherheitenNCTSDE(Me, d) <> "" Then found = True
|
||||
End Select
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
'------------------------------------------
|
||||
'------------------ EZA ------------------
|
||||
'------------------------------------------
|
||||
|
||||
|
||||
'EZA: FreierVerkehrAktVeredelUmwandlung NEU XML
|
||||
If Not found AndAlso cGetMsgType.isEZA_FreierVerkehrAktVeredelUmwandlungXML(doc) Then
|
||||
Dim bezugsNr = readEZA_FreierVerkehrAktVeredelUmwandlungXML(doc)
|
||||
If bezugsNr <> "" Then
|
||||
found = True
|
||||
End If
|
||||
End If
|
||||
'EZA: FreierVerkehrAktVeredelUmwandlung NEU XML
|
||||
If Not found AndAlso cGetMsgType.isEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDD(doc) Then
|
||||
Dim bezugsNr = readEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDD(doc)
|
||||
If bezugsNr <> "" Then
|
||||
addDGVEinarbeitung("EZA: FreierVerkehr", bezugsNr) : found = True
|
||||
found = True
|
||||
End If
|
||||
End If
|
||||
|
||||
'NCTS: Ankunftsanzeige
|
||||
If Not found AndAlso cGetMsgType.isNCTS_Ankunftsanzeige(lines) Then
|
||||
Dim bezugsNr = cWorker_NCTS.readNCTS_Ankunftsanzeige(Me, lines)
|
||||
If bezugsNr <> "" Then addDGVEinarbeitung("NCTS: Ankunftsanzeige", bezugsNr) : found = True
|
||||
'EZA: EntscheidungAnmeldung
|
||||
If Not found And cGetMsgType.isEZA_EntscheidungAnmeldung(doc) Then
|
||||
If readEZA_EntscheidungAnmeldung(d) <> "" Then found = True
|
||||
End If
|
||||
|
||||
'EZA: SumAErledigungsinformationVorpapier
|
||||
If Not found And cGetMsgType.isEZA_SumAErledigungsinformationVorpapier(doc) Then
|
||||
If readEZA_SumAErledigungsinformationVorpapier(d) <> "" Then found = True
|
||||
End If
|
||||
|
||||
'EZA: Abgabenbescheid
|
||||
If Not found And cGetMsgType.isEZA_Abgabenbescheid(doc, VERSION) Then
|
||||
Select Case VERSION
|
||||
Case "009" : If readEZA_Abgabenbescheid009(d, statusTMP) <> "" Then found = True
|
||||
Case "008" : If readEZA_Abgabenbescheid008(d) <> "" Then found = True
|
||||
Case Else : If readEZA_Abgabenbescheid(d) <> "" Then found = True
|
||||
End Select
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
'EZA: NichtAbschliessendeFestsetzung
|
||||
If Not found And cGetMsgType.isEZA_NichtAbschliessendeFestsetzung(doc, VERSION) Then
|
||||
Select Case VERSION
|
||||
Case "003" : If readEZA_NichtAbschliessendeFestsetzung003(d) <> "" Then found = True
|
||||
Case Else : If readEZA_NichtAbschliessendeFestsetzung(d) <> "" Then found = True
|
||||
End Select
|
||||
End If
|
||||
|
||||
'XML
|
||||
ElseIf fi.Extension = ".xml" Then
|
||||
Dim xmlWriterSettings As XmlWriterSettings = New XmlWriterSettings With {.Encoding = System.Text.Encoding.UTF8, .CheckCharacters = True}
|
||||
'EZA: AbschliessendeFestsetzung
|
||||
If Not found And cGetMsgType.isEZA_AbschliessendeFestsetzung(doc, VERSION) Then
|
||||
Select Case VERSION
|
||||
Case "004" : If readEZA_AbschliessendeFestsetzung004(d) <> "" Then found = True
|
||||
Case Else : If readEZA_AbschliessendeFestsetzung(d) <> "" Then found = True
|
||||
End Select
|
||||
|
||||
Dim doc As New XmlDocument()
|
||||
End If
|
||||
|
||||
'EZA: StornierungBescheid
|
||||
If Not found And cGetMsgType.isEZA_StornierungBescheid(doc) Then
|
||||
If readEZA_StornierungBescheid(d) <> "" Then found = True
|
||||
End If
|
||||
|
||||
'EZA: BefundVereinfachteZollanmeldung
|
||||
If Not found And cGetMsgType.isEZA_BefundVereinfachteZollanmeldung(doc, VERSION) Then
|
||||
Select Case VERSION
|
||||
Case "006" : found = True : addDGVEinarbeitung("*EZA: BefundVereinfachteZollanmeldung", "-")
|
||||
Case "007" : found = True : addDGVEinarbeitung("*EZA: BefundVereinfachteZollanmeldung", "-")
|
||||
Case Else : found = True : addDGVEinarbeitung("*EZA: BefundVereinfachteZollanmeldung", "-")
|
||||
End Select
|
||||
|
||||
|
||||
Dim XML_Code = System.IO.File.ReadAllText(d, System.Text.UTF8Encoding.Default)
|
||||
End If
|
||||
|
||||
doc.LoadXml(SanitizeXmlString(XML_Code))
|
||||
'EZA: MitteilungAbschreibung
|
||||
If Not found And cGetMsgType.isEZA_MitteilungAbschreibung(doc) Then
|
||||
found = True : addDGVEinarbeitung("*EZA: MitteilungAbschreibung", "-")
|
||||
End If
|
||||
|
||||
Dim VERSION As String = ""
|
||||
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------
|
||||
' ATLAS
|
||||
'------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
'------------------------------------------
|
||||
'------------------ NCTS ------------------
|
||||
'------------------------------------------
|
||||
|
||||
'NCTS: Versandanmeldung
|
||||
If Not found AndAlso cGetMsgType.isNCTS_VersandanmeldungXML(doc) Then
|
||||
If cWorker_NCTS.readNCTS_VersandanmeldungXML(Me, doc, statusTMP) <> "" Then found = True
|
||||
End If
|
||||
|
||||
'NCTS: Ankunftsanzeige
|
||||
If Not found AndAlso cGetMsgType.isNCTS_AnkunftsanzeigeXML(doc) Then
|
||||
If cWorker_NCTS.readNCTS_AnkunftsanzeigeXML(doc) <> "" Then found = True
|
||||
End If
|
||||
|
||||
'NCTS: Versandbestätigung
|
||||
If Not found And cGetMsgType.isNCTS_Versandbestaetigung(doc) Then
|
||||
If cWorker_NCTS.readNCTS_Versandbestaetigung(Me, d) <> "" Then found = True
|
||||
' If bezugsNr <> "" Then addDGVEinarbeitung("NCTS: Versandbestätigung", bezugsNr) : found = True
|
||||
End If
|
||||
|
||||
'NCTS: Ueberlassungsmeldung
|
||||
If Not found And cGetMsgType.isNCTS_Ueberlassungsmeldung(doc, VERSION) Then
|
||||
Select Case VERSION
|
||||
Case "007" : If cWorker_NCTS.readNCTS_Ueberlassungsmeldung007(Me, d, statusTMP) <> "" Then found = True ': MsgBox("005!")
|
||||
Case "006" : If cWorker_NCTS.readNCTS_Ueberlassungsmeldung006(Me, d, statusTMP) <> "" Then found = True ': MsgBox("005!")
|
||||
Case "005" : If cWorker_NCTS.readNCTS_Ueberlassungsmeldung005(Me, d, statusTMP) <> "" Then found = True ': MsgBox("005!")
|
||||
Case Else : If cWorker_NCTS.readNCTS_Ueberlassungsmeldung(Me, d, statusTMP) <> "" Then found = True
|
||||
End Select
|
||||
End If
|
||||
|
||||
'NCTS: AnrechnungReferenzbetraege
|
||||
If Not found And cGetMsgType.isNCTS_AnrechnungReferenzbetraege(doc) Then
|
||||
If cWorker_NCTS.readNCTS_AnrechnungReferenzbetraege(Me, d) <> "" Then found = True
|
||||
End If
|
||||
|
||||
'NCTS: Erledigungsmeldung
|
||||
If Not found And cGetMsgType.isNCTS_Erledigungsmeldung(doc) Then
|
||||
If cWorker_NCTS.readNCTS_Erledigungsmeldung(Me, d) <> "" Then found = True
|
||||
End If
|
||||
|
||||
'NCTS: StatusmeldungNCTSDE
|
||||
If Not found And cGetMsgType.isNCTS_StatusmeldungNCTSDE(doc) Then
|
||||
If cWorker_NCTS.readNCTS_StatusmeldungNCTSDE(Me, d) <> "" Then found = True
|
||||
End If
|
||||
|
||||
'NCTS: UngueltigkeitSicherheitenNCTSDE
|
||||
If Not found And cGetMsgType.isNCTS_UngueltigkeitSicherheitenNCTSDE(doc, VERSION) Then
|
||||
Select Case VERSION
|
||||
Case "003" : If cWorker_NCTS.readNCTS_UngueltigkeitSicherheitenNCTSDE003(Me, d) <> "" Then found = True ': MsgBox("005!")
|
||||
Case Else : If cWorker_NCTS.readNCTS_UngueltigkeitSicherheitenNCTSDE(Me, d) <> "" Then found = True
|
||||
End Select
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
'------------------------------------------
|
||||
'------------------ EZA ------------------
|
||||
'------------------------------------------
|
||||
|
||||
|
||||
'EZA: FreierVerkehrAktVeredelUmwandlung NEU XML
|
||||
If Not found AndAlso cGetMsgType.isEZA_FreierVerkehrAktVeredelUmwandlungXML(doc) Then
|
||||
Dim bezugsNr = readEZA_FreierVerkehrAktVeredelUmwandlungXML(doc)
|
||||
If bezugsNr <> "" Then
|
||||
'EZA: WeitergabeHauptzollamt
|
||||
If Not found And cGetMsgType.isEZA_WeitergabeHauptzollamt(doc) Then
|
||||
found = True
|
||||
End If
|
||||
End If
|
||||
'EZA: FreierVerkehrAktVeredelUmwandlung NEU XML
|
||||
If Not found AndAlso cGetMsgType.isEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDD(doc) Then
|
||||
Dim bezugsNr = readEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDD(doc)
|
||||
If bezugsNr <> "" Then
|
||||
found = True
|
||||
End If
|
||||
End If
|
||||
|
||||
'EZA: EntscheidungAnmeldung
|
||||
If Not found And cGetMsgType.isEZA_EntscheidungAnmeldung(doc) Then
|
||||
If readEZA_EntscheidungAnmeldung(d) <> "" Then found = True
|
||||
End If
|
||||
|
||||
'EZA: SumAErledigungsinformationVorpapier
|
||||
If Not found And cGetMsgType.isEZA_SumAErledigungsinformationVorpapier(doc) Then
|
||||
If readEZA_SumAErledigungsinformationVorpapier(d) <> "" Then found = True
|
||||
End If
|
||||
|
||||
'EZA: Abgabenbescheid
|
||||
If Not found And cGetMsgType.isEZA_Abgabenbescheid(doc, VERSION) Then
|
||||
Select Case VERSION
|
||||
Case "009" : If readEZA_Abgabenbescheid009(d, statusTMP) <> "" Then found = True
|
||||
Case "008" : If readEZA_Abgabenbescheid008(d) <> "" Then found = True
|
||||
Case Else : If readEZA_Abgabenbescheid(d) <> "" Then found = True
|
||||
End Select
|
||||
End If
|
||||
|
||||
|
||||
'EZA: NichtAbschliessendeFestsetzung
|
||||
If Not found And cGetMsgType.isEZA_NichtAbschliessendeFestsetzung(doc, VERSION) Then
|
||||
Select Case VERSION
|
||||
Case "003" : If readEZA_NichtAbschliessendeFestsetzung003(d) <> "" Then found = True
|
||||
Case Else : If readEZA_NichtAbschliessendeFestsetzung(d) <> "" Then found = True
|
||||
End Select
|
||||
End If
|
||||
|
||||
'EZA: AbschliessendeFestsetzung
|
||||
If Not found And cGetMsgType.isEZA_AbschliessendeFestsetzung(doc, VERSION) Then
|
||||
Select Case VERSION
|
||||
Case "004" : If readEZA_AbschliessendeFestsetzung004(d) <> "" Then found = True
|
||||
Case Else : If readEZA_AbschliessendeFestsetzung(d) <> "" Then found = True
|
||||
End Select
|
||||
|
||||
End If
|
||||
|
||||
'EZA: StornierungBescheid
|
||||
If Not found And cGetMsgType.isEZA_StornierungBescheid(doc) Then
|
||||
If readEZA_StornierungBescheid(d) <> "" Then found = True
|
||||
End If
|
||||
|
||||
'EZA: BefundVereinfachteZollanmeldung
|
||||
If Not found And cGetMsgType.isEZA_BefundVereinfachteZollanmeldung(doc, VERSION) Then
|
||||
Select Case VERSION
|
||||
Case "006" : found = True : addDGVEinarbeitung("*EZA: BefundVereinfachteZollanmeldung", "-")
|
||||
Case "007" : found = True : addDGVEinarbeitung("*EZA: BefundVereinfachteZollanmeldung", "-")
|
||||
Case Else : found = True : addDGVEinarbeitung("*EZA: BefundVereinfachteZollanmeldung", "-")
|
||||
End Select
|
||||
|
||||
|
||||
End If
|
||||
|
||||
'EZA: MitteilungAbschreibung
|
||||
If Not found And cGetMsgType.isEZA_MitteilungAbschreibung(doc) Then
|
||||
found = True : addDGVEinarbeitung("*EZA: MitteilungAbschreibung", "-")
|
||||
End If
|
||||
|
||||
'EZA: WeitergabeHauptzollamt
|
||||
If Not found And cGetMsgType.isEZA_WeitergabeHauptzollamt(doc) Then
|
||||
found = True
|
||||
addDGVEinarbeitung("*EZA: WeitergabeHauptzollamt", "-")
|
||||
End If
|
||||
|
||||
|
||||
'------------------------------------------
|
||||
'------------------ AES ------------------
|
||||
'------------------------------------------
|
||||
|
||||
If Not found Then
|
||||
|
||||
Dim doc2 As New XmlDocument()
|
||||
Dim XML_Code2 = System.IO.File.ReadAllText(d, System.Text.ASCIIEncoding.UTF8)
|
||||
doc2.LoadXml(SanitizeXmlString(XML_Code2))
|
||||
|
||||
'AES: VollstaendigeAusfuhr
|
||||
If Not found And cGetMsgType.isAES_DEXPDD(doc2) Then
|
||||
If readAES_DEXPDD(doc2) <> "" Then found = True
|
||||
End If
|
||||
'AES: VollstaendigeAusfuhr
|
||||
If Not found And cGetMsgType.isAES_DEXPDE(doc2) Then
|
||||
If readAES_DEXPDE(doc2) <> "" Then found = True
|
||||
addDGVEinarbeitung("*EZA: WeitergabeHauptzollamt", "-")
|
||||
End If
|
||||
|
||||
'AES: Statusmeldung
|
||||
If Not found And cGetMsgType.isAES_DEXPSD(doc2) Then
|
||||
If readAES_DEXPSD(doc2) <> "" Then found = True
|
||||
End If
|
||||
|
||||
'AES: DeliveryNotification
|
||||
If Not found And cGetMsgType.isAES_DeliveryNotification(doc2) Then
|
||||
found = True
|
||||
addDGVEinarbeitung("*AES: DeliveryNotification", "-")
|
||||
End If
|
||||
'------------------------------------------
|
||||
'------------------ AES ------------------
|
||||
'------------------------------------------
|
||||
|
||||
'AES: DEXPRE - Überlassung 2.3
|
||||
If Not found And cGetMsgType.isAES_DEXPRD(doc2) Then
|
||||
If readAES_DEXPRD(doc2) <> "" Then found = True
|
||||
End If
|
||||
If Not found Then
|
||||
|
||||
'AES: DEXPRE - Überlassung 2.4
|
||||
If Not found And cGetMsgType.isAES_DEXPRE(doc2) Then
|
||||
If readAES_DEXPRE(doc2) <> "" Then found = True
|
||||
End If
|
||||
Dim doc2 As New XmlDocument()
|
||||
Dim XML_Code2 = System.IO.File.ReadAllText(d, System.Text.ASCIIEncoding.UTF8)
|
||||
doc2.LoadXml(SanitizeXmlString(XML_Code2))
|
||||
|
||||
'AES: Error
|
||||
If Not found And cGetMsgType.isAES_DEERRE(doc2) Then
|
||||
readAES_DEERRE(doc2)
|
||||
found = True
|
||||
End If
|
||||
|
||||
'AES: DEXPNE - Mitteilung
|
||||
If Not found And (cGetMsgType.isAES_DEXPNE(doc2) Or cGetMsgType.isAES_DEXPND(doc2)) Then
|
||||
found = True
|
||||
addDGVEinarbeitung("*AES: Mitteilung", "-")
|
||||
End If
|
||||
|
||||
'AES: Storno
|
||||
If Not found And cGetMsgType.isAES_DEXPCC(doc2) Then
|
||||
readAES_DEXPCC(doc2)
|
||||
found = True
|
||||
'kann sein, dass keine Bezugsnr gefunden, nur MRN...
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'------------------------------------------
|
||||
'------------------ Diverse ------------------
|
||||
'------------------------------------------
|
||||
'SONDERFALL: Betrifft div. Arten von Anmeldungen: GenerellesEreignis
|
||||
If Not found And cGetMsgType.isNCTS_GenerellesEreignis(doc) Then
|
||||
If readNCTS_GenerellesEreignis(d) Then
|
||||
found = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------
|
||||
' EZOLL
|
||||
'------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
'------------------------------------------
|
||||
'------------------ NCTS ------------------
|
||||
'------------------------------------------
|
||||
|
||||
'NCTS: TR100 Versandanmeldung
|
||||
If Not found And cGetMsgType.isNCTS_AT_TR100_Versandanmeldung(doc) Then
|
||||
If readNCTS_AT_TR100_Versandanmeldung(doc) <> "" Then found = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------
|
||||
' VERAG
|
||||
'------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
'VERAG KD TEST
|
||||
If Not found And cGetMsgType.isVERAG_KD(doc) Then
|
||||
If readVERAG_KD(d) <> "" Then found = True
|
||||
' If bezugsNr <> "" Then addDGVEinarbeitung("NCTS: UngueltigkeitSicherheitenNCTSDE", bezugsNr) : found = True
|
||||
End If
|
||||
|
||||
|
||||
' If found = False Then getString(doc)
|
||||
|
||||
End If
|
||||
|
||||
If True Then
|
||||
If Not alreadyMoved Then
|
||||
If found Then
|
||||
Dim dest = ZIEL_PFAD & Now.Year & "\" & Now.ToString("yyyyMMdd") & "\"
|
||||
If Not IO.Directory.Exists(dest) Then IO.Directory.CreateDirectory(dest)
|
||||
Dim destFile = ""
|
||||
If frmStartOptions.moveFile(d, dest, destFile) Then ' dest: Filename wird angefügt
|
||||
If statusTMP IsNot Nothing Then
|
||||
statusTMP.updatePfad(destFile)
|
||||
End If
|
||||
'AES: VollstaendigeAusfuhr
|
||||
If Not found And cGetMsgType.isAES_DEXPDD(doc2) Then
|
||||
If readAES_DEXPDD(doc2) <> "" Then found = True
|
||||
End If
|
||||
Else
|
||||
frmStartOptions.moveFile(d, ERROR_PFAD)
|
||||
'AES: VollstaendigeAusfuhr
|
||||
If Not found And cGetMsgType.isAES_DEXPDE(doc2) Then
|
||||
If readAES_DEXPDE(doc2) <> "" Then found = True
|
||||
End If
|
||||
|
||||
'AES: Statusmeldung
|
||||
If Not found And cGetMsgType.isAES_DEXPSD(doc2) Then
|
||||
If readAES_DEXPSD(doc2) <> "" Then found = True
|
||||
End If
|
||||
|
||||
'AES: DeliveryNotification
|
||||
If Not found And cGetMsgType.isAES_DeliveryNotification(doc2) Then
|
||||
found = True
|
||||
addDGVEinarbeitung("*AES: DeliveryNotification", "-")
|
||||
End If
|
||||
|
||||
'AES: DEXPRE - Überlassung 2.3
|
||||
If Not found And cGetMsgType.isAES_DEXPRD(doc2) Then
|
||||
If readAES_DEXPRD(doc2) <> "" Then found = True
|
||||
End If
|
||||
|
||||
'AES: DEXPRE - Überlassung 2.4
|
||||
If Not found And cGetMsgType.isAES_DEXPRE(doc2) Then
|
||||
If readAES_DEXPRE(doc2) <> "" Then found = True
|
||||
End If
|
||||
|
||||
'AES: Error
|
||||
If Not found And cGetMsgType.isAES_DEERRE(doc2) Then
|
||||
readAES_DEERRE(doc2)
|
||||
found = True
|
||||
End If
|
||||
|
||||
'AES: DEXPNE - Mitteilung
|
||||
If Not found And (cGetMsgType.isAES_DEXPNE(doc2) Or cGetMsgType.isAES_DEXPND(doc2)) Then
|
||||
found = True
|
||||
addDGVEinarbeitung("*AES: Mitteilung", "-")
|
||||
End If
|
||||
|
||||
'AES: Storno
|
||||
If Not found And cGetMsgType.isAES_DEXPCC(doc2) Then
|
||||
readAES_DEXPCC(doc2)
|
||||
found = True
|
||||
'kann sein, dass keine Bezugsnr gefunden, nur MRN...
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'------------------------------------------
|
||||
'------------------ Diverse ------------------
|
||||
'------------------------------------------
|
||||
'SONDERFALL: Betrifft div. Arten von Anmeldungen: GenerellesEreignis
|
||||
If Not found And cGetMsgType.isNCTS_GenerellesEreignis(doc) Then
|
||||
If readNCTS_GenerellesEreignis(d) Then
|
||||
found = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------
|
||||
' EZOLL
|
||||
'------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
'------------------------------------------
|
||||
'------------------ NCTS ------------------
|
||||
'------------------------------------------
|
||||
|
||||
'NCTS: TR100 Versandanmeldung
|
||||
If Not found And cGetMsgType.isNCTS_AT_TR100_Versandanmeldung(doc) Then
|
||||
If readNCTS_AT_TR100_Versandanmeldung(doc) <> "" Then found = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'------------------------------------------------------------------------------------------------------------------------------
|
||||
' VERAG
|
||||
'------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
'VERAG KD TEST
|
||||
If Not found And cGetMsgType.isVERAG_KD(doc) Then
|
||||
If readVERAG_KD(d) <> "" Then found = True
|
||||
' If bezugsNr <> "" Then addDGVEinarbeitung("NCTS: UngueltigkeitSicherheitenNCTSDE", bezugsNr) : found = True
|
||||
End If
|
||||
|
||||
|
||||
' If found = False Then getString(doc)
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
If True Then
|
||||
If Not alreadyMoved Then
|
||||
If found Then
|
||||
Dim dest = ZIEL_PFAD & Now.Year & "\" & Now.ToString("yyyyMMdd") & "\"
|
||||
If Not IO.Directory.Exists(dest) Then IO.Directory.CreateDirectory(dest)
|
||||
Dim destFile = ""
|
||||
If frmStartOptions.moveFile(d, dest, destFile) Then ' dest: Filename wird angefügt
|
||||
If statusTMP IsNot Nothing Then
|
||||
statusTMP.updatePfad(destFile)
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
frmStartOptions.moveFile(d, ERROR_PFAD)
|
||||
End If
|
||||
End If
|
||||
|
||||
Me.Refresh()
|
||||
If found Then cntDatenEingelesen += 1 Else dsNichtErkannt += 1
|
||||
End If
|
||||
|
||||
Me.Refresh()
|
||||
If found Then cntDatenEingelesen += 1 Else dsNichtErkannt += 1
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace & vbNewLine & "Datei: " & Dateiname, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
|
||||
Reference in New Issue
Block a user