diff --git a/SDL/SDL.vbproj b/SDL/SDL.vbproj
index e32a174f..23a59a8e 100644
--- a/SDL/SDL.vbproj
+++ b/SDL/SDL.vbproj
@@ -3379,7 +3379,6 @@
usrCntlMDMDatenverarbeitungAuswertungen_divers.vb
-
frmATR.vb
diff --git a/SDL/Speditionsbuch/Nacherfassung/rptSpeditionsbericht_Gelangensbestaetigung.Designer.vb b/SDL/Speditionsbuch/Nacherfassung/rptSpeditionsbericht_Gelangensbestaetigung.Designer.vb
index f3778e42..5273792a 100644
--- a/SDL/Speditionsbuch/Nacherfassung/rptSpeditionsbericht_Gelangensbestaetigung.Designer.vb
+++ b/SDL/Speditionsbuch/Nacherfassung/rptSpeditionsbericht_Gelangensbestaetigung.Designer.vb
@@ -25,6 +25,11 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
Me.Label5 = New GrapeCity.ActiveReports.SectionReportModel.Label()
Me.Line12 = New GrapeCity.ActiveReports.SectionReportModel.Line()
Me.Detail = New GrapeCity.ActiveReports.SectionReportModel.Detail()
+ Me.lblAbsKdNr = New GrapeCity.ActiveReports.SectionReportModel.Label()
+ Me.lblEmpfKdNr = New GrapeCity.ActiveReports.SectionReportModel.Label()
+ Me.lblEndEmpfKdNr = New GrapeCity.ActiveReports.SectionReportModel.Label()
+ Me.lblFrachtfKdNr = New GrapeCity.ActiveReports.SectionReportModel.Label()
+ Me.lblAuftrKdNr = New GrapeCity.ActiveReports.SectionReportModel.Label()
Me.lblLKWNr = New GrapeCity.ActiveReports.SectionReportModel.Label()
Me.lblAbs = New GrapeCity.ActiveReports.SectionReportModel.Label()
Me.lblBezugsNr = New GrapeCity.ActiveReports.SectionReportModel.Label()
@@ -42,10 +47,6 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
Me.txtPackstücke = New GrapeCity.ActiveReports.SectionReportModel.TextBox()
Me.txtVermerk = New GrapeCity.ActiveReports.SectionReportModel.TextBox()
Me.lblAnzahl = New GrapeCity.ActiveReports.SectionReportModel.Label()
- Me.lblAbsKdNr = New GrapeCity.ActiveReports.SectionReportModel.Label()
- Me.lblEmpfKdNr = New GrapeCity.ActiveReports.SectionReportModel.Label()
- Me.lblAuftrKdNr = New GrapeCity.ActiveReports.SectionReportModel.Label()
- Me.lblFrachtfKdNr = New GrapeCity.ActiveReports.SectionReportModel.Label()
Me.txtKdOpt = New GrapeCity.ActiveReports.SectionReportModel.TextBox()
Me.Line3 = New GrapeCity.ActiveReports.SectionReportModel.Line()
Me.Line11 = New GrapeCity.ActiveReports.SectionReportModel.Line()
@@ -58,7 +59,6 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
Me.Shape2 = New GrapeCity.ActiveReports.SectionReportModel.Shape()
Me.Label7 = New GrapeCity.ActiveReports.SectionReportModel.Label()
Me.lblEndEmpf = New GrapeCity.ActiveReports.SectionReportModel.Label()
- Me.lblEndEmpfKdNr = New GrapeCity.ActiveReports.SectionReportModel.Label()
Me.PageFooter = New GrapeCity.ActiveReports.SectionReportModel.PageFooter()
Me.Label28 = New GrapeCity.ActiveReports.SectionReportModel.Label()
Me.Line2 = New GrapeCity.ActiveReports.SectionReportModel.Line()
@@ -88,6 +88,11 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
CType(Me.Label8, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Label4, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Label5, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.lblAbsKdNr, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.lblEmpfKdNr, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.lblEndEmpfKdNr, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.lblFrachtfKdNr, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.lblAuftrKdNr, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.lblLKWNr, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.lblAbs, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.lblBezugsNr, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -105,10 +110,6 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
CType(Me.txtPackstücke, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.txtVermerk, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.lblAnzahl, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.lblAbsKdNr, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.lblEmpfKdNr, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.lblAuftrKdNr, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.lblFrachtfKdNr, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.txtKdOpt, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Label11, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Label12, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -116,7 +117,6 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
CType(Me.Label20, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Label7, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.lblEndEmpf, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.lblEndEmpfKdNr, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Label28, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.ReportInfo2, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.lblDat, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -162,7 +162,7 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
Me.Label6.Name = "Label6"
Me.Label6.Style = "background-color: #003680; color: White; font-size: 8pt; font-weight: bold; text-" &
"align: left; vertical-align: middle; ddo-char-set: 1"
- Me.Label6.Text = "Bestätigung/Check"
+ Me.Label6.Text = "Check/Bestätigung"
Me.Label6.Top = 0.03622048!
Me.Label6.Width = 1.115747!
'
@@ -174,7 +174,7 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
Me.Label8.Name = "Label8"
Me.Label8.Style = "background-color: #003680; color: White; font-size: 8pt; font-weight: bold; text-" &
"align: left; text-justify: auto; vertical-align: middle; ddo-char-set: 1"
- Me.Label8.Text = "Firmen/Companies"
+ Me.Label8.Text = "Companies/Firmen"
Me.Label8.Top = 0.03622048!
Me.Label8.Width = 3.404331!
'
@@ -186,7 +186,7 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
Me.Label4.Name = "Label4"
Me.Label4.Style = "background-color: #003680; color: White; font-size: 8pt; font-weight: bold; text-" &
"align: left; text-justify: auto; vertical-align: middle; ddo-char-set: 1"
- Me.Label4.Text = "LKW/Truck, Ware/Goods"
+ Me.Label4.Text = "Truck/LKW, Goods/Ware"
Me.Label4.Top = 0.03622063!
Me.Label4.Width = 1.470473!
'
@@ -198,7 +198,7 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
Me.Label5.Name = "Label5"
Me.Label5.Style = "background-color: #003680; color: White; font-size: 8pt; font-weight: bold; text-" &
"align: left; vertical-align: middle; ddo-char-set: 1"
- Me.Label5.Text = "Abfertigung/Decalaration"
+ Me.Label5.Text = "Declaration/Abfertigung"
Me.Label5.Top = 0.03622048!
Me.Label5.Width = 1.479528!
'
@@ -222,6 +222,71 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
Me.Detail.KeepTogether = True
Me.Detail.Name = "Detail"
'
+ 'lblAbsKdNr
+ '
+ Me.lblAbsKdNr.Height = 0.1574803!
+ Me.lblAbsKdNr.HyperLink = Nothing
+ Me.lblAbsKdNr.Left = 3.785039!
+ Me.lblAbsKdNr.Name = "lblAbsKdNr"
+ Me.lblAbsKdNr.Padding = New GrapeCity.ActiveReports.PaddingEx(1, 0, 0, 0)
+ Me.lblAbsKdNr.Style = "font-size: 7pt; font-weight: normal; text-align: left; text-justify: auto; ddo-ch" &
+ "ar-set: 1"
+ Me.lblAbsKdNr.Text = "100000 VERAG"
+ Me.lblAbsKdNr.Top = 0.03149589!
+ Me.lblAbsKdNr.Width = 0.4133854!
+ '
+ 'lblEmpfKdNr
+ '
+ Me.lblEmpfKdNr.Height = 0.1574803!
+ Me.lblEmpfKdNr.HyperLink = Nothing
+ Me.lblEmpfKdNr.Left = 3.785039!
+ Me.lblEmpfKdNr.Name = "lblEmpfKdNr"
+ Me.lblEmpfKdNr.Padding = New GrapeCity.ActiveReports.PaddingEx(1, 0, 0, 0)
+ Me.lblEmpfKdNr.Style = "font-size: 7pt; font-weight: normal; text-align: left; text-justify: auto; ddo-ch" &
+ "ar-set: 1"
+ Me.lblEmpfKdNr.Text = "100000 VERAG"
+ Me.lblEmpfKdNr.Top = 0.1889762!
+ Me.lblEmpfKdNr.Width = 0.4133847!
+ '
+ 'lblEndEmpfKdNr
+ '
+ Me.lblEndEmpfKdNr.Height = 0.1574803!
+ Me.lblEndEmpfKdNr.HyperLink = Nothing
+ Me.lblEndEmpfKdNr.Left = 3.785039!
+ Me.lblEndEmpfKdNr.Name = "lblEndEmpfKdNr"
+ Me.lblEndEmpfKdNr.Padding = New GrapeCity.ActiveReports.PaddingEx(1, 0, 0, 0)
+ Me.lblEndEmpfKdNr.Style = "font-size: 7pt; font-weight: normal; text-align: left; text-justify: auto; ddo-ch" &
+ "ar-set: 1"
+ Me.lblEndEmpfKdNr.Text = "100000 VERAG"
+ Me.lblEndEmpfKdNr.Top = 0.3464565!
+ Me.lblEndEmpfKdNr.Width = 0.4133847!
+ '
+ 'lblFrachtfKdNr
+ '
+ Me.lblFrachtfKdNr.Height = 0.1574803!
+ Me.lblFrachtfKdNr.HyperLink = Nothing
+ Me.lblFrachtfKdNr.Left = 3.785039!
+ Me.lblFrachtfKdNr.Name = "lblFrachtfKdNr"
+ Me.lblFrachtfKdNr.Padding = New GrapeCity.ActiveReports.PaddingEx(1, 0, 0, 0)
+ Me.lblFrachtfKdNr.Style = "font-size: 7pt; font-weight: normal; text-align: left; text-justify: auto; ddo-ch" &
+ "ar-set: 1"
+ Me.lblFrachtfKdNr.Text = "100000 VERAG"
+ Me.lblFrachtfKdNr.Top = 0.6614174!
+ Me.lblFrachtfKdNr.Width = 0.4133847!
+ '
+ 'lblAuftrKdNr
+ '
+ Me.lblAuftrKdNr.Height = 0.1574803!
+ Me.lblAuftrKdNr.HyperLink = Nothing
+ Me.lblAuftrKdNr.Left = 3.785039!
+ Me.lblAuftrKdNr.Name = "lblAuftrKdNr"
+ Me.lblAuftrKdNr.Padding = New GrapeCity.ActiveReports.PaddingEx(1, 0, 0, 0)
+ Me.lblAuftrKdNr.Style = "font-size: 7pt; font-weight: normal; text-align: left; text-justify: auto; ddo-ch" &
+ "ar-set: 1"
+ Me.lblAuftrKdNr.Text = "100000 VERAG"
+ Me.lblAuftrKdNr.Top = 0.5039369!
+ Me.lblAuftrKdNr.Width = 0.4133847!
+ '
'lblLKWNr
'
Me.lblLKWNr.Height = 0.1574803!
@@ -426,58 +491,6 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
Me.lblAnzahl.Top = 0.1889764!
Me.lblAnzahl.Width = 0.2082677!
'
- 'lblAbsKdNr
- '
- Me.lblAbsKdNr.Height = 0.1574803!
- Me.lblAbsKdNr.HyperLink = Nothing
- Me.lblAbsKdNr.Left = 3.785039!
- Me.lblAbsKdNr.Name = "lblAbsKdNr"
- Me.lblAbsKdNr.Padding = New GrapeCity.ActiveReports.PaddingEx(1, 0, 0, 0)
- Me.lblAbsKdNr.Style = "font-size: 7pt; font-weight: normal; text-align: left; text-justify: auto; ddo-ch" &
- "ar-set: 1"
- Me.lblAbsKdNr.Text = "100000 VERAG"
- Me.lblAbsKdNr.Top = 0.03149589!
- Me.lblAbsKdNr.Width = 0.4133854!
- '
- 'lblEmpfKdNr
- '
- Me.lblEmpfKdNr.Height = 0.1574803!
- Me.lblEmpfKdNr.HyperLink = Nothing
- Me.lblEmpfKdNr.Left = 3.785039!
- Me.lblEmpfKdNr.Name = "lblEmpfKdNr"
- Me.lblEmpfKdNr.Padding = New GrapeCity.ActiveReports.PaddingEx(1, 0, 0, 0)
- Me.lblEmpfKdNr.Style = "font-size: 7pt; font-weight: normal; text-align: left; text-justify: auto; ddo-ch" &
- "ar-set: 1"
- Me.lblEmpfKdNr.Text = "100000 VERAG"
- Me.lblEmpfKdNr.Top = 0.1889762!
- Me.lblEmpfKdNr.Width = 0.4133847!
- '
- 'lblAuftrKdNr
- '
- Me.lblAuftrKdNr.Height = 0.1574803!
- Me.lblAuftrKdNr.HyperLink = Nothing
- Me.lblAuftrKdNr.Left = 3.785039!
- Me.lblAuftrKdNr.Name = "lblAuftrKdNr"
- Me.lblAuftrKdNr.Padding = New GrapeCity.ActiveReports.PaddingEx(1, 0, 0, 0)
- Me.lblAuftrKdNr.Style = "font-size: 7pt; font-weight: normal; text-align: left; text-justify: auto; ddo-ch" &
- "ar-set: 1"
- Me.lblAuftrKdNr.Text = "100000 VERAG"
- Me.lblAuftrKdNr.Top = 0.5039369!
- Me.lblAuftrKdNr.Width = 0.4133847!
- '
- 'lblFrachtfKdNr
- '
- Me.lblFrachtfKdNr.Height = 0.1574803!
- Me.lblFrachtfKdNr.HyperLink = Nothing
- Me.lblFrachtfKdNr.Left = 3.785039!
- Me.lblFrachtfKdNr.Name = "lblFrachtfKdNr"
- Me.lblFrachtfKdNr.Padding = New GrapeCity.ActiveReports.PaddingEx(1, 0, 0, 0)
- Me.lblFrachtfKdNr.Style = "font-size: 7pt; font-weight: normal; text-align: left; text-justify: auto; ddo-ch" &
- "ar-set: 1"
- Me.lblFrachtfKdNr.Text = "100000 VERAG"
- Me.lblFrachtfKdNr.Top = 0.6614174!
- Me.lblFrachtfKdNr.Width = 0.4133847!
- '
'txtKdOpt
'
Me.txtKdOpt.CanGrow = False
@@ -544,9 +557,9 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
Me.Label12.HyperLink = Nothing
Me.Label12.Left = 6.356693!
Me.Label12.Name = "Label12"
- Me.Label12.Style = "font-size: 8pt; font-weight: normal; text-align: left; text-decoration: underline" &
- "; text-justify: auto; ddo-char-set: 1"
- Me.Label12.Text = "Eingelangt bei:"
+ Me.Label12.Style = "font-size: 6.5pt; font-weight: normal; text-align: left; text-decoration: underli" &
+ "ne; text-justify: auto; ddo-char-set: 1"
+ Me.Label12.Text = "Received/Eingelangt bei:"
Me.Label12.Top = 0.03307087!
Me.Label12.Width = 1.113386!
'
@@ -556,10 +569,10 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
Me.Label18.HyperLink = Nothing
Me.Label18.Left = 6.474803!
Me.Label18.Name = "Label18"
- Me.Label18.Style = "font-size: 8pt; font-weight: normal; text-align: left; text-decoration: none; tex" &
- "t-justify: auto; ddo-char-set: 3"
+ Me.Label18.Style = "font-size: 7pt; font-weight: normal; text-align: left; text-decoration: none; tex" &
+ "t-justify: auto; ddo-char-set: 1"
Me.Label18.Text = "Trader/Abnehmer"
- Me.Label18.Top = 0.1889764!
+ Me.Label18.Top = 0.1968504!
Me.Label18.Width = 0.9677165!
'
'Label20
@@ -571,7 +584,7 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
Me.Label20.Style = "font-size: 7pt; font-weight: normal; text-align: left; text-decoration: none; tex" &
"t-justify: auto; ddo-char-set: 1"
Me.Label20.Text = "Consignee/Empfänger"
- Me.Label20.Top = 0.3464567!
+ Me.Label20.Top = 0.3543307!
Me.Label20.Width = 1.003937!
'
'Shape1
@@ -618,19 +631,6 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
Me.lblEndEmpf.Top = 0.3464567!
Me.lblEndEmpf.Width = 2.122047!
'
- 'lblEndEmpfKdNr
- '
- Me.lblEndEmpfKdNr.Height = 0.1574803!
- Me.lblEndEmpfKdNr.HyperLink = Nothing
- Me.lblEndEmpfKdNr.Left = 3.785039!
- Me.lblEndEmpfKdNr.Name = "lblEndEmpfKdNr"
- Me.lblEndEmpfKdNr.Padding = New GrapeCity.ActiveReports.PaddingEx(1, 0, 0, 0)
- Me.lblEndEmpfKdNr.Style = "font-size: 7pt; font-weight: normal; text-align: left; text-justify: auto; ddo-ch" &
- "ar-set: 1"
- Me.lblEndEmpfKdNr.Text = "100000 VERAG"
- Me.lblEndEmpfKdNr.Top = 0.3464565!
- Me.lblEndEmpfKdNr.Width = 0.4133847!
- '
'PageFooter
'
Me.PageFooter.Controls.AddRange(New GrapeCity.ActiveReports.SectionReportModel.ARControl() {Me.Label28, Me.Line2, Me.ReportInfo2, Me.lblDat})
@@ -662,7 +662,7 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
'
'ReportInfo2
'
- Me.ReportInfo2.FormatString = "Seite {PageNumber} von {PageCount} Seiten "
+ Me.ReportInfo2.FormatString = "Page/Seite {PageNumber} / {PageCount} Seiten "
Me.ReportInfo2.Height = 0.1330709!
Me.ReportInfo2.Left = 5.032284!
Me.ReportInfo2.Name = "ReportInfo2"
@@ -938,6 +938,11 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
CType(Me.Label8, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Label4, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Label5, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.lblAbsKdNr, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.lblEmpfKdNr, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.lblEndEmpfKdNr, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.lblFrachtfKdNr, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.lblAuftrKdNr, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.lblLKWNr, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.lblAbs, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.lblBezugsNr, System.ComponentModel.ISupportInitialize).EndInit()
@@ -955,10 +960,6 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
CType(Me.txtPackstücke, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.txtVermerk, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.lblAnzahl, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.lblAbsKdNr, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.lblEmpfKdNr, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.lblAuftrKdNr, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.lblFrachtfKdNr, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.txtKdOpt, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Label11, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Label12, System.ComponentModel.ISupportInitialize).EndInit()
@@ -966,7 +967,6 @@ Partial Public Class rptSpeditionsbericht_Gelangensbestaetigung
CType(Me.Label20, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Label7, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.lblEndEmpf, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.lblEndEmpfKdNr, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Label28, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.ReportInfo2, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.lblDat, System.ComponentModel.ISupportInitialize).EndInit()
diff --git a/SDL/USTV/frmMDM_USTVAntrag.vb b/SDL/USTV/frmMDM_USTVAntrag.vb
index 58bd07da..2eefe8e0 100644
--- a/SDL/USTV/frmMDM_USTVAntrag.vb
+++ b/SDL/USTV/frmMDM_USTVAntrag.vb
@@ -417,17 +417,17 @@ Public Class frmMDM_USTVAntrag
End If
USTV_POS.UStVPo_Sachbearbeiter = VERAG_PROG_ALLGEMEIN.cAllgemein.USRKURZNAME
- USTV_POS.UStVPo_Zeitstempel = Now()
- ' Berechnungen
- USTV_POS.UStVPo_USteuerbetragEUR = ANTRAG.plose_MWSTBetragWaehrungAbbuchung 'VERAG_PROG_ALLGEMEIN.cProgramFunctions.fktEuro(ANTRAG.plose_MWSTBetragWaehrungAbbuchung, USTV_ANTRAG.UStVAn_Währungscode, "EUR")
- 'USTV_POS.UStVPo_Umrechnungskurs = VERAG_PROG_ALLGEMEIN.cProgramFunctions.fktEuroKurs(ANTRAG.plose_WaehrungAbbuchung, ANTRAG.plose_RechnungsDatum)
- USTV_POS.UStVPo_Umrechnungskurs = ANTRAG.plose_MWSTBetrag / ANTRAG.plose_MWSTBetragWaehrungAbbuchung
- USTV_POS.UStVPo_USteuerbetrag = ANTRAG.plose_MWSTBetrag
- ' MsgBox(ANTRAG.plose_Lieferant & " - " & ANTRAG.plose_RechnungsDatum & " - " & ANTRAG.plose_RechnungsNr & " :::::::::: " & CDbl(ANTRAG.plose_MWSTBetrag).ToString("C2"))
+ USTV_POS.UStVPo_Zeitstempel = Now()
+ ' Berechnungen
+ USTV_POS.UStVPo_USteuerbetragEUR = ANTRAG.plose_MWSTBetragWaehrungAbbuchung 'VERAG_PROG_ALLGEMEIN.cProgramFunctions.fktEuro(ANTRAG.plose_MWSTBetragWaehrungAbbuchung, USTV_ANTRAG.UStVAn_Währungscode, "EUR")
+ 'USTV_POS.UStVPo_Umrechnungskurs = VERAG_PROG_ALLGEMEIN.cProgramFunctions.fktEuroKurs(ANTRAG.plose_WaehrungAbbuchung, ANTRAG.plose_RechnungsDatum)
+ USTV_POS.UStVPo_Umrechnungskurs = ANTRAG.plose_MWSTBetrag / ANTRAG.plose_MWSTBetragWaehrungAbbuchung
+ USTV_POS.UStVPo_USteuerbetrag = ANTRAG.plose_MWSTBetrag
+ ' MsgBox(ANTRAG.plose_Lieferant & " - " & ANTRAG.plose_RechnungsDatum & " - " & ANTRAG.plose_RechnungsNr & " :::::::::: " & CDbl(ANTRAG.plose_MWSTBetrag).ToString("C2"))
- USTV_POS.INSERT()
- End If
+ USTV_POS.INSERT()
+ End If
Next
'Einträge als archivert setzen ' vormals wichtig
@@ -1201,7 +1201,7 @@ Public Class frmMDM_USTVAntrag
TextHTML &= "We are always available to answer more questions.
"
TextHTML &= "Mit freundlichen Grüßen
"
- TextHTML &= VERAG_PROG_ALLGEMEIN.cAllgemein.USRNAME & "
"
+ TextHTML &= VERAG_PROG_ALLGEMEIN.cAllgemein.USRNAME & "
"
TextHTML &= "
"
Mail.HTMLBody = "" & TextHTML & SDL.cFakturierung.getSignature("DE") & "
"
diff --git a/VERAG_PROG_ALLGEMEIN/AVISO/cDatenbankAVISO.vb b/VERAG_PROG_ALLGEMEIN/AVISO/cDatenbankAVISO.vb
index 4eb3ffa0..e6f5ac2c 100644
--- a/VERAG_PROG_ALLGEMEIN/AVISO/cDatenbankAVISO.vb
+++ b/VERAG_PROG_ALLGEMEIN/AVISO/cDatenbankAVISO.vb
@@ -6,6 +6,7 @@ Imports System.Data.SqlClient
Imports System.Globalization
Imports System.Reflection
Imports System.Web.UI.WebControls.WebParts
+Imports System.Windows.Forms
Public Class cSqlDb
@@ -195,6 +196,12 @@ Public Class cDatenbankAVISO
Return Nothing
End Function
+ Public Shared Function CreateNewOpenConnection() As SqlConnection
+ Dim conn As New SqlConnection(cSqlDb.GetAVISOConnectionString())
+ conn.Open()
+ Return conn
+ End Function
+
Public Shared Function GetNewOpenConnectionWithoutError(Optional newConn As Boolean = False) As SqlConnection
Try
@@ -2443,6 +2450,646 @@ Public Class cVermerkeDAL
End Class
+Public Class cAvisoTvNew
+ Public Property TvTextBezeichnungID As Integer
+ Public Property TvTextBezeichnung As String
+ Public Property FixeZeile1RTF As String
+ Public Property FixeZeile1HTML As String
+ Public Property FixeZeile2RTF As String
+ Public Property FixeZeile2HTML As String
+ Public Property FixeZeile3HTML As String
+ Public Property FixeZeile3RTF As String
+ Public Property StandortID As Integer
+ Public Property Standort As String
+ Public Property Prio As Integer
+ Public Property StartDate As Date?
+ Public Property EndDate As Date?
+ Public Property StartTime As TimeSpan?
+ Public Property EndTime As TimeSpan?
+ Public Property IsRecurring As Boolean?
+ Public Property IsMonday As Boolean?
+ Public Property IsTuesday As Boolean?
+ Public Property IsWednesday As Boolean?
+ Public Property IsThursday As Boolean?
+ Public Property IsFriday As Boolean?
+ Public Property IsSaturday As Boolean?
+ Public Property IsSunday As Boolean?
+ Public Property IsActive As Boolean
+
+
+End Class
+
+Public Class cTvTextBezeichnung
+ Public Property TvTextBezeichnungID As Integer
+ Public Property TvTextBezeichnung As String
+End Class
+
+Public Class cTvSettings
+ Public Property TVSettingID As Integer
+ Public Property StandortID As Integer
+ Public Property KachelWidthInPercent As Double?
+ Public Property KachelHeightInPercent As Double?
+ Public Property KachelFontSizeLkwNummer As Double?
+ Public Property KachelFontSizeDateTime As Double?
+ Public Property KachelRowGapInPercent As Double?
+ Public Property SeitenwechselInSek As Integer?
+ Public Property TextBalkenHeightInPercent As Double?
+ Public Property TextFlaggeLeft As Double?
+ Public Property TextFlaggeBottom As Double?
+ Public Property SelectedLogoValue As String
+
+
+End Class
+
+
+Public Class cAvisoTvNewDAL
+
+ '''
+ ''' Holt die StandortID basierend auf dem Standortnamen.
+ '''
+ ''' Der Name des Standorts.
+ ''' Die zugehörige StandortID oder 0, wenn nicht gefunden.
+ Public Function GetStandortID(standort As String) As Integer
+ Dim standortID As Integer = 0
+ Dim sql As String = "SELECT StandortID FROM StandorteTV WHERE StandortBezeichnung = @StandortBezeichnung"
+
+ Try
+ Using conn As SqlConnection = cDatenbankAVISO.CreateNewOpenConnection()
+ Using cmd As New SqlCommand(sql, conn)
+ cmd.Parameters.AddWithValue("@StandortBezeichnung", standort)
+ Dim result As Object = cmd.ExecuteScalar()
+ If result IsNot Nothing AndAlso Not IsDBNull(result) Then
+ standortID = Convert.ToInt32(result)
+ End If
+ End Using
+ End Using
+ Catch ex As SqlException
+ Throw New Exception("SQL Fehler beim Abrufen der StandortID: " & ex.Message, ex)
+ Catch ex As Exception
+ Throw New Exception("Allgemeiner Fehler beim Abrufen der StandortID: " & ex.Message, ex)
+ End Try
+
+ Return standortID
+ End Function
+
+ '''
+ ''' Speichert die TV-Einstellungen in der Datenbank.
+ '''
+ ''' Die TV-Einstellungen, die gespeichert werden sollen.
+ Public Sub SaveTvSettings(settings As cTvSettings)
+ Dim sqlCheck As String = "SELECT COUNT(*) FROM AvisoTvSettings WHERE StandortID = @StandortID"
+ Dim sqlUpdate As String = "UPDATE AvisoTvSettings SET
+ KachelWidthInPercent = @KachelWidthInPercent,
+ KachelHeightInPercent = @KachelHeightInPercent,
+ KachelFontSizeLkwNummer = @KachelFontSizeLkwNummer,
+ KachelFontSizeDateTime = @KachelFontSizeDateTime,
+ KachelRowGapInPercent = @KachelRowGapInPercent,
+ SeitenwechselInSek = @SeitenwechselInSek,
+ TextBalkenHeightInPercent = @TextBalkenHeightInPercent,
+ FlaggeLeft = @FlaggeLeft,
+ FlaggeBottom = @FlaggeBottom,
+ Logo = @Logo
+ WHERE StandortID = @StandortID"
+ Dim sqlInsert As String = "INSERT INTO AvisoTvSettings
+ (StandortID, KachelWidthInPercent, KachelHeightInPercent,KachelRowGapInPercent,
+ KachelFontSizeLkwNummer, KachelFontSizeDateTime,
+ SeitenwechselInSek, TextBalkenHeightInPercent,FlaggeLeft,FlaggeBottom,Logo)
+ VALUES
+ (@StandortID, @KachelWidthInPercent, @KachelHeightInPercent,@KachelRowGapInPercent,
+ @KachelFontSizeLkwNummer, @KachelFontSizeDateTime,
+ @SeitenwechselInSek, @TextBalkenHeightInPercent,@FlaggeLeft,@FlaggeBottom,@Logo)"
+
+ Try
+ Using conn As SqlConnection = cDatenbankAVISO.CreateNewOpenConnection()
+ ' Überprüfen, ob bereits Einstellungen für den Standort existieren
+ Dim recordExists As Boolean
+ Using cmdCheck As New SqlCommand(sqlCheck, conn)
+ cmdCheck.Parameters.AddWithValue("@StandortID", settings.StandortID)
+ recordExists = Convert.ToInt32(cmdCheck.ExecuteScalar()) > 0
+ End Using
+
+ ' Wähle Update oder Insert basierend auf der Existenz
+ Dim sql As String = If(recordExists, sqlUpdate, sqlInsert)
+
+ Using cmdSave As New SqlCommand(sql, conn)
+ cmdSave.Parameters.AddWithValue("@StandortID", settings.StandortID)
+ cmdSave.Parameters.AddWithValue("@KachelWidthInPercent", settings.KachelWidthInPercent)
+ cmdSave.Parameters.AddWithValue("@KachelHeightInPercent", settings.KachelHeightInPercent)
+ cmdSave.Parameters.AddWithValue("@KachelRowGapInPercent", settings.KachelRowGapInPercent)
+ cmdSave.Parameters.AddWithValue("@KachelFontSizeLkwNummer", settings.KachelFontSizeLkwNummer)
+ cmdSave.Parameters.AddWithValue("@KachelFontSizeDateTime", settings.KachelFontSizeDateTime)
+ cmdSave.Parameters.AddWithValue("@SeitenwechselInSek", settings.SeitenwechselInSek)
+ cmdSave.Parameters.AddWithValue("@TextBalkenHeightInPercent", settings.TextBalkenHeightInPercent)
+ cmdSave.Parameters.AddWithValue("@FlaggeLeft", settings.TextFlaggeLeft)
+ cmdSave.Parameters.AddWithValue("@FlaggeBottom", settings.TextFlaggeBottom)
+ cmdSave.Parameters.AddWithValue("@Logo", settings.SelectedLogoValue)
+ cmdSave.ExecuteNonQuery()
+ End Using
+ End Using
+ Catch ex As SqlException
+ Throw New Exception("SQL Fehler beim Speichern der TV-Einstellungen: " & ex.Message, ex)
+ Catch ex As Exception
+ Throw New Exception("Allgemeiner Fehler beim Speichern der TV-Einstellungen: " & ex.Message, ex)
+ End Try
+ End Sub
+
+ '''
+ ''' Lädt die TV-Einstellungen basierend auf der StandortID.
+ '''
+ ''' Die StandortID, für die die Einstellungen geladen werden sollen.
+ ''' Eine Liste der entsprechenden TV-Einstellungen.
+ Public Function GetTvSettingsByStandort(standortID As Integer) As List(Of cTvSettings)
+ Dim SettingsList As New List(Of cTvSettings)()
+ Dim sql As String = "SELECT * FROM AvisoTvSettings WHERE StandortID = @StandortID"
+
+ Try
+ Using conn As SqlConnection = cDatenbankAVISO.CreateNewOpenConnection()
+ Using cmd As New SqlCommand(sql, conn)
+ cmd.Parameters.AddWithValue("@StandortID", standortID)
+
+ Using dr As SqlDataReader = cmd.ExecuteReader()
+ While dr.Read()
+ Dim settings As New cTvSettings() With {
+ .TVSettingID = Convert.ToInt32(dr("TvSettingID")),
+ .StandortID = Convert.ToInt32(dr("StandortID")),
+ .KachelWidthInPercent = If(IsDBNull(dr("KachelWidthInPercent")), 0, Convert.ToDouble(dr("KachelWidthInPercent"))),
+ .KachelHeightInPercent = If(IsDBNull(dr("KachelHeightInPercent")), 0, Convert.ToDouble(dr("KachelHeightInPercent"))),
+ .KachelRowGapInPercent = If(IsDBNull(dr("KachelRowGapInPercent")), 0, Convert.ToDouble(dr("KachelRowGapInPercent"))),
+ .KachelFontSizeLkwNummer = If(IsDBNull(dr("KachelFontSizeLkwNummer")), 0, Convert.ToDouble(dr("KachelFontSizeLkwNummer"))),
+ .KachelFontSizeDateTime = If(IsDBNull(dr("KachelFontSizeDateTime")), 0, Convert.ToDouble(dr("KachelFontSizeDateTime"))),
+ .SeitenwechselInSek = If(IsDBNull(dr("SeitenwechselInSek")), 0, Convert.ToInt32(dr("SeitenwechselInSek"))),
+ .TextBalkenHeightInPercent = If(IsDBNull(dr("TextBalkenHeightInPercent")), 0, Convert.ToDouble(dr("TextBalkenHeightInPercent"))),
+ .TextFlaggeBottom = If(IsDBNull(dr("FlaggeBottom")), 0, Convert.ToDouble(dr("FlaggeBottom"))),
+ .TextFlaggeLeft = If(IsDBNull(dr("FlaggeLeft")), 0, Convert.ToDouble(dr("FlaggeLeft"))),
+ .SelectedLogoValue = If(IsDBNull(dr("Logo")), "", Convert.ToString(dr("Logo")))
+ }
+
+ SettingsList.Add(settings)
+ End While
+ End Using
+ End Using
+ End Using
+ Catch ex As SqlException
+ Throw New Exception("SQL Fehler beim Laden der TV-Einstellungen: " & ex.Message, ex)
+ Catch ex As Exception
+ Throw New Exception("Allgemeiner Fehler beim Laden der TV-Einstellungen: " & ex.Message, ex)
+ End Try
+
+ Return SettingsList
+ End Function
+
+ '''
+ ''' Lädt alle TV-Textbezeichnungen aus der Datenbank.
+ '''
+ ''' Eine Liste aller TV-Textbezeichnungen.
+ Public Function LadenAlleTvTextBezeichnungen() As List(Of cTvTextBezeichnung)
+ Dim bezeichnungen As New List(Of cTvTextBezeichnung)()
+ Dim sql As String = "
+ SELECT TvTextBezeichnungID, TvTextBezeichnung
+ FROM AvisoTvNew
+ ORDER BY TvTextBezeichnung
+ "
+
+ Try
+ Using conn As SqlConnection = cDatenbankAVISO.CreateNewOpenConnection()
+ Using cmd As New SqlCommand(sql, conn)
+ Using dr As SqlDataReader = cmd.ExecuteReader()
+ While dr.Read()
+ Dim bezeichnung As New cTvTextBezeichnung() With {
+ .TvTextBezeichnungID = Convert.ToInt32(dr("TvTextBezeichnungID")),
+ .TvTextBezeichnung = Convert.ToString(dr("TvTextBezeichnung"))
+ }
+ bezeichnungen.Add(bezeichnung)
+ End While
+ End Using
+ End Using
+ End Using
+ Catch ex As SqlException
+ Throw New Exception("SQL Fehler beim Laden der TvTextBezeichnungen: " & ex.Message, ex)
+ Catch ex As Exception
+ Throw New Exception("Allgemeiner Fehler beim Laden der TvTextBezeichnungen: " & ex.Message, ex)
+ End Try
+
+ Return bezeichnungen
+ End Function
+
+ '''
+ ''' Überprüft, ob eine TV-Textbezeichnung bereits vorhanden ist.
+ '''
+ ''' Die TV-Textbezeichnung, die überprüft werden soll.
+ ''' True, wenn die Bezeichnung vorhanden ist; andernfalls False.
+ Public Function IstTvTextBezeichnungVorhanden(tvTextBezeichnung As String) As Boolean
+ Dim vorhanden As Boolean = False
+ Dim sql As String = "SELECT COUNT(*) FROM AvisoTvNew WHERE TvTextBezeichnung = @TvTextBezeichnung"
+
+ Try
+ Using conn As SqlConnection = cDatenbankAVISO.CreateNewOpenConnection()
+ Using cmd As New SqlCommand(sql, conn)
+ cmd.Parameters.AddWithValue("@TvTextBezeichnung", tvTextBezeichnung)
+ Dim count As Integer = Convert.ToInt32(cmd.ExecuteScalar())
+ If count > 0 Then
+ vorhanden = True
+ End If
+ End Using
+ End Using
+ Catch ex As SqlException
+ Throw New Exception("SQL Fehler beim Überprüfen der TvTextBezeichnung: " & ex.Message, ex)
+ Catch ex As Exception
+ Throw New Exception("Allgemeiner Fehler beim Überprüfen der TvTextBezeichnung: " & ex.Message, ex)
+ End Try
+
+ Return vorhanden
+ End Function
+
+ '''
+ ''' Liest AvisoTvNew-Einträge basierend auf den angegebenen Kriterien.
+ '''
+ ''' Die TV-TextbezeichnungID.
+ ''' Die Bezeichnung.
+ ''' Der Standort.
+ ''' Die Liste, in die die Ergebnisse eingefügt werden.
+ Public Sub LesenAvisoTvNew(tvid As Integer, bezeichnung As String, StandortBezeichnung As String, ByRef liste As List(Of cAvisoTvNew))
+ Dim sql As String = "SELECT
+ stv.TvTextBezeichnungID,
+ stv.StandortID,
+ stv.Prio,
+ a.TvTextBezeichnung,
+ s.Standort,
+ a.FixeZeile1RTF,
+ a.FixeZeile2RTF,
+ a.FixeZeile3RTF,
+ a.StartDate,
+ a.EndDate,
+ a.StartTime,
+ a.EndTime,
+ a.IsRecurring,
+ a.IsMonday,
+ a.IsTuesday,
+ a.IsWednesday,
+ a.IsThursday,
+ a.IsFriday,
+ a.IsSaturday,
+ a.IsSunday,
+ a.IsActive
+ FROM AvisoTvNew a
+ JOIN StandortTvBezeichnung stv ON a.TvTextBezeichnungID = stv.TvTextBezeichnungID
+ JOIN StandorteTV s ON stv.StandortID = s.StandortID
+ WHERE 1=1"
+
+ If tvid <> 0 Then
+ sql &= " AND a.TvTextBezeichnungID = @TvTextBezeichnungID"
+ End If
+
+ If Not String.IsNullOrWhiteSpace(bezeichnung) Then
+ sql &= " AND a.TVTextBezeichnung LIKE @TVTextBezeichnung"
+ End If
+
+ If Not String.IsNullOrWhiteSpace(StandortBezeichnung) Then
+ sql &= " AND s.Standortbezeichnung = @StandortBezeichnung"
+ End If
+
+ Try
+ Using conn As SqlConnection = cDatenbankAVISO.CreateNewOpenConnection()
+ Using cmd As New SqlCommand(sql, conn)
+ If tvid <> 0 Then
+ cmd.Parameters.AddWithValue("@TvTextBezeichnungID", tvid)
+ End If
+
+ If Not String.IsNullOrWhiteSpace(bezeichnung) Then
+ cmd.Parameters.AddWithValue("@TVTextBezeichnung", "%" & bezeichnung & "%")
+ End If
+
+ If Not String.IsNullOrWhiteSpace(StandortBezeichnung) Then
+ cmd.Parameters.AddWithValue("@StandortBezeichnung", StandortBezeichnung)
+ End If
+
+ Using dr As SqlDataReader = cmd.ExecuteReader()
+ While dr.Read()
+ Dim aviso As New cAvisoTvNew() With {
+ .TvTextBezeichnungID = Convert.ToInt32(dr("TvTextBezeichnungID")),
+ .StandortID = Convert.ToInt32(dr("StandortID")),
+ .TvTextBezeichnung = Convert.ToString(dr("TVTextBezeichnung")),
+ .Standort = Convert.ToString(dr("Standort")),
+ .FixeZeile1RTF = If(IsDBNull(dr("FixeZeile1RTF")), Nothing, Convert.ToString(dr("FixeZeile1RTF"))),
+ .FixeZeile2RTF = If(IsDBNull(dr("FixeZeile2RTF")), Nothing, Convert.ToString(dr("FixeZeile2RTF"))),
+ .FixeZeile3RTF = If(IsDBNull(dr("FixeZeile3RTF")), Nothing, Convert.ToString(dr("FixeZeile3RTF"))),
+ .Prio = If(IsDBNull(dr("Prio")), Nothing, Convert.ToInt32(dr("Prio"))),
+ .StartDate = If(IsDBNull(dr("StartDate")), CType(Nothing, Date?), Convert.ToDateTime(dr("StartDate"))),
+ .EndDate = If(IsDBNull(dr("EndDate")), CType(Nothing, Date?), Convert.ToDateTime(dr("EndDate"))),
+ .StartTime = If(IsDBNull(dr("StartTime")), CType(Nothing, TimeSpan?), CType(dr("StartTime"), TimeSpan)),
+ .EndTime = If(IsDBNull(dr("EndTime")), CType(Nothing, TimeSpan?), CType(dr("EndTime"), TimeSpan)),
+ .IsRecurring = If(IsDBNull(dr("IsRecurring")), CType(Nothing, Boolean?), Convert.ToBoolean(dr("IsRecurring"))),
+ .IsMonday = If(IsDBNull(dr("IsMonday")), CType(Nothing, Boolean?), Convert.ToBoolean(dr("IsMonday"))),
+ .IsTuesday = If(IsDBNull(dr("IsTuesday")), CType(Nothing, Boolean?), Convert.ToBoolean(dr("IsTuesday"))),
+ .IsWednesday = If(IsDBNull(dr("IsWednesday")), CType(Nothing, Boolean?), Convert.ToBoolean(dr("IsWednesday"))),
+ .IsThursday = If(IsDBNull(dr("IsThursday")), CType(Nothing, Boolean?), Convert.ToBoolean(dr("IsThursday"))),
+ .IsFriday = If(IsDBNull(dr("IsFriday")), CType(Nothing, Boolean?), Convert.ToBoolean(dr("IsFriday"))),
+ .IsSaturday = If(IsDBNull(dr("IsSaturday")), CType(Nothing, Boolean?), Convert.ToBoolean(dr("IsSaturday"))),
+ .IsSunday = If(IsDBNull(dr("IsSunday")), CType(Nothing, Boolean?), Convert.ToBoolean(dr("IsSunday"))),
+ .IsActive = Convert.ToBoolean(dr("IsActive"))
+ }
+ liste.Add(aviso)
+ End While
+ End Using
+ End Using
+ End Using
+ Catch ex As SqlException
+ Throw New Exception("SQL Fehler beim Lesen der Daten: " & ex.Message, ex)
+ Catch ex As Exception
+ Throw New Exception("Allgemeiner Fehler beim Lesen der Daten: " & ex.Message, ex)
+ End Try
+ End Sub
+
+ '''
+ ''' Liest alle AvisoTvNew-Einträge aus der Datenbank.
+ '''
+ ''' Die Liste, in die die Ergebnisse eingefügt werden.
+ Public Sub LesenAlleAvisoTvNew(ByRef liste As List(Of cAvisoTvNew))
+ ' Basis-SQL-Abfrage ohne Filter
+ Dim sql As String = "SELECT
+ a.TvTextBezeichnungID,
+ a.TvTextBezeichnung,
+ a.FixeZeile1RTF,
+ a.FixeZeile2RTF,
+ a.FixeZeile3RTF,
+ a.Prio,
+ a.StartDate,
+ a.EndDate,
+ a.StartTime,
+ a.EndTime,
+ a.IsRecurring,
+ a.IsMonday,
+ a.IsTuesday,
+ a.IsWednesday,
+ a.IsThursday,
+ a.IsFriday,
+ a.IsSaturday,
+ a.IsSunday,
+ a.IsActive
+ FROM AvisoTvNew a"
+
+ Try
+ Using conn As SqlConnection = cDatenbankAVISO.CreateNewOpenConnection()
+ Using cmd As New SqlCommand(sql, conn)
+ Using dr As SqlDataReader = cmd.ExecuteReader()
+ While dr.Read()
+ Dim aviso As New cAvisoTvNew() With {
+ .TvTextBezeichnungID = If(IsDBNull(dr("TvTextBezeichnungID")), 0, Convert.ToInt32(dr("TvTextBezeichnungID"))),
+ .TvTextBezeichnung = If(IsDBNull(dr("TvTextBezeichnung")), String.Empty, dr("TvTextBezeichnung").ToString()),
+ .FixeZeile1RTF = If(IsDBNull(dr("FixeZeile1RTF")), Nothing, dr("FixeZeile1RTF").ToString()),
+ .FixeZeile2RTF = If(IsDBNull(dr("FixeZeile2RTF")), Nothing, dr("FixeZeile2RTF").ToString()),
+ .FixeZeile3RTF = If(IsDBNull(dr("FixeZeile3RTF")), Nothing, dr("FixeZeile3RTF").ToString()),
+ .Prio = If(IsDBNull(dr("Prio")), 0, Convert.ToInt32(dr("Prio"))),
+ .StartDate = If(IsDBNull(dr("StartDate")), CType(Nothing, Date?), Convert.ToDateTime(dr("StartDate"))),
+ .EndDate = If(IsDBNull(dr("EndDate")), CType(Nothing, Date?), Convert.ToDateTime(dr("EndDate"))),
+ .StartTime = If(IsDBNull(dr("StartTime")), CType(Nothing, TimeSpan?), CType(dr("StartTime"), TimeSpan)),
+ .EndTime = If(IsDBNull(dr("EndTime")), CType(Nothing, TimeSpan?), CType(dr("EndTime"), TimeSpan)),
+ .IsRecurring = If(IsDBNull(dr("IsRecurring")), False, Convert.ToBoolean(dr("IsRecurring"))),
+ .IsMonday = If(IsDBNull(dr("IsMonday")), False, Convert.ToBoolean(dr("IsMonday"))),
+ .IsTuesday = If(IsDBNull(dr("IsTuesday")), False, Convert.ToBoolean(dr("IsTuesday"))),
+ .IsWednesday = If(IsDBNull(dr("IsWednesday")), False, Convert.ToBoolean(dr("IsWednesday"))),
+ .IsThursday = If(IsDBNull(dr("IsThursday")), False, Convert.ToBoolean(dr("IsThursday"))),
+ .IsFriday = If(IsDBNull(dr("IsFriday")), False, Convert.ToBoolean(dr("IsFriday"))),
+ .IsSaturday = If(IsDBNull(dr("IsSaturday")), False, Convert.ToBoolean(dr("IsSaturday"))),
+ .IsSunday = If(IsDBNull(dr("IsSunday")), False, Convert.ToBoolean(dr("IsSunday"))),
+ .IsActive = If(IsDBNull(dr("IsActive")), False, Convert.ToBoolean(dr("IsActive")))
+ }
+
+ liste.Add(aviso)
+ End While
+ End Using
+ End Using
+ End Using
+ Catch ex As SqlException
+ Throw New Exception($"SQL Fehler beim Lesen der Daten: {ex.Message}", ex)
+ Catch ex As Exception
+ Throw New Exception($"Allgemeiner Fehler beim Lesen der Daten: {ex.Message}", ex)
+ End Try
+ End Sub
+
+ '''
+ ''' Speichert einen AvisoTvNew-Eintrag in der Datenbank.
+ '''
+ ''' Der AvisoTvNew-Eintrag, der gespeichert werden soll.
+ Public Sub SpeichernAvisoTvNew(aviso As cAvisoTvNew)
+ Dim sqlInsert As String
+ Dim sqlUpdate As String
+
+ Try
+ Using conn As SqlConnection = cDatenbankAVISO.CreateNewOpenConnection()
+ Using transaction As SqlTransaction = conn.BeginTransaction()
+ Try
+ If aviso.TvTextBezeichnungID = 0 Then
+ ' Neuanlage
+ sqlInsert = "INSERT INTO AvisoTvNew (
+ TvTextBezeichnung,
+ FixeZeile1RTF,
+ FixeZeile1HTML,
+ FixeZeile2RTF,
+ FixeZeile2HTML,
+ FixeZeile3RTF,
+ FixeZeile3HTML,
+ StartDate,
+ EndDate,
+ StartTime,
+ EndTime,
+ IsRecurring,
+ IsMonday,
+ IsTuesday,
+ IsWednesday,
+ IsThursday,
+ IsFriday,
+ IsSaturday,
+ IsSunday,
+ Prio,
+ IsActive
+ ) VALUES (
+ @TvTextBezeichnung,
+ @FixeZeile1RTF,
+ @FixeZeile1HTML,
+ @FixeZeile2RTF,
+ @FixeZeile2HTML,
+ @FixeZeile3RTF,
+ @FixeZeile3HTML,
+ @StartDate,
+ @EndDate,
+ @StartTime,
+ @EndTime,
+ @IsRecurring,
+ @IsMonday,
+ @IsTuesday,
+ @IsWednesday,
+ @IsThursday,
+ @IsFriday,
+ @IsSaturday,
+ @IsSunday,
+ @Prio,
+ @IsActive
+ );
+ SELECT CAST(scope_identity() AS int);"
+
+ Using cmd As New SqlCommand(sqlInsert, conn, transaction)
+ cmd.Parameters.AddWithValue("@TvTextBezeichnung", aviso.TvTextBezeichnung)
+ cmd.Parameters.AddWithValue("@FixeZeile1RTF", If(String.IsNullOrWhiteSpace(aviso.FixeZeile1RTF), CType(Nothing, String), aviso.FixeZeile1RTF))
+ cmd.Parameters.AddWithValue("@FixeZeile1HTML", If(String.IsNullOrWhiteSpace(aviso.FixeZeile1HTML), CType(Nothing, String), aviso.FixeZeile1HTML))
+ cmd.Parameters.AddWithValue("@FixeZeile2RTF", If(String.IsNullOrWhiteSpace(aviso.FixeZeile2RTF), DBNull.Value, aviso.FixeZeile2RTF))
+ cmd.Parameters.AddWithValue("@FixeZeile2HTML", If(String.IsNullOrWhiteSpace(aviso.FixeZeile2HTML), DBNull.Value, aviso.FixeZeile2HTML))
+ cmd.Parameters.AddWithValue("@FixeZeile3RTF", If(String.IsNullOrWhiteSpace(aviso.FixeZeile3RTF), DBNull.Value, aviso.FixeZeile3RTF))
+ cmd.Parameters.AddWithValue("@FixeZeile3HTML", If(String.IsNullOrWhiteSpace(aviso.FixeZeile3HTML), DBNull.Value, aviso.FixeZeile3HTML))
+ cmd.Parameters.AddWithValue("@StartDate", If(aviso.StartDate.HasValue, CType(aviso.StartDate.Value, Object), DBNull.Value))
+ cmd.Parameters.AddWithValue("@EndDate", If(aviso.EndDate.HasValue, CType(aviso.EndDate.Value, Object), DBNull.Value))
+ cmd.Parameters.AddWithValue("@StartTime", If(aviso.StartTime.HasValue, CType(aviso.StartTime.Value, Object), DBNull.Value))
+ cmd.Parameters.AddWithValue("@EndTime", If(aviso.EndTime.HasValue, CType(aviso.EndTime.Value, Object), DBNull.Value))
+ cmd.Parameters.AddWithValue("@Prio", aviso.Prio)
+ cmd.Parameters.AddWithValue("@IsRecurring", aviso.IsRecurring)
+ cmd.Parameters.AddWithValue("@IsMonday", aviso.IsMonday)
+ cmd.Parameters.AddWithValue("@IsTuesday", aviso.IsTuesday)
+ cmd.Parameters.AddWithValue("@IsWednesday", aviso.IsWednesday)
+ cmd.Parameters.AddWithValue("@IsThursday", aviso.IsThursday)
+ cmd.Parameters.AddWithValue("@IsFriday", aviso.IsFriday)
+ cmd.Parameters.AddWithValue("@IsSaturday", aviso.IsSaturday)
+ cmd.Parameters.AddWithValue("@IsSunday", aviso.IsSunday)
+ cmd.Parameters.AddWithValue("@IsActive", aviso.IsActive)
+
+ Dim result As Object = cmd.ExecuteScalar()
+ If result Is Nothing OrElse IsDBNull(result) Then
+ Throw New Exception("Das INSERT hat keine ID zurückgegeben.")
+ End If
+ aviso.TvTextBezeichnungID = Convert.ToInt32(result)
+ End Using
+ Else
+ ' Aktualisierung
+ sqlUpdate = "UPDATE AvisoTvNew SET
+ FixeZeile1RTF = @FixeZeile1RTF,
+ FixeZeile1HTML = @FixeZeile1HTML,
+ FixeZeile2RTF = @FixeZeile2RTF,
+ FixeZeile2HTML = @FixeZeile2HTML,
+ FixeZeile3RTF = @FixeZeile3RTF,
+ FixeZeile3HTML = @FixeZeile3HTML,
+ StartDate = @StartDate,
+ EndDate = @EndDate,
+ StartTime = @StartTime,
+ EndTime = @EndTime,
+ IsRecurring = @IsRecurring,
+ IsMonday = @IsMonday,
+ IsTuesday = @IsTuesday,
+ IsWednesday = @IsWednesday,
+ IsThursday = @IsThursday,
+ IsFriday = @IsFriday,
+ IsSaturday = @IsSaturday,
+ IsSunday = @IsSunday,
+ IsActive = @IsActive,
+ Prio = @Prio
+ WHERE TvTextBezeichnungID = @TvTextBezeichnungID"
+
+ Using cmd As New SqlCommand(sqlUpdate, conn, transaction)
+ cmd.Parameters.AddWithValue("@FixeZeile1RTF", If(String.IsNullOrWhiteSpace(aviso.FixeZeile1RTF), CType(Nothing, String), aviso.FixeZeile1RTF))
+ cmd.Parameters.AddWithValue("@FixeZeile1HTML", If(String.IsNullOrWhiteSpace(aviso.FixeZeile1HTML), CType(Nothing, String), aviso.FixeZeile1HTML))
+ cmd.Parameters.AddWithValue("@FixeZeile2RTF", If(String.IsNullOrWhiteSpace(aviso.FixeZeile2RTF), DBNull.Value, aviso.FixeZeile2RTF))
+ cmd.Parameters.AddWithValue("@FixeZeile2HTML", If(String.IsNullOrWhiteSpace(aviso.FixeZeile2HTML), DBNull.Value, aviso.FixeZeile2HTML))
+ cmd.Parameters.AddWithValue("@FixeZeile3RTF", If(String.IsNullOrWhiteSpace(aviso.FixeZeile3RTF), DBNull.Value, aviso.FixeZeile3RTF))
+ cmd.Parameters.AddWithValue("@FixeZeile3HTML", If(String.IsNullOrWhiteSpace(aviso.FixeZeile3HTML), DBNull.Value, aviso.FixeZeile3HTML))
+ cmd.Parameters.AddWithValue("@StartDate", If(aviso.StartDate.HasValue, CType(aviso.StartDate.Value, Object), DBNull.Value))
+ cmd.Parameters.AddWithValue("@EndDate", If(aviso.EndDate.HasValue, CType(aviso.EndDate.Value, Object), DBNull.Value))
+ cmd.Parameters.AddWithValue("@StartTime", If(aviso.StartTime.HasValue, CType(aviso.StartTime.Value, Object), DBNull.Value))
+ cmd.Parameters.AddWithValue("@EndTime", If(aviso.EndTime.HasValue, CType(aviso.EndTime.Value, Object), DBNull.Value))
+ cmd.Parameters.AddWithValue("@IsRecurring", aviso.IsRecurring)
+ cmd.Parameters.AddWithValue("@IsMonday", aviso.IsMonday)
+ cmd.Parameters.AddWithValue("@IsTuesday", aviso.IsTuesday)
+ cmd.Parameters.AddWithValue("@IsWednesday", aviso.IsWednesday)
+ cmd.Parameters.AddWithValue("@IsThursday", aviso.IsThursday)
+ cmd.Parameters.AddWithValue("@IsFriday", aviso.IsFriday)
+ cmd.Parameters.AddWithValue("@IsSaturday", aviso.IsSaturday)
+ cmd.Parameters.AddWithValue("@IsSunday", aviso.IsSunday)
+ cmd.Parameters.AddWithValue("@IsActive", aviso.IsActive)
+ cmd.Parameters.AddWithValue("@Prio", aviso.Prio)
+ cmd.Parameters.AddWithValue("@TvTextBezeichnungID", aviso.TvTextBezeichnungID)
+
+ cmd.ExecuteNonQuery()
+ End Using
+ End If
+
+ ' Einfügen oder Aktualisieren in die StandortTvBezeichnung-Tabelle
+ Dim sqlLink As String = "
+ IF EXISTS (
+ SELECT 1
+ FROM StandortTvBezeichnung
+ WHERE StandortID = @StandortID
+ AND TvTextBezeichnungID = @TvTextBezeichnungID
+ )
+ BEGIN
+ UPDATE StandortTvBezeichnung
+ SET
+ Prio = @Prio
+ WHERE StandortID = @StandortID
+ AND TvTextBezeichnungID = @TvTextBezeichnungID
+ END
+ ELSE
+ BEGIN
+ INSERT INTO StandortTvBezeichnung (StandortID, TvTextBezeichnungID)
+ VALUES (@StandortID, @TvTextBezeichnungID)
+ END
+ "
+
+ Using cmdLink As New SqlCommand(sqlLink, conn, transaction)
+ cmdLink.Parameters.AddWithValue("@StandortID", aviso.StandortID)
+ cmdLink.Parameters.AddWithValue("@Prio", aviso.Prio)
+ cmdLink.Parameters.AddWithValue("@TvTextBezeichnungID", aviso.TvTextBezeichnungID)
+
+ cmdLink.ExecuteNonQuery()
+ End Using
+
+ ' Transaktion committen
+ transaction.Commit()
+ Catch ex As Exception
+ ' Fehler: Transaktion zurückrollen
+ Try
+ transaction.Rollback()
+ Catch rollbackEx As Exception
+ Throw New Exception("Fehler beim Zurückrollen der Transaktion: " & rollbackEx.Message, rollbackEx)
+ End Try
+ Throw
+ End Try
+ End Using
+ End Using
+ Catch ex As SqlException
+ Throw New Exception("SQL Fehler beim Speichern des Eintrags: " & ex.Message, ex)
+ Catch ex As Exception
+ Throw New Exception("Allgemeiner Fehler beim Speichern des Eintrags: " & ex.Message, ex)
+ End Try
+ End Sub
+
+ '''
+ ''' Setzt einen AvisoTvNew-Eintrag auf inaktiv.
+ '''
+ ''' Die ID des Eintrags, der inaktiv gesetzt werden soll.
+ Public Sub SetzeAufInaktiv(ByVal hID As Integer)
+ Dim sql As String = "UPDATE AvisoTvNew SET IsActive = 0 WHERE TVID = @TVID"
+
+ Try
+ Using conn As SqlConnection = cDatenbankAVISO.CreateNewOpenConnection()
+ Using cmd As New SqlCommand(sql, conn)
+ cmd.Parameters.AddWithValue("@TVID", hID)
+ Dim rowsAffected As Integer = cmd.ExecuteNonQuery()
+ If rowsAffected = 0 Then
+ Throw New Exception("Der Datensatz konnte nicht auf inaktiv gesetzt werden. Möglicherweise existiert er nicht mehr.")
+ End If
+ End Using
+ End Using
+ Catch ex As SqlException
+ Throw New Exception("AvisoTvNew-Eintrag kann nicht auf inaktiv gesetzt werden! " & vbCrLf & ex.Message, ex)
+ Catch ex As Exception
+ Throw New Exception("Fehler beim Setzen auf inaktiv: " & ex.Message, ex)
+ End Try
+ End Sub
+
+End Class
+
+
+
+
+
+
Public Class cAvisoTV
Property TVID As Long = 0
Property FixeZeile1 As String
diff --git a/VERAG_PROG_ALLGEMEIN/Classes/cMessenger.vb b/VERAG_PROG_ALLGEMEIN/Classes/cMessenger.vb
index 6e9a1c2f..edb49459 100644
--- a/VERAG_PROG_ALLGEMEIN/Classes/cMessenger.vb
+++ b/VERAG_PROG_ALLGEMEIN/Classes/cMessenger.vb
@@ -53,7 +53,9 @@ Public Class cMessenger
Public Shared Function SET_LKWCHAT_INAKTIV(AvisoId) As Integer
Return SQL.doSQL("UPDATE tblMessenger_Chat SET chat_aktiv=0 WHERE chat_AvisoId='" & AvisoId & "' AND chat_art='LKW_CHAT' ", "ADMIN")
End Function
-
+ Public Shared Function SET_LKWCHAT_AKTIV(AvisoId) As Integer
+ Return SQL.doSQL("UPDATE tblMessenger_Chat SET chat_aktiv=1 WHERE chat_AvisoId='" & AvisoId & "' AND chat_art='LKW_CHAT' ", "ADMIN")
+ End Function
Public Shared Function GET_NewMSG_COUNT_ART(maId, chat_art) As Integer
If maId < 0 Then maId = VERAG_PROG_ALLGEMEIN.cAllgemein.USRID
'Return SQL.getValueTxtBySql("SELECT isnull(COUNT(*),0) FROM tblMessenger_ChatMessages INNER JOIN tblMessenger_Chat on chat_id=chatMg_chatId INNER JOIN tblMessenger_ChatMessageStatus ON chatMgSt_chatMsgId=chatMg_id WHERE chatMgSt_MaId=" & maId & " AND chatMgSt_gelesen=0 AND chat_art='" & chat_art & "' AND (SELECT COUNT(*) FROM tblMessenger_ChatMembers WHERE chatMB_chatId=chat_id AND chatMB_maId=" & maId & ")>0", "ADMIN",,, 0)
diff --git a/VERAG_PROG_ALLGEMEIN/Schnittstellen/ATEZ/NCTS_API/NCTS-P5/CC015C.Designer.vb b/VERAG_PROG_ALLGEMEIN/Schnittstellen/ATEZ/NCTS_API/NCTS-P5/CC015C.Designer.vb
new file mode 100644
index 00000000..36cee9cc
--- /dev/null
+++ b/VERAG_PROG_ALLGEMEIN/Schnittstellen/ATEZ/NCTS_API/NCTS-P5/CC015C.Designer.vb
@@ -0,0 +1,12554 @@
+'' ------------------------------------------------------------------------------
+''
+'' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com
+'' {"TargetFramework":"Net48","NameSpace":"NCTS_P5_CC015C","Language":"VisualBasic","Properties":{},"XmlAttribute":{"Enabled":true},"ClassParams":{},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{},"JsonOutput":{},"Enabled":true},"Miscellaneous":{}}
+''
+'' ------------------------------------------------------------------------------
+#Disable Warning
+Imports System
+Imports System.Diagnostics
+Imports System.Xml.Serialization
+Imports System.Runtime.Serialization
+Imports System.Collections
+Imports System.Xml.Schema
+Imports System.ComponentModel
+Imports System.Xml
+Imports System.IO
+Imports System.Text
+Imports System.Collections.Generic
+
+Namespace NCTS_P5_CC015C
+
+
+ Partial Public Class description
+
+#Region "Private fields"
+ Private _value As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property value() As String
+ Get
+ Return Me._value
+ End Get
+ Set
+ Me._value = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(description))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize description object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes description object
+ '''
+ ''' string to deserialize
+ ''' Output description object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As description, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, description)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As description) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As description
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), description)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As description
+ Return CType(SerializerXml.Deserialize(s), description)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current description object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an description object
+ '''
+ ''' File to load and deserialize
+ ''' Output description object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As description, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, description)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As description) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As description
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class rule
+
+#Region "Private fields"
+ Private _name As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property name() As String
+ Get
+ Return Me._name
+ End Get
+ Set
+ Me._name = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(rule))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize rule object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes rule object
+ '''
+ ''' string to deserialize
+ ''' Output rule object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As rule, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, rule)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As rule) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As rule
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), rule)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As rule
+ Return CType(SerializerXml.Deserialize(s), rule)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current rule object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an rule object
+ '''
+ ''' File to load and deserialize
+ ''' Output rule object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As rule, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, rule)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As rule) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As rule
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class condition
+
+#Region "Private fields"
+ Private _name As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property name() As String
+ Get
+ Return Me._name
+ End Get
+ Set
+ Me._name = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(condition))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize condition object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes condition object
+ '''
+ ''' string to deserialize
+ ''' Output condition object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As condition, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, condition)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As condition) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As condition
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), condition)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As condition
+ Return CType(SerializerXml.Deserialize(s), condition)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current condition object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an condition object
+ '''
+ ''' File to load and deserialize
+ ''' Output condition object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As condition, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, condition)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As condition) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As condition
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class codeList
+
+#Region "Private fields"
+ Private _name As String
+
+ Private _type As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._type = "technical"
+ End Sub
+
+
+ Public Property name() As String
+ Get
+ Return Me._name
+ End Get
+ Set
+ Me._name = Value
+ End Set
+ End Property
+
+
+ Public Property type() As String
+ Get
+ Return Me._type
+ End Get
+ Set
+ Me._type = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(codeList))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize codeList object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes codeList object
+ '''
+ ''' string to deserialize
+ ''' Output codeList object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As codeList, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, codeList)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As codeList) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As codeList
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), codeList)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As codeList
+ Return CType(SerializerXml.Deserialize(s), codeList)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current codeList object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an codeList object
+ '''
+ ''' File to load and deserialize
+ ''' Output codeList object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As codeList, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, codeList)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As codeList) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As codeList
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class CC015CType
+
+#Region "Private fields"
+ Private _messageSender As String
+
+ Private _messageRecipient As String
+
+ Private _preparationDateAndTime As Date
+
+ Private _messageIdentification As String
+
+ Private _messageType As MessageTypes
+
+ Private _correlationIdentifier As String
+
+ Private _transitOperation As TransitOperationType06
+
+ Private _authorisation As List(Of AuthorisationType03)
+
+ Private _customsOfficeOfDeparture As CustomsOfficeOfDepartureType03
+
+ Private _customsOfficeOfDestinationDeclared As CustomsOfficeOfDestinationDeclaredType01
+
+ Private _customsOfficeOfTransitDeclared As List(Of CustomsOfficeOfTransitDeclaredType04)
+
+ Private _customsOfficeOfExitForTransitDeclared As List(Of CustomsOfficeOfExitForTransitDeclaredType02)
+
+ Private _holderOfTheTransitProcedure As HolderOfTheTransitProcedureType14
+
+ Private _representative As RepresentativeType05
+
+ Private _guarantee As List(Of GuaranteeType02)
+
+ Private _consignment As ConsignmentType20
+
+ Private _phaseID As phaseIDtype
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._consignment = New ConsignmentType20()
+ Me._guarantee = New List(Of GuaranteeType02)()
+ Me._representative = New RepresentativeType05()
+ Me._holderOfTheTransitProcedure = New HolderOfTheTransitProcedureType14()
+ Me._customsOfficeOfExitForTransitDeclared = New List(Of CustomsOfficeOfExitForTransitDeclaredType02)()
+ Me._customsOfficeOfTransitDeclared = New List(Of CustomsOfficeOfTransitDeclaredType04)()
+ Me._customsOfficeOfDestinationDeclared = New CustomsOfficeOfDestinationDeclaredType01()
+ Me._customsOfficeOfDeparture = New CustomsOfficeOfDepartureType03()
+ Me._authorisation = New List(Of AuthorisationType03)()
+ Me._transitOperation = New TransitOperationType06()
+ End Sub
+
+
+ Public Property messageSender() As String
+ Get
+ Return Me._messageSender
+ End Get
+ Set
+ Me._messageSender = Value
+ End Set
+ End Property
+
+
+ Public Property messageRecipient() As String
+ Get
+ Return Me._messageRecipient
+ End Get
+ Set
+ Me._messageRecipient = Value
+ End Set
+ End Property
+
+
+ Public Property preparationDateAndTime() As Date
+ Get
+ Return Me._preparationDateAndTime
+ End Get
+ Set
+ Me._preparationDateAndTime = Value
+ End Set
+ End Property
+
+
+ Public Property messageIdentification() As String
+ Get
+ Return Me._messageIdentification
+ End Get
+ Set
+ Me._messageIdentification = Value
+ End Set
+ End Property
+
+
+ Public Property messageType() As MessageTypes
+ Get
+ Return Me._messageType
+ End Get
+ Set
+ Me._messageType = Value
+ End Set
+ End Property
+
+
+ Public Property correlationIdentifier() As String
+ Get
+ Return Me._correlationIdentifier
+ End Get
+ Set
+ Me._correlationIdentifier = Value
+ End Set
+ End Property
+
+
+ Public Property TransitOperation() As TransitOperationType06
+ Get
+ Return Me._transitOperation
+ End Get
+ Set
+ Me._transitOperation = Value
+ End Set
+ End Property
+
+
+ Public Property Authorisation() As List(Of AuthorisationType03)
+ Get
+ Return Me._authorisation
+ End Get
+ Set
+ Me._authorisation = Value
+ End Set
+ End Property
+
+
+ Public Property CustomsOfficeOfDeparture() As CustomsOfficeOfDepartureType03
+ Get
+ Return Me._customsOfficeOfDeparture
+ End Get
+ Set
+ Me._customsOfficeOfDeparture = Value
+ End Set
+ End Property
+
+
+ Public Property CustomsOfficeOfDestinationDeclared() As CustomsOfficeOfDestinationDeclaredType01
+ Get
+ Return Me._customsOfficeOfDestinationDeclared
+ End Get
+ Set
+ Me._customsOfficeOfDestinationDeclared = Value
+ End Set
+ End Property
+
+
+ Public Property CustomsOfficeOfTransitDeclared() As List(Of CustomsOfficeOfTransitDeclaredType04)
+ Get
+ Return Me._customsOfficeOfTransitDeclared
+ End Get
+ Set
+ Me._customsOfficeOfTransitDeclared = Value
+ End Set
+ End Property
+
+
+ Public Property CustomsOfficeOfExitForTransitDeclared() As List(Of CustomsOfficeOfExitForTransitDeclaredType02)
+ Get
+ Return Me._customsOfficeOfExitForTransitDeclared
+ End Get
+ Set
+ Me._customsOfficeOfExitForTransitDeclared = Value
+ End Set
+ End Property
+
+
+ Public Property HolderOfTheTransitProcedure() As HolderOfTheTransitProcedureType14
+ Get
+ Return Me._holderOfTheTransitProcedure
+ End Get
+ Set
+ Me._holderOfTheTransitProcedure = Value
+ End Set
+ End Property
+
+
+ Public Property Representative() As RepresentativeType05
+ Get
+ Return Me._representative
+ End Get
+ Set
+ Me._representative = Value
+ End Set
+ End Property
+
+
+ Public Property Guarantee() As List(Of GuaranteeType02)
+ Get
+ Return Me._guarantee
+ End Get
+ Set
+ Me._guarantee = Value
+ End Set
+ End Property
+
+
+ Public Property Consignment() As ConsignmentType20
+ Get
+ Return Me._consignment
+ End Get
+ Set
+ Me._consignment = Value
+ End Set
+ End Property
+
+
+ Public Property PhaseID() As phaseIDtype
+ Get
+ Return Me._phaseID
+ End Get
+ Set
+ Me._phaseID = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(CC015CType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize CC015CType object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes CC015CType object
+ '''
+ ''' string to deserialize
+ ''' Output CC015CType object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CC015CType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, CC015CType)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CC015CType) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As CC015CType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CC015CType)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As CC015CType
+ Return CType(SerializerXml.Deserialize(s), CC015CType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current CC015CType object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an CC015CType object
+ '''
+ ''' File to load and deserialize
+ ''' Output CC015CType object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CC015CType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, CC015CType)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CC015CType) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As CC015CType
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Public Enum MessageTypes
+
+ CC004C
+
+ CC007C
+
+ CC009C
+
+ CC013C
+
+ CC014C
+
+ CC015C
+
+ CC017C
+
+ CC019C
+
+ CC022C
+
+ CC023C
+
+ CC025C
+
+ CC026C
+
+ CC028C
+
+ CC029C
+
+ CC034C
+
+ CC035C
+
+ CC037C
+
+ CC040C
+
+ CC042C
+
+ CC043C
+
+ CC044C
+
+ CC045C
+
+ CC048C
+
+ CC051C
+
+ CC054C
+
+ CC055C
+
+ CC056C
+
+ CC057C
+
+ CC060C
+
+ CC140C
+
+ CC141C
+
+ CC170C
+
+ CC182C
+
+ CC190C
+
+ CC191C
+
+ CC224C
+
+ CC225C
+
+ CC228C
+
+ CC229C
+
+ CC231C
+
+ CC906C
+
+ CC917C
+
+ CC928C
+
+ CD001C
+
+ CD002C
+
+ CD003C
+
+ CD006C
+
+ CD010C
+
+ CD012C
+
+ CD018C
+
+ CD024C
+
+ CD027C
+
+ CD038C
+
+ CD049C
+
+ CD050C
+
+ CD059C
+
+ CD063C
+
+ CD070C
+
+ CD071C
+
+ CD078C
+
+ CD094C
+
+ CD095C
+
+ CD114C
+
+ CD115C
+
+ CD118C
+
+ CD142C
+
+ CD143C
+
+ CD144C
+
+ CD145C
+
+ CD150C
+
+ CD151C
+
+ CD152C
+
+ CD160C
+
+ CD164C
+
+ CD165C
+
+ CD168C
+
+ CD180C
+
+ CD181C
+
+ CD200C
+
+ CD201C
+
+ CD203C
+
+ CD204C
+
+ CD205C
+
+ CD209C
+
+ CD411D
+
+ CD903D
+
+ CD906C
+
+ CD917C
+
+ CD971C
+
+ CD974C
+
+ CD975C
+ End Enum
+
+
+ Partial Public Class TransitOperationType06
+
+#Region "Private fields"
+ Private _lRN As String
+
+ Private _declarationType As String
+
+ Private _additionalDeclarationType As String
+
+ Private _tIRCarnetNumber As String
+
+ Private _presentationOfTheGoodsDateAndTime As Date
+
+ Private _security As String
+
+ Private _reducedDatasetIndicator As Flag
+
+ Private _specificCircumstanceIndicator As String
+
+ Private _communicationLanguageAtDeparture As String
+
+ Private _bindingItinerary As Flag
+
+ Private _limitDate As Date
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property LRN() As String
+ Get
+ Return Me._lRN
+ End Get
+ Set
+ Me._lRN = Value
+ End Set
+ End Property
+
+
+ Public Property declarationType() As String
+ Get
+ Return Me._declarationType
+ End Get
+ Set
+ Me._declarationType = Value
+ End Set
+ End Property
+
+
+ Public Property additionalDeclarationType() As String
+ Get
+ Return Me._additionalDeclarationType
+ End Get
+ Set
+ Me._additionalDeclarationType = Value
+ End Set
+ End Property
+
+
+ Public Property TIRCarnetNumber() As String
+ Get
+ Return Me._tIRCarnetNumber
+ End Get
+ Set
+ Me._tIRCarnetNumber = Value
+ End Set
+ End Property
+
+
+ Public Property presentationOfTheGoodsDateAndTime() As Date
+ Get
+ Return Me._presentationOfTheGoodsDateAndTime
+ End Get
+ Set
+ Me._presentationOfTheGoodsDateAndTime = Value
+ End Set
+ End Property
+
+
+ Public Property security() As String
+ Get
+ Return Me._security
+ End Get
+ Set
+ Me._security = Value
+ End Set
+ End Property
+
+
+ Public Property reducedDatasetIndicator() As Flag
+ Get
+ Return Me._reducedDatasetIndicator
+ End Get
+ Set
+ Me._reducedDatasetIndicator = Value
+ End Set
+ End Property
+
+
+ Public Property specificCircumstanceIndicator() As String
+ Get
+ Return Me._specificCircumstanceIndicator
+ End Get
+ Set
+ Me._specificCircumstanceIndicator = Value
+ End Set
+ End Property
+
+
+ Public Property communicationLanguageAtDeparture() As String
+ Get
+ Return Me._communicationLanguageAtDeparture
+ End Get
+ Set
+ Me._communicationLanguageAtDeparture = Value
+ End Set
+ End Property
+
+
+ Public Property bindingItinerary() As Flag
+ Get
+ Return Me._bindingItinerary
+ End Get
+ Set
+ Me._bindingItinerary = Value
+ End Set
+ End Property
+
+
+ Public Property limitDate() As Date
+ Get
+ Return Me._limitDate
+ End Get
+ Set
+ Me._limitDate = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransitOperationType06))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize TransitOperationType06 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes TransitOperationType06 object
+ '''
+ ''' string to deserialize
+ ''' Output TransitOperationType06 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransitOperationType06, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, TransitOperationType06)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransitOperationType06) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As TransitOperationType06
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransitOperationType06)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransitOperationType06
+ Return CType(SerializerXml.Deserialize(s), TransitOperationType06)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current TransitOperationType06 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an TransitOperationType06 object
+ '''
+ ''' File to load and deserialize
+ ''' Output TransitOperationType06 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransitOperationType06, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, TransitOperationType06)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransitOperationType06) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransitOperationType06
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Public Enum Flag
+
+
+ Item0
+
+
+ Item1
+ End Enum
+
+
+ Partial Public Class AuthorisationType03
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _type As String
+
+ Private _referenceNumber As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property type() As String
+ Get
+ Return Me._type
+ End Get
+ Set
+ Me._type = Value
+ End Set
+ End Property
+
+
+ Public Property referenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AuthorisationType03))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize AuthorisationType03 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes AuthorisationType03 object
+ '''
+ ''' string to deserialize
+ ''' Output AuthorisationType03 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AuthorisationType03, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, AuthorisationType03)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AuthorisationType03) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As AuthorisationType03
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AuthorisationType03)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As AuthorisationType03
+ Return CType(SerializerXml.Deserialize(s), AuthorisationType03)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current AuthorisationType03 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an AuthorisationType03 object
+ '''
+ ''' File to load and deserialize
+ ''' Output AuthorisationType03 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AuthorisationType03, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, AuthorisationType03)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AuthorisationType03) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AuthorisationType03
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class CustomsOfficeOfDepartureType03
+
+#Region "Private fields"
+ Private _referenceNumber As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property referenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(CustomsOfficeOfDepartureType03))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize CustomsOfficeOfDepartureType03 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes CustomsOfficeOfDepartureType03 object
+ '''
+ ''' string to deserialize
+ ''' Output CustomsOfficeOfDepartureType03 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CustomsOfficeOfDepartureType03, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, CustomsOfficeOfDepartureType03)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CustomsOfficeOfDepartureType03) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As CustomsOfficeOfDepartureType03
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CustomsOfficeOfDepartureType03)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As CustomsOfficeOfDepartureType03
+ Return CType(SerializerXml.Deserialize(s), CustomsOfficeOfDepartureType03)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current CustomsOfficeOfDepartureType03 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an CustomsOfficeOfDepartureType03 object
+ '''
+ ''' File to load and deserialize
+ ''' Output CustomsOfficeOfDepartureType03 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CustomsOfficeOfDepartureType03, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, CustomsOfficeOfDepartureType03)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CustomsOfficeOfDepartureType03) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As CustomsOfficeOfDepartureType03
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class CustomsOfficeOfDestinationDeclaredType01
+
+#Region "Private fields"
+ Private _referenceNumber As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property referenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(CustomsOfficeOfDestinationDeclaredType01))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize CustomsOfficeOfDestinationDeclaredType01 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes CustomsOfficeOfDestinationDeclaredType01 object
+ '''
+ ''' string to deserialize
+ ''' Output CustomsOfficeOfDestinationDeclaredType01 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CustomsOfficeOfDestinationDeclaredType01, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, CustomsOfficeOfDestinationDeclaredType01)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CustomsOfficeOfDestinationDeclaredType01) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As CustomsOfficeOfDestinationDeclaredType01
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CustomsOfficeOfDestinationDeclaredType01)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As CustomsOfficeOfDestinationDeclaredType01
+ Return CType(SerializerXml.Deserialize(s), CustomsOfficeOfDestinationDeclaredType01)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current CustomsOfficeOfDestinationDeclaredType01 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an CustomsOfficeOfDestinationDeclaredType01 object
+ '''
+ ''' File to load and deserialize
+ ''' Output CustomsOfficeOfDestinationDeclaredType01 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CustomsOfficeOfDestinationDeclaredType01, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, CustomsOfficeOfDestinationDeclaredType01)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CustomsOfficeOfDestinationDeclaredType01) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As CustomsOfficeOfDestinationDeclaredType01
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class CustomsOfficeOfTransitDeclaredType04
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _referenceNumber As String
+
+ Private _arrivalDateAndTimeEstimated As Date
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property referenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property arrivalDateAndTimeEstimated() As Date
+ Get
+ Return Me._arrivalDateAndTimeEstimated
+ End Get
+ Set
+ Me._arrivalDateAndTimeEstimated = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(CustomsOfficeOfTransitDeclaredType04))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize CustomsOfficeOfTransitDeclaredType04 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes CustomsOfficeOfTransitDeclaredType04 object
+ '''
+ ''' string to deserialize
+ ''' Output CustomsOfficeOfTransitDeclaredType04 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CustomsOfficeOfTransitDeclaredType04, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, CustomsOfficeOfTransitDeclaredType04)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CustomsOfficeOfTransitDeclaredType04) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As CustomsOfficeOfTransitDeclaredType04
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CustomsOfficeOfTransitDeclaredType04)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As CustomsOfficeOfTransitDeclaredType04
+ Return CType(SerializerXml.Deserialize(s), CustomsOfficeOfTransitDeclaredType04)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current CustomsOfficeOfTransitDeclaredType04 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an CustomsOfficeOfTransitDeclaredType04 object
+ '''
+ ''' File to load and deserialize
+ ''' Output CustomsOfficeOfTransitDeclaredType04 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CustomsOfficeOfTransitDeclaredType04, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, CustomsOfficeOfTransitDeclaredType04)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CustomsOfficeOfTransitDeclaredType04) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As CustomsOfficeOfTransitDeclaredType04
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class CustomsOfficeOfExitForTransitDeclaredType02
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _referenceNumber As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property referenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(CustomsOfficeOfExitForTransitDeclaredType02))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize CustomsOfficeOfExitForTransitDeclaredType02 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes CustomsOfficeOfExitForTransitDeclaredType02 object
+ '''
+ ''' string to deserialize
+ ''' Output CustomsOfficeOfExitForTransitDeclaredType02 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CustomsOfficeOfExitForTransitDeclaredType02, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, CustomsOfficeOfExitForTransitDeclaredType02)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CustomsOfficeOfExitForTransitDeclaredType02) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As CustomsOfficeOfExitForTransitDeclaredType02
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CustomsOfficeOfExitForTransitDeclaredType02)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As CustomsOfficeOfExitForTransitDeclaredType02
+ Return CType(SerializerXml.Deserialize(s), CustomsOfficeOfExitForTransitDeclaredType02)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current CustomsOfficeOfExitForTransitDeclaredType02 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an CustomsOfficeOfExitForTransitDeclaredType02 object
+ '''
+ ''' File to load and deserialize
+ ''' Output CustomsOfficeOfExitForTransitDeclaredType02 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CustomsOfficeOfExitForTransitDeclaredType02, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, CustomsOfficeOfExitForTransitDeclaredType02)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CustomsOfficeOfExitForTransitDeclaredType02) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As CustomsOfficeOfExitForTransitDeclaredType02
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class HolderOfTheTransitProcedureType14
+
+#Region "Private fields"
+ Private _identificationNumber As String
+
+ Private _tIRHolderIdentificationNumber As String
+
+ Private _name As String
+
+ Private _address As AddressType17
+
+ Private _contactPerson As ContactPersonType05
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._contactPerson = New ContactPersonType05()
+ Me._address = New AddressType17()
+ End Sub
+
+
+ Public Property identificationNumber() As String
+ Get
+ Return Me._identificationNumber
+ End Get
+ Set
+ Me._identificationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property TIRHolderIdentificationNumber() As String
+ Get
+ Return Me._tIRHolderIdentificationNumber
+ End Get
+ Set
+ Me._tIRHolderIdentificationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property name() As String
+ Get
+ Return Me._name
+ End Get
+ Set
+ Me._name = Value
+ End Set
+ End Property
+
+
+ Public Property Address() As AddressType17
+ Get
+ Return Me._address
+ End Get
+ Set
+ Me._address = Value
+ End Set
+ End Property
+
+
+ Public Property ContactPerson() As ContactPersonType05
+ Get
+ Return Me._contactPerson
+ End Get
+ Set
+ Me._contactPerson = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(HolderOfTheTransitProcedureType14))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize HolderOfTheTransitProcedureType14 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes HolderOfTheTransitProcedureType14 object
+ '''
+ ''' string to deserialize
+ ''' Output HolderOfTheTransitProcedureType14 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As HolderOfTheTransitProcedureType14, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, HolderOfTheTransitProcedureType14)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As HolderOfTheTransitProcedureType14) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As HolderOfTheTransitProcedureType14
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), HolderOfTheTransitProcedureType14)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As HolderOfTheTransitProcedureType14
+ Return CType(SerializerXml.Deserialize(s), HolderOfTheTransitProcedureType14)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current HolderOfTheTransitProcedureType14 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an HolderOfTheTransitProcedureType14 object
+ '''
+ ''' File to load and deserialize
+ ''' Output HolderOfTheTransitProcedureType14 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HolderOfTheTransitProcedureType14, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, HolderOfTheTransitProcedureType14)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HolderOfTheTransitProcedureType14) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As HolderOfTheTransitProcedureType14
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class AddressType17
+
+#Region "Private fields"
+ Private _streetAndNumber As String
+
+ Private _postcode As String
+
+ Private _city As String
+
+ Private _country As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property streetAndNumber() As String
+ Get
+ Return Me._streetAndNumber
+ End Get
+ Set
+ Me._streetAndNumber = Value
+ End Set
+ End Property
+
+
+ Public Property postcode() As String
+ Get
+ Return Me._postcode
+ End Get
+ Set
+ Me._postcode = Value
+ End Set
+ End Property
+
+
+ Public Property city() As String
+ Get
+ Return Me._city
+ End Get
+ Set
+ Me._city = Value
+ End Set
+ End Property
+
+
+ Public Property country() As String
+ Get
+ Return Me._country
+ End Get
+ Set
+ Me._country = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AddressType17))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize AddressType17 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes AddressType17 object
+ '''
+ ''' string to deserialize
+ ''' Output AddressType17 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AddressType17, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, AddressType17)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AddressType17) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As AddressType17
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AddressType17)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As AddressType17
+ Return CType(SerializerXml.Deserialize(s), AddressType17)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current AddressType17 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an AddressType17 object
+ '''
+ ''' File to load and deserialize
+ ''' Output AddressType17 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AddressType17, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, AddressType17)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AddressType17) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AddressType17
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class ContactPersonType05
+
+#Region "Private fields"
+ Private _name As String
+
+ Private _phoneNumber As String
+
+ Private _eMailAddress As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property name() As String
+ Get
+ Return Me._name
+ End Get
+ Set
+ Me._name = Value
+ End Set
+ End Property
+
+
+ Public Property phoneNumber() As String
+ Get
+ Return Me._phoneNumber
+ End Get
+ Set
+ Me._phoneNumber = Value
+ End Set
+ End Property
+
+
+ Public Property eMailAddress() As String
+ Get
+ Return Me._eMailAddress
+ End Get
+ Set
+ Me._eMailAddress = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ContactPersonType05))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize ContactPersonType05 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes ContactPersonType05 object
+ '''
+ ''' string to deserialize
+ ''' Output ContactPersonType05 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ContactPersonType05, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, ContactPersonType05)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ContactPersonType05) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As ContactPersonType05
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ContactPersonType05)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As ContactPersonType05
+ Return CType(SerializerXml.Deserialize(s), ContactPersonType05)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current ContactPersonType05 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an ContactPersonType05 object
+ '''
+ ''' File to load and deserialize
+ ''' Output ContactPersonType05 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ContactPersonType05, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, ContactPersonType05)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ContactPersonType05) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ContactPersonType05
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class RepresentativeType05
+
+#Region "Private fields"
+ Private _identificationNumber As String
+
+ Private _status As String
+
+ Private _contactPerson As ContactPersonType05
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._contactPerson = New ContactPersonType05()
+ End Sub
+
+
+ Public Property identificationNumber() As String
+ Get
+ Return Me._identificationNumber
+ End Get
+ Set
+ Me._identificationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property status() As String
+ Get
+ Return Me._status
+ End Get
+ Set
+ Me._status = Value
+ End Set
+ End Property
+
+
+ Public Property ContactPerson() As ContactPersonType05
+ Get
+ Return Me._contactPerson
+ End Get
+ Set
+ Me._contactPerson = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(RepresentativeType05))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize RepresentativeType05 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes RepresentativeType05 object
+ '''
+ ''' string to deserialize
+ ''' Output RepresentativeType05 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As RepresentativeType05, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, RepresentativeType05)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As RepresentativeType05) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As RepresentativeType05
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), RepresentativeType05)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As RepresentativeType05
+ Return CType(SerializerXml.Deserialize(s), RepresentativeType05)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current RepresentativeType05 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an RepresentativeType05 object
+ '''
+ ''' File to load and deserialize
+ ''' Output RepresentativeType05 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As RepresentativeType05, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, RepresentativeType05)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As RepresentativeType05) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As RepresentativeType05
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class GuaranteeType02
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _guaranteeType As String
+
+ Private _otherGuaranteeReference As String
+
+ Private _guaranteeReference As List(Of GuaranteeReferenceType03)
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._guaranteeReference = New List(Of GuaranteeReferenceType03)()
+ End Sub
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property guaranteeType() As String
+ Get
+ Return Me._guaranteeType
+ End Get
+ Set
+ Me._guaranteeType = Value
+ End Set
+ End Property
+
+
+ Public Property otherGuaranteeReference() As String
+ Get
+ Return Me._otherGuaranteeReference
+ End Get
+ Set
+ Me._otherGuaranteeReference = Value
+ End Set
+ End Property
+
+
+ Public Property GuaranteeReference() As List(Of GuaranteeReferenceType03)
+ Get
+ Return Me._guaranteeReference
+ End Get
+ Set
+ Me._guaranteeReference = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(GuaranteeType02))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize GuaranteeType02 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes GuaranteeType02 object
+ '''
+ ''' string to deserialize
+ ''' Output GuaranteeType02 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GuaranteeType02, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, GuaranteeType02)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GuaranteeType02) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As GuaranteeType02
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), GuaranteeType02)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As GuaranteeType02
+ Return CType(SerializerXml.Deserialize(s), GuaranteeType02)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current GuaranteeType02 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an GuaranteeType02 object
+ '''
+ ''' File to load and deserialize
+ ''' Output GuaranteeType02 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GuaranteeType02, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, GuaranteeType02)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GuaranteeType02) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As GuaranteeType02
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class GuaranteeReferenceType03
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _gRN As String
+
+ Private _accessCode As String
+
+ Private _amountToBeCovered As Decimal
+
+ Private _currency As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property GRN() As String
+ Get
+ Return Me._gRN
+ End Get
+ Set
+ Me._gRN = Value
+ End Set
+ End Property
+
+
+ Public Property accessCode() As String
+ Get
+ Return Me._accessCode
+ End Get
+ Set
+ Me._accessCode = Value
+ End Set
+ End Property
+
+
+ Public Property amountToBeCovered() As Decimal
+ Get
+ Return Me._amountToBeCovered
+ End Get
+ Set
+ Me._amountToBeCovered = Value
+ End Set
+ End Property
+
+
+ Public Property currency() As String
+ Get
+ Return Me._currency
+ End Get
+ Set
+ Me._currency = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(GuaranteeReferenceType03))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize GuaranteeReferenceType03 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes GuaranteeReferenceType03 object
+ '''
+ ''' string to deserialize
+ ''' Output GuaranteeReferenceType03 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GuaranteeReferenceType03, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, GuaranteeReferenceType03)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GuaranteeReferenceType03) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As GuaranteeReferenceType03
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), GuaranteeReferenceType03)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As GuaranteeReferenceType03
+ Return CType(SerializerXml.Deserialize(s), GuaranteeReferenceType03)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current GuaranteeReferenceType03 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an GuaranteeReferenceType03 object
+ '''
+ ''' File to load and deserialize
+ ''' Output GuaranteeReferenceType03 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GuaranteeReferenceType03, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, GuaranteeReferenceType03)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GuaranteeReferenceType03) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As GuaranteeReferenceType03
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class ConsignmentType20
+
+#Region "Private fields"
+ Private _countryOfDispatch As String
+
+ Private _countryOfDestination As String
+
+ Private _containerIndicator As Flag
+
+ Private _inlandModeOfTransport As String
+
+ Private _modeOfTransportAtTheBorder As String
+
+ Private _grossMass As Decimal
+
+ Private _referenceNumberUCR As String
+
+ Private _carrier As CarrierType04
+
+ Private _consignor As ConsignorType07
+
+ Private _consignee As ConsigneeType05
+
+ Private _additionalSupplyChainActor As List(Of AdditionalSupplyChainActorType)
+
+ Private _transportEquipment As List(Of TransportEquipmentType06)
+
+ Private _locationOfGoods As LocationOfGoodsType05
+
+ Private _departureTransportMeans As List(Of DepartureTransportMeansType03)
+
+ Private _countryOfRoutingOfConsignment As List(Of CountryOfRoutingOfConsignmentType01)
+
+ Private _activeBorderTransportMeans As List(Of ActiveBorderTransportMeansType02)
+
+ Private _placeOfLoading As PlaceOfLoadingType03
+
+ Private _placeOfUnloading As PlaceOfUnloadingType01
+
+ Private _previousDocument As List(Of PreviousDocumentType09)
+
+ Private _supportingDocument As List(Of SupportingDocumentType05)
+
+ Private _transportDocument As List(Of TransportDocumentType04)
+
+ Private _additionalReference As List(Of AdditionalReferenceType05)
+
+ Private _additionalInformation As List(Of AdditionalInformationType03)
+
+ Private _transportCharges As TransportChargesType
+
+ Private _houseConsignment As List(Of HouseConsignmentType10)
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._houseConsignment = New List(Of HouseConsignmentType10)()
+ Me._transportCharges = New TransportChargesType()
+ Me._additionalInformation = New List(Of AdditionalInformationType03)()
+ Me._additionalReference = New List(Of AdditionalReferenceType05)()
+ Me._transportDocument = New List(Of TransportDocumentType04)()
+ Me._supportingDocument = New List(Of SupportingDocumentType05)()
+ Me._previousDocument = New List(Of PreviousDocumentType09)()
+ Me._placeOfUnloading = New PlaceOfUnloadingType01()
+ Me._placeOfLoading = New PlaceOfLoadingType03()
+ Me._activeBorderTransportMeans = New List(Of ActiveBorderTransportMeansType02)()
+ Me._countryOfRoutingOfConsignment = New List(Of CountryOfRoutingOfConsignmentType01)()
+ Me._departureTransportMeans = New List(Of DepartureTransportMeansType03)()
+ Me._locationOfGoods = New LocationOfGoodsType05()
+ Me._transportEquipment = New List(Of TransportEquipmentType06)()
+ Me._additionalSupplyChainActor = New List(Of AdditionalSupplyChainActorType)()
+ Me._consignee = New ConsigneeType05()
+ Me._consignor = New ConsignorType07()
+ Me._carrier = New CarrierType04()
+ End Sub
+
+
+ Public Property countryOfDispatch() As String
+ Get
+ Return Me._countryOfDispatch
+ End Get
+ Set
+ Me._countryOfDispatch = Value
+ End Set
+ End Property
+
+
+ Public Property countryOfDestination() As String
+ Get
+ Return Me._countryOfDestination
+ End Get
+ Set
+ Me._countryOfDestination = Value
+ End Set
+ End Property
+
+
+ Public Property containerIndicator() As Flag
+ Get
+ Return Me._containerIndicator
+ End Get
+ Set
+ Me._containerIndicator = Value
+ End Set
+ End Property
+
+
+ Public Property inlandModeOfTransport() As String
+ Get
+ Return Me._inlandModeOfTransport
+ End Get
+ Set
+ Me._inlandModeOfTransport = Value
+ End Set
+ End Property
+
+
+ Public Property modeOfTransportAtTheBorder() As String
+ Get
+ Return Me._modeOfTransportAtTheBorder
+ End Get
+ Set
+ Me._modeOfTransportAtTheBorder = Value
+ End Set
+ End Property
+
+
+ Public Property grossMass() As Decimal
+ Get
+ Return Me._grossMass
+ End Get
+ Set
+ Me._grossMass = Value
+ End Set
+ End Property
+
+
+ Public Property referenceNumberUCR() As String
+ Get
+ Return Me._referenceNumberUCR
+ End Get
+ Set
+ Me._referenceNumberUCR = Value
+ End Set
+ End Property
+
+
+ Public Property Carrier() As CarrierType04
+ Get
+ Return Me._carrier
+ End Get
+ Set
+ Me._carrier = Value
+ End Set
+ End Property
+
+
+ Public Property Consignor() As ConsignorType07
+ Get
+ Return Me._consignor
+ End Get
+ Set
+ Me._consignor = Value
+ End Set
+ End Property
+
+
+ Public Property Consignee() As ConsigneeType05
+ Get
+ Return Me._consignee
+ End Get
+ Set
+ Me._consignee = Value
+ End Set
+ End Property
+
+
+ Public Property AdditionalSupplyChainActor() As List(Of AdditionalSupplyChainActorType)
+ Get
+ Return Me._additionalSupplyChainActor
+ End Get
+ Set
+ Me._additionalSupplyChainActor = Value
+ End Set
+ End Property
+
+
+ Public Property TransportEquipment() As List(Of TransportEquipmentType06)
+ Get
+ Return Me._transportEquipment
+ End Get
+ Set
+ Me._transportEquipment = Value
+ End Set
+ End Property
+
+
+ Public Property LocationOfGoods() As LocationOfGoodsType05
+ Get
+ Return Me._locationOfGoods
+ End Get
+ Set
+ Me._locationOfGoods = Value
+ End Set
+ End Property
+
+
+ Public Property DepartureTransportMeans() As List(Of DepartureTransportMeansType03)
+ Get
+ Return Me._departureTransportMeans
+ End Get
+ Set
+ Me._departureTransportMeans = Value
+ End Set
+ End Property
+
+
+ Public Property CountryOfRoutingOfConsignment() As List(Of CountryOfRoutingOfConsignmentType01)
+ Get
+ Return Me._countryOfRoutingOfConsignment
+ End Get
+ Set
+ Me._countryOfRoutingOfConsignment = Value
+ End Set
+ End Property
+
+
+ Public Property ActiveBorderTransportMeans() As List(Of ActiveBorderTransportMeansType02)
+ Get
+ Return Me._activeBorderTransportMeans
+ End Get
+ Set
+ Me._activeBorderTransportMeans = Value
+ End Set
+ End Property
+
+
+ Public Property PlaceOfLoading() As PlaceOfLoadingType03
+ Get
+ Return Me._placeOfLoading
+ End Get
+ Set
+ Me._placeOfLoading = Value
+ End Set
+ End Property
+
+
+ Public Property PlaceOfUnloading() As PlaceOfUnloadingType01
+ Get
+ Return Me._placeOfUnloading
+ End Get
+ Set
+ Me._placeOfUnloading = Value
+ End Set
+ End Property
+
+
+ Public Property PreviousDocument() As List(Of PreviousDocumentType09)
+ Get
+ Return Me._previousDocument
+ End Get
+ Set
+ Me._previousDocument = Value
+ End Set
+ End Property
+
+
+ Public Property SupportingDocument() As List(Of SupportingDocumentType05)
+ Get
+ Return Me._supportingDocument
+ End Get
+ Set
+ Me._supportingDocument = Value
+ End Set
+ End Property
+
+
+ Public Property TransportDocument() As List(Of TransportDocumentType04)
+ Get
+ Return Me._transportDocument
+ End Get
+ Set
+ Me._transportDocument = Value
+ End Set
+ End Property
+
+
+ Public Property AdditionalReference() As List(Of AdditionalReferenceType05)
+ Get
+ Return Me._additionalReference
+ End Get
+ Set
+ Me._additionalReference = Value
+ End Set
+ End Property
+
+
+ Public Property AdditionalInformation() As List(Of AdditionalInformationType03)
+ Get
+ Return Me._additionalInformation
+ End Get
+ Set
+ Me._additionalInformation = Value
+ End Set
+ End Property
+
+
+ Public Property TransportCharges() As TransportChargesType
+ Get
+ Return Me._transportCharges
+ End Get
+ Set
+ Me._transportCharges = Value
+ End Set
+ End Property
+
+
+ Public Property HouseConsignment() As List(Of HouseConsignmentType10)
+ Get
+ Return Me._houseConsignment
+ End Get
+ Set
+ Me._houseConsignment = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ConsignmentType20))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize ConsignmentType20 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes ConsignmentType20 object
+ '''
+ ''' string to deserialize
+ ''' Output ConsignmentType20 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ConsignmentType20, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, ConsignmentType20)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ConsignmentType20) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As ConsignmentType20
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ConsignmentType20)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As ConsignmentType20
+ Return CType(SerializerXml.Deserialize(s), ConsignmentType20)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current ConsignmentType20 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an ConsignmentType20 object
+ '''
+ ''' File to load and deserialize
+ ''' Output ConsignmentType20 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ConsignmentType20, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, ConsignmentType20)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ConsignmentType20) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ConsignmentType20
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class CarrierType04
+
+#Region "Private fields"
+ Private _identificationNumber As String
+
+ Private _contactPerson As ContactPersonType05
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._contactPerson = New ContactPersonType05()
+ End Sub
+
+
+ Public Property identificationNumber() As String
+ Get
+ Return Me._identificationNumber
+ End Get
+ Set
+ Me._identificationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property ContactPerson() As ContactPersonType05
+ Get
+ Return Me._contactPerson
+ End Get
+ Set
+ Me._contactPerson = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(CarrierType04))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize CarrierType04 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes CarrierType04 object
+ '''
+ ''' string to deserialize
+ ''' Output CarrierType04 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CarrierType04, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, CarrierType04)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CarrierType04) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As CarrierType04
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CarrierType04)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As CarrierType04
+ Return CType(SerializerXml.Deserialize(s), CarrierType04)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current CarrierType04 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an CarrierType04 object
+ '''
+ ''' File to load and deserialize
+ ''' Output CarrierType04 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CarrierType04, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, CarrierType04)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CarrierType04) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As CarrierType04
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class ConsignorType07
+
+#Region "Private fields"
+ Private _identificationNumber As String
+
+ Private _name As String
+
+ Private _address As AddressType17
+
+ Private _contactPerson As ContactPersonType05
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._contactPerson = New ContactPersonType05()
+ Me._address = New AddressType17()
+ End Sub
+
+
+ Public Property identificationNumber() As String
+ Get
+ Return Me._identificationNumber
+ End Get
+ Set
+ Me._identificationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property name() As String
+ Get
+ Return Me._name
+ End Get
+ Set
+ Me._name = Value
+ End Set
+ End Property
+
+
+ Public Property Address() As AddressType17
+ Get
+ Return Me._address
+ End Get
+ Set
+ Me._address = Value
+ End Set
+ End Property
+
+
+ Public Property ContactPerson() As ContactPersonType05
+ Get
+ Return Me._contactPerson
+ End Get
+ Set
+ Me._contactPerson = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ConsignorType07))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize ConsignorType07 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes ConsignorType07 object
+ '''
+ ''' string to deserialize
+ ''' Output ConsignorType07 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ConsignorType07, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, ConsignorType07)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ConsignorType07) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As ConsignorType07
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ConsignorType07)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As ConsignorType07
+ Return CType(SerializerXml.Deserialize(s), ConsignorType07)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current ConsignorType07 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an ConsignorType07 object
+ '''
+ ''' File to load and deserialize
+ ''' Output ConsignorType07 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ConsignorType07, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, ConsignorType07)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ConsignorType07) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ConsignorType07
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class ConsigneeType05
+
+#Region "Private fields"
+ Private _identificationNumber As String
+
+ Private _name As String
+
+ Private _address As AddressType17
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._address = New AddressType17()
+ End Sub
+
+
+ Public Property identificationNumber() As String
+ Get
+ Return Me._identificationNumber
+ End Get
+ Set
+ Me._identificationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property name() As String
+ Get
+ Return Me._name
+ End Get
+ Set
+ Me._name = Value
+ End Set
+ End Property
+
+
+ Public Property Address() As AddressType17
+ Get
+ Return Me._address
+ End Get
+ Set
+ Me._address = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ConsigneeType05))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize ConsigneeType05 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes ConsigneeType05 object
+ '''
+ ''' string to deserialize
+ ''' Output ConsigneeType05 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ConsigneeType05, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, ConsigneeType05)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ConsigneeType05) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As ConsigneeType05
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ConsigneeType05)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As ConsigneeType05
+ Return CType(SerializerXml.Deserialize(s), ConsigneeType05)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current ConsigneeType05 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an ConsigneeType05 object
+ '''
+ ''' File to load and deserialize
+ ''' Output ConsigneeType05 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ConsigneeType05, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, ConsigneeType05)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ConsigneeType05) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ConsigneeType05
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class AdditionalSupplyChainActorType
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _role As String
+
+ Private _identificationNumber As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property role() As String
+ Get
+ Return Me._role
+ End Get
+ Set
+ Me._role = Value
+ End Set
+ End Property
+
+
+ Public Property identificationNumber() As String
+ Get
+ Return Me._identificationNumber
+ End Get
+ Set
+ Me._identificationNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdditionalSupplyChainActorType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize AdditionalSupplyChainActorType object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes AdditionalSupplyChainActorType object
+ '''
+ ''' string to deserialize
+ ''' Output AdditionalSupplyChainActorType object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalSupplyChainActorType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, AdditionalSupplyChainActorType)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalSupplyChainActorType) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As AdditionalSupplyChainActorType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalSupplyChainActorType)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdditionalSupplyChainActorType
+ Return CType(SerializerXml.Deserialize(s), AdditionalSupplyChainActorType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current AdditionalSupplyChainActorType object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an AdditionalSupplyChainActorType object
+ '''
+ ''' File to load and deserialize
+ ''' Output AdditionalSupplyChainActorType object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalSupplyChainActorType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, AdditionalSupplyChainActorType)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalSupplyChainActorType) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdditionalSupplyChainActorType
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class TransportEquipmentType06
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _containerIdentificationNumber As String
+
+ Private _numberOfSeals As String
+
+ Private _seal As List(Of SealType05)
+
+ Private _goodsReference As List(Of GoodsReferenceType02)
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._goodsReference = New List(Of GoodsReferenceType02)()
+ Me._seal = New List(Of SealType05)()
+ End Sub
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property containerIdentificationNumber() As String
+ Get
+ Return Me._containerIdentificationNumber
+ End Get
+ Set
+ Me._containerIdentificationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property numberOfSeals() As String
+ Get
+ Return Me._numberOfSeals
+ End Get
+ Set
+ Me._numberOfSeals = Value
+ End Set
+ End Property
+
+
+ Public Property Seal() As List(Of SealType05)
+ Get
+ Return Me._seal
+ End Get
+ Set
+ Me._seal = Value
+ End Set
+ End Property
+
+
+ Public Property GoodsReference() As List(Of GoodsReferenceType02)
+ Get
+ Return Me._goodsReference
+ End Get
+ Set
+ Me._goodsReference = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransportEquipmentType06))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize TransportEquipmentType06 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes TransportEquipmentType06 object
+ '''
+ ''' string to deserialize
+ ''' Output TransportEquipmentType06 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransportEquipmentType06, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, TransportEquipmentType06)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransportEquipmentType06) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As TransportEquipmentType06
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransportEquipmentType06)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransportEquipmentType06
+ Return CType(SerializerXml.Deserialize(s), TransportEquipmentType06)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current TransportEquipmentType06 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an TransportEquipmentType06 object
+ '''
+ ''' File to load and deserialize
+ ''' Output TransportEquipmentType06 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransportEquipmentType06, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, TransportEquipmentType06)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransportEquipmentType06) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransportEquipmentType06
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class SealType05
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _identifier As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property identifier() As String
+ Get
+ Return Me._identifier
+ End Get
+ Set
+ Me._identifier = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(SealType05))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize SealType05 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes SealType05 object
+ '''
+ ''' string to deserialize
+ ''' Output SealType05 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SealType05, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, SealType05)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SealType05) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As SealType05
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), SealType05)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As SealType05
+ Return CType(SerializerXml.Deserialize(s), SealType05)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current SealType05 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an SealType05 object
+ '''
+ ''' File to load and deserialize
+ ''' Output SealType05 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SealType05, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, SealType05)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SealType05) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As SealType05
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class GoodsReferenceType02
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _declarationGoodsItemNumber As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property declarationGoodsItemNumber() As String
+ Get
+ Return Me._declarationGoodsItemNumber
+ End Get
+ Set
+ Me._declarationGoodsItemNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(GoodsReferenceType02))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize GoodsReferenceType02 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes GoodsReferenceType02 object
+ '''
+ ''' string to deserialize
+ ''' Output GoodsReferenceType02 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GoodsReferenceType02, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, GoodsReferenceType02)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GoodsReferenceType02) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As GoodsReferenceType02
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), GoodsReferenceType02)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As GoodsReferenceType02
+ Return CType(SerializerXml.Deserialize(s), GoodsReferenceType02)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current GoodsReferenceType02 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an GoodsReferenceType02 object
+ '''
+ ''' File to load and deserialize
+ ''' Output GoodsReferenceType02 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GoodsReferenceType02, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, GoodsReferenceType02)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GoodsReferenceType02) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As GoodsReferenceType02
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class LocationOfGoodsType05
+
+#Region "Private fields"
+ Private _typeOfLocation As String
+
+ Private _qualifierOfIdentification As String
+
+ Private _authorisationNumber As String
+
+ Private _additionalIdentifier As String
+
+ Private _uNLocode As String
+
+ Private _customsOffice As CustomsOfficeType02
+
+ Private _gNSS As GNSSType
+
+ Private _economicOperator As EconomicOperatorType03
+
+ Private _address As AddressType14
+
+ Private _postcodeAddress As PostcodeAddressType02
+
+ Private _contactPerson As ContactPersonType06
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._contactPerson = New ContactPersonType06()
+ Me._postcodeAddress = New PostcodeAddressType02()
+ Me._address = New AddressType14()
+ Me._economicOperator = New EconomicOperatorType03()
+ Me._gNSS = New GNSSType()
+ Me._customsOffice = New CustomsOfficeType02()
+ End Sub
+
+
+ Public Property typeOfLocation() As String
+ Get
+ Return Me._typeOfLocation
+ End Get
+ Set
+ Me._typeOfLocation = Value
+ End Set
+ End Property
+
+
+ Public Property qualifierOfIdentification() As String
+ Get
+ Return Me._qualifierOfIdentification
+ End Get
+ Set
+ Me._qualifierOfIdentification = Value
+ End Set
+ End Property
+
+
+ Public Property authorisationNumber() As String
+ Get
+ Return Me._authorisationNumber
+ End Get
+ Set
+ Me._authorisationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property additionalIdentifier() As String
+ Get
+ Return Me._additionalIdentifier
+ End Get
+ Set
+ Me._additionalIdentifier = Value
+ End Set
+ End Property
+
+
+ Public Property UNLocode() As String
+ Get
+ Return Me._uNLocode
+ End Get
+ Set
+ Me._uNLocode = Value
+ End Set
+ End Property
+
+
+ Public Property CustomsOffice() As CustomsOfficeType02
+ Get
+ Return Me._customsOffice
+ End Get
+ Set
+ Me._customsOffice = Value
+ End Set
+ End Property
+
+
+ Public Property GNSS() As GNSSType
+ Get
+ Return Me._gNSS
+ End Get
+ Set
+ Me._gNSS = Value
+ End Set
+ End Property
+
+
+ Public Property EconomicOperator() As EconomicOperatorType03
+ Get
+ Return Me._economicOperator
+ End Get
+ Set
+ Me._economicOperator = Value
+ End Set
+ End Property
+
+
+ Public Property Address() As AddressType14
+ Get
+ Return Me._address
+ End Get
+ Set
+ Me._address = Value
+ End Set
+ End Property
+
+
+ Public Property PostcodeAddress() As PostcodeAddressType02
+ Get
+ Return Me._postcodeAddress
+ End Get
+ Set
+ Me._postcodeAddress = Value
+ End Set
+ End Property
+
+
+ Public Property ContactPerson() As ContactPersonType06
+ Get
+ Return Me._contactPerson
+ End Get
+ Set
+ Me._contactPerson = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(LocationOfGoodsType05))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize LocationOfGoodsType05 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes LocationOfGoodsType05 object
+ '''
+ ''' string to deserialize
+ ''' Output LocationOfGoodsType05 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As LocationOfGoodsType05, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, LocationOfGoodsType05)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As LocationOfGoodsType05) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As LocationOfGoodsType05
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), LocationOfGoodsType05)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As LocationOfGoodsType05
+ Return CType(SerializerXml.Deserialize(s), LocationOfGoodsType05)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current LocationOfGoodsType05 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an LocationOfGoodsType05 object
+ '''
+ ''' File to load and deserialize
+ ''' Output LocationOfGoodsType05 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As LocationOfGoodsType05, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, LocationOfGoodsType05)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As LocationOfGoodsType05) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As LocationOfGoodsType05
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class CustomsOfficeType02
+
+#Region "Private fields"
+ Private _referenceNumber As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property referenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(CustomsOfficeType02))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize CustomsOfficeType02 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes CustomsOfficeType02 object
+ '''
+ ''' string to deserialize
+ ''' Output CustomsOfficeType02 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CustomsOfficeType02, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, CustomsOfficeType02)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CustomsOfficeType02) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As CustomsOfficeType02
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CustomsOfficeType02)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As CustomsOfficeType02
+ Return CType(SerializerXml.Deserialize(s), CustomsOfficeType02)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current CustomsOfficeType02 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an CustomsOfficeType02 object
+ '''
+ ''' File to load and deserialize
+ ''' Output CustomsOfficeType02 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CustomsOfficeType02, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, CustomsOfficeType02)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CustomsOfficeType02) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As CustomsOfficeType02
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class GNSSType
+
+#Region "Private fields"
+ Private _latitude As String
+
+ Private _longitude As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property latitude() As String
+ Get
+ Return Me._latitude
+ End Get
+ Set
+ Me._latitude = Value
+ End Set
+ End Property
+
+
+ Public Property longitude() As String
+ Get
+ Return Me._longitude
+ End Get
+ Set
+ Me._longitude = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(GNSSType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize GNSSType object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes GNSSType object
+ '''
+ ''' string to deserialize
+ ''' Output GNSSType object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GNSSType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, GNSSType)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GNSSType) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As GNSSType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), GNSSType)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As GNSSType
+ Return CType(SerializerXml.Deserialize(s), GNSSType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current GNSSType object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an GNSSType object
+ '''
+ ''' File to load and deserialize
+ ''' Output GNSSType object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GNSSType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, GNSSType)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GNSSType) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As GNSSType
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class EconomicOperatorType03
+
+#Region "Private fields"
+ Private _identificationNumber As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property identificationNumber() As String
+ Get
+ Return Me._identificationNumber
+ End Get
+ Set
+ Me._identificationNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(EconomicOperatorType03))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize EconomicOperatorType03 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes EconomicOperatorType03 object
+ '''
+ ''' string to deserialize
+ ''' Output EconomicOperatorType03 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EconomicOperatorType03, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, EconomicOperatorType03)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EconomicOperatorType03) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As EconomicOperatorType03
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), EconomicOperatorType03)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As EconomicOperatorType03
+ Return CType(SerializerXml.Deserialize(s), EconomicOperatorType03)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current EconomicOperatorType03 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an EconomicOperatorType03 object
+ '''
+ ''' File to load and deserialize
+ ''' Output EconomicOperatorType03 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EconomicOperatorType03, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, EconomicOperatorType03)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EconomicOperatorType03) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As EconomicOperatorType03
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class AddressType14
+
+#Region "Private fields"
+ Private _streetAndNumber As String
+
+ Private _postcode As String
+
+ Private _city As String
+
+ Private _country As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property streetAndNumber() As String
+ Get
+ Return Me._streetAndNumber
+ End Get
+ Set
+ Me._streetAndNumber = Value
+ End Set
+ End Property
+
+
+ Public Property postcode() As String
+ Get
+ Return Me._postcode
+ End Get
+ Set
+ Me._postcode = Value
+ End Set
+ End Property
+
+
+ Public Property city() As String
+ Get
+ Return Me._city
+ End Get
+ Set
+ Me._city = Value
+ End Set
+ End Property
+
+
+ Public Property country() As String
+ Get
+ Return Me._country
+ End Get
+ Set
+ Me._country = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AddressType14))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize AddressType14 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes AddressType14 object
+ '''
+ ''' string to deserialize
+ ''' Output AddressType14 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AddressType14, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, AddressType14)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AddressType14) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As AddressType14
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AddressType14)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As AddressType14
+ Return CType(SerializerXml.Deserialize(s), AddressType14)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current AddressType14 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an AddressType14 object
+ '''
+ ''' File to load and deserialize
+ ''' Output AddressType14 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AddressType14, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, AddressType14)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AddressType14) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AddressType14
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class PostcodeAddressType02
+
+#Region "Private fields"
+ Private _houseNumber As String
+
+ Private _postcode As String
+
+ Private _country As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property houseNumber() As String
+ Get
+ Return Me._houseNumber
+ End Get
+ Set
+ Me._houseNumber = Value
+ End Set
+ End Property
+
+
+ Public Property postcode() As String
+ Get
+ Return Me._postcode
+ End Get
+ Set
+ Me._postcode = Value
+ End Set
+ End Property
+
+
+ Public Property country() As String
+ Get
+ Return Me._country
+ End Get
+ Set
+ Me._country = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PostcodeAddressType02))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize PostcodeAddressType02 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes PostcodeAddressType02 object
+ '''
+ ''' string to deserialize
+ ''' Output PostcodeAddressType02 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PostcodeAddressType02, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, PostcodeAddressType02)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PostcodeAddressType02) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As PostcodeAddressType02
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PostcodeAddressType02)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As PostcodeAddressType02
+ Return CType(SerializerXml.Deserialize(s), PostcodeAddressType02)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current PostcodeAddressType02 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an PostcodeAddressType02 object
+ '''
+ ''' File to load and deserialize
+ ''' Output PostcodeAddressType02 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PostcodeAddressType02, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, PostcodeAddressType02)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PostcodeAddressType02) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PostcodeAddressType02
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class ContactPersonType06
+
+#Region "Private fields"
+ Private _name As String
+
+ Private _phoneNumber As String
+
+ Private _eMailAddress As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property name() As String
+ Get
+ Return Me._name
+ End Get
+ Set
+ Me._name = Value
+ End Set
+ End Property
+
+
+ Public Property phoneNumber() As String
+ Get
+ Return Me._phoneNumber
+ End Get
+ Set
+ Me._phoneNumber = Value
+ End Set
+ End Property
+
+
+ Public Property eMailAddress() As String
+ Get
+ Return Me._eMailAddress
+ End Get
+ Set
+ Me._eMailAddress = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ContactPersonType06))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize ContactPersonType06 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes ContactPersonType06 object
+ '''
+ ''' string to deserialize
+ ''' Output ContactPersonType06 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ContactPersonType06, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, ContactPersonType06)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ContactPersonType06) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As ContactPersonType06
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ContactPersonType06)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As ContactPersonType06
+ Return CType(SerializerXml.Deserialize(s), ContactPersonType06)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current ContactPersonType06 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an ContactPersonType06 object
+ '''
+ ''' File to load and deserialize
+ ''' Output ContactPersonType06 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ContactPersonType06, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, ContactPersonType06)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ContactPersonType06) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ContactPersonType06
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DepartureTransportMeansType03
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _typeOfIdentification As String
+
+ Private _identificationNumber As String
+
+ Private _nationality As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property typeOfIdentification() As String
+ Get
+ Return Me._typeOfIdentification
+ End Get
+ Set
+ Me._typeOfIdentification = Value
+ End Set
+ End Property
+
+
+ Public Property identificationNumber() As String
+ Get
+ Return Me._identificationNumber
+ End Get
+ Set
+ Me._identificationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property nationality() As String
+ Get
+ Return Me._nationality
+ End Get
+ Set
+ Me._nationality = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DepartureTransportMeansType03))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DepartureTransportMeansType03 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes DepartureTransportMeansType03 object
+ '''
+ ''' string to deserialize
+ ''' Output DepartureTransportMeansType03 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DepartureTransportMeansType03, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DepartureTransportMeansType03)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DepartureTransportMeansType03) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DepartureTransportMeansType03
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DepartureTransportMeansType03)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DepartureTransportMeansType03
+ Return CType(SerializerXml.Deserialize(s), DepartureTransportMeansType03)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DepartureTransportMeansType03 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DepartureTransportMeansType03 object
+ '''
+ ''' File to load and deserialize
+ ''' Output DepartureTransportMeansType03 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DepartureTransportMeansType03, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DepartureTransportMeansType03)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DepartureTransportMeansType03) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DepartureTransportMeansType03
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class CountryOfRoutingOfConsignmentType01
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _country As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property country() As String
+ Get
+ Return Me._country
+ End Get
+ Set
+ Me._country = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(CountryOfRoutingOfConsignmentType01))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize CountryOfRoutingOfConsignmentType01 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes CountryOfRoutingOfConsignmentType01 object
+ '''
+ ''' string to deserialize
+ ''' Output CountryOfRoutingOfConsignmentType01 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CountryOfRoutingOfConsignmentType01, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, CountryOfRoutingOfConsignmentType01)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CountryOfRoutingOfConsignmentType01) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As CountryOfRoutingOfConsignmentType01
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CountryOfRoutingOfConsignmentType01)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As CountryOfRoutingOfConsignmentType01
+ Return CType(SerializerXml.Deserialize(s), CountryOfRoutingOfConsignmentType01)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current CountryOfRoutingOfConsignmentType01 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an CountryOfRoutingOfConsignmentType01 object
+ '''
+ ''' File to load and deserialize
+ ''' Output CountryOfRoutingOfConsignmentType01 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CountryOfRoutingOfConsignmentType01, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, CountryOfRoutingOfConsignmentType01)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CountryOfRoutingOfConsignmentType01) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As CountryOfRoutingOfConsignmentType01
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class ActiveBorderTransportMeansType02
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _customsOfficeAtBorderReferenceNumber As String
+
+ Private _typeOfIdentification As String
+
+ Private _identificationNumber As String
+
+ Private _nationality As String
+
+ Private _conveyanceReferenceNumber As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property customsOfficeAtBorderReferenceNumber() As String
+ Get
+ Return Me._customsOfficeAtBorderReferenceNumber
+ End Get
+ Set
+ Me._customsOfficeAtBorderReferenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property typeOfIdentification() As String
+ Get
+ Return Me._typeOfIdentification
+ End Get
+ Set
+ Me._typeOfIdentification = Value
+ End Set
+ End Property
+
+
+ Public Property identificationNumber() As String
+ Get
+ Return Me._identificationNumber
+ End Get
+ Set
+ Me._identificationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property nationality() As String
+ Get
+ Return Me._nationality
+ End Get
+ Set
+ Me._nationality = Value
+ End Set
+ End Property
+
+
+ Public Property conveyanceReferenceNumber() As String
+ Get
+ Return Me._conveyanceReferenceNumber
+ End Get
+ Set
+ Me._conveyanceReferenceNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ActiveBorderTransportMeansType02))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize ActiveBorderTransportMeansType02 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes ActiveBorderTransportMeansType02 object
+ '''
+ ''' string to deserialize
+ ''' Output ActiveBorderTransportMeansType02 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ActiveBorderTransportMeansType02, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, ActiveBorderTransportMeansType02)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ActiveBorderTransportMeansType02) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As ActiveBorderTransportMeansType02
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ActiveBorderTransportMeansType02)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As ActiveBorderTransportMeansType02
+ Return CType(SerializerXml.Deserialize(s), ActiveBorderTransportMeansType02)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current ActiveBorderTransportMeansType02 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an ActiveBorderTransportMeansType02 object
+ '''
+ ''' File to load and deserialize
+ ''' Output ActiveBorderTransportMeansType02 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ActiveBorderTransportMeansType02, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, ActiveBorderTransportMeansType02)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ActiveBorderTransportMeansType02) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ActiveBorderTransportMeansType02
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class PlaceOfLoadingType03
+
+#Region "Private fields"
+ Private _uNLocode As String
+
+ Private _country As String
+
+ Private _location As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property UNLocode() As String
+ Get
+ Return Me._uNLocode
+ End Get
+ Set
+ Me._uNLocode = Value
+ End Set
+ End Property
+
+
+ Public Property country() As String
+ Get
+ Return Me._country
+ End Get
+ Set
+ Me._country = Value
+ End Set
+ End Property
+
+
+ Public Property location() As String
+ Get
+ Return Me._location
+ End Get
+ Set
+ Me._location = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PlaceOfLoadingType03))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize PlaceOfLoadingType03 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes PlaceOfLoadingType03 object
+ '''
+ ''' string to deserialize
+ ''' Output PlaceOfLoadingType03 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PlaceOfLoadingType03, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, PlaceOfLoadingType03)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PlaceOfLoadingType03) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As PlaceOfLoadingType03
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PlaceOfLoadingType03)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As PlaceOfLoadingType03
+ Return CType(SerializerXml.Deserialize(s), PlaceOfLoadingType03)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current PlaceOfLoadingType03 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an PlaceOfLoadingType03 object
+ '''
+ ''' File to load and deserialize
+ ''' Output PlaceOfLoadingType03 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PlaceOfLoadingType03, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, PlaceOfLoadingType03)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PlaceOfLoadingType03) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PlaceOfLoadingType03
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class PlaceOfUnloadingType01
+
+#Region "Private fields"
+ Private _uNLocode As String
+
+ Private _country As String
+
+ Private _location As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property UNLocode() As String
+ Get
+ Return Me._uNLocode
+ End Get
+ Set
+ Me._uNLocode = Value
+ End Set
+ End Property
+
+
+ Public Property country() As String
+ Get
+ Return Me._country
+ End Get
+ Set
+ Me._country = Value
+ End Set
+ End Property
+
+
+ Public Property location() As String
+ Get
+ Return Me._location
+ End Get
+ Set
+ Me._location = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PlaceOfUnloadingType01))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize PlaceOfUnloadingType01 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes PlaceOfUnloadingType01 object
+ '''
+ ''' string to deserialize
+ ''' Output PlaceOfUnloadingType01 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PlaceOfUnloadingType01, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, PlaceOfUnloadingType01)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PlaceOfUnloadingType01) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As PlaceOfUnloadingType01
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PlaceOfUnloadingType01)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As PlaceOfUnloadingType01
+ Return CType(SerializerXml.Deserialize(s), PlaceOfUnloadingType01)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current PlaceOfUnloadingType01 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an PlaceOfUnloadingType01 object
+ '''
+ ''' File to load and deserialize
+ ''' Output PlaceOfUnloadingType01 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PlaceOfUnloadingType01, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, PlaceOfUnloadingType01)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PlaceOfUnloadingType01) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PlaceOfUnloadingType01
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class PreviousDocumentType09
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _type As String
+
+ Private _referenceNumber As String
+
+ Private _complementOfInformation As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property type() As String
+ Get
+ Return Me._type
+ End Get
+ Set
+ Me._type = Value
+ End Set
+ End Property
+
+
+ Public Property referenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property complementOfInformation() As String
+ Get
+ Return Me._complementOfInformation
+ End Get
+ Set
+ Me._complementOfInformation = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PreviousDocumentType09))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize PreviousDocumentType09 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes PreviousDocumentType09 object
+ '''
+ ''' string to deserialize
+ ''' Output PreviousDocumentType09 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PreviousDocumentType09, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, PreviousDocumentType09)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PreviousDocumentType09) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As PreviousDocumentType09
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PreviousDocumentType09)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As PreviousDocumentType09
+ Return CType(SerializerXml.Deserialize(s), PreviousDocumentType09)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current PreviousDocumentType09 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an PreviousDocumentType09 object
+ '''
+ ''' File to load and deserialize
+ ''' Output PreviousDocumentType09 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PreviousDocumentType09, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, PreviousDocumentType09)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PreviousDocumentType09) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PreviousDocumentType09
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class SupportingDocumentType05
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _type As String
+
+ Private _referenceNumber As String
+
+ Private _documentLineItemNumber As String
+
+ Private _complementOfInformation As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property type() As String
+ Get
+ Return Me._type
+ End Get
+ Set
+ Me._type = Value
+ End Set
+ End Property
+
+
+ Public Property referenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property documentLineItemNumber() As String
+ Get
+ Return Me._documentLineItemNumber
+ End Get
+ Set
+ Me._documentLineItemNumber = Value
+ End Set
+ End Property
+
+
+ Public Property complementOfInformation() As String
+ Get
+ Return Me._complementOfInformation
+ End Get
+ Set
+ Me._complementOfInformation = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(SupportingDocumentType05))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize SupportingDocumentType05 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes SupportingDocumentType05 object
+ '''
+ ''' string to deserialize
+ ''' Output SupportingDocumentType05 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SupportingDocumentType05, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, SupportingDocumentType05)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SupportingDocumentType05) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As SupportingDocumentType05
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), SupportingDocumentType05)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As SupportingDocumentType05
+ Return CType(SerializerXml.Deserialize(s), SupportingDocumentType05)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current SupportingDocumentType05 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an SupportingDocumentType05 object
+ '''
+ ''' File to load and deserialize
+ ''' Output SupportingDocumentType05 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SupportingDocumentType05, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, SupportingDocumentType05)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SupportingDocumentType05) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As SupportingDocumentType05
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class TransportDocumentType04
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _type As String
+
+ Private _referenceNumber As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property type() As String
+ Get
+ Return Me._type
+ End Get
+ Set
+ Me._type = Value
+ End Set
+ End Property
+
+
+ Public Property referenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransportDocumentType04))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize TransportDocumentType04 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes TransportDocumentType04 object
+ '''
+ ''' string to deserialize
+ ''' Output TransportDocumentType04 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransportDocumentType04, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, TransportDocumentType04)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransportDocumentType04) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As TransportDocumentType04
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransportDocumentType04)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransportDocumentType04
+ Return CType(SerializerXml.Deserialize(s), TransportDocumentType04)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current TransportDocumentType04 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an TransportDocumentType04 object
+ '''
+ ''' File to load and deserialize
+ ''' Output TransportDocumentType04 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransportDocumentType04, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, TransportDocumentType04)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransportDocumentType04) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransportDocumentType04
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class AdditionalReferenceType05
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _type As String
+
+ Private _referenceNumber As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property type() As String
+ Get
+ Return Me._type
+ End Get
+ Set
+ Me._type = Value
+ End Set
+ End Property
+
+
+ Public Property referenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdditionalReferenceType05))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize AdditionalReferenceType05 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes AdditionalReferenceType05 object
+ '''
+ ''' string to deserialize
+ ''' Output AdditionalReferenceType05 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalReferenceType05, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, AdditionalReferenceType05)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalReferenceType05) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As AdditionalReferenceType05
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalReferenceType05)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdditionalReferenceType05
+ Return CType(SerializerXml.Deserialize(s), AdditionalReferenceType05)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current AdditionalReferenceType05 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an AdditionalReferenceType05 object
+ '''
+ ''' File to load and deserialize
+ ''' Output AdditionalReferenceType05 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalReferenceType05, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, AdditionalReferenceType05)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalReferenceType05) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdditionalReferenceType05
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class AdditionalInformationType03
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _code As String
+
+ Private _text As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property code() As String
+ Get
+ Return Me._code
+ End Get
+ Set
+ Me._code = Value
+ End Set
+ End Property
+
+
+ Public Property text() As String
+ Get
+ Return Me._text
+ End Get
+ Set
+ Me._text = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdditionalInformationType03))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize AdditionalInformationType03 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes AdditionalInformationType03 object
+ '''
+ ''' string to deserialize
+ ''' Output AdditionalInformationType03 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalInformationType03, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, AdditionalInformationType03)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalInformationType03) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As AdditionalInformationType03
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalInformationType03)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdditionalInformationType03
+ Return CType(SerializerXml.Deserialize(s), AdditionalInformationType03)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current AdditionalInformationType03 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an AdditionalInformationType03 object
+ '''
+ ''' File to load and deserialize
+ ''' Output AdditionalInformationType03 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalInformationType03, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, AdditionalInformationType03)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalInformationType03) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdditionalInformationType03
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class TransportChargesType
+
+#Region "Private fields"
+ Private _methodOfPayment As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property methodOfPayment() As String
+ Get
+ Return Me._methodOfPayment
+ End Get
+ Set
+ Me._methodOfPayment = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransportChargesType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize TransportChargesType object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes TransportChargesType object
+ '''
+ ''' string to deserialize
+ ''' Output TransportChargesType object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransportChargesType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, TransportChargesType)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransportChargesType) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As TransportChargesType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransportChargesType)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransportChargesType
+ Return CType(SerializerXml.Deserialize(s), TransportChargesType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current TransportChargesType object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an TransportChargesType object
+ '''
+ ''' File to load and deserialize
+ ''' Output TransportChargesType object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransportChargesType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, TransportChargesType)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransportChargesType) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransportChargesType
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class HouseConsignmentType10
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _countryOfDispatch As String
+
+ Private _countryOfDestination As String
+
+ Private _grossMass As Decimal
+
+ Private _referenceNumberUCR As String
+
+ Private _consignor As ConsignorType07
+
+ Private _consignee As ConsigneeType05
+
+ Private _additionalSupplyChainActor As List(Of AdditionalSupplyChainActorType)
+
+ Private _departureTransportMeans As List(Of DepartureTransportMeansType05)
+
+ Private _previousDocument As List(Of PreviousDocumentType10)
+
+ Private _supportingDocument As List(Of SupportingDocumentType05)
+
+ Private _transportDocument As List(Of TransportDocumentType04)
+
+ Private _additionalReference As List(Of AdditionalReferenceType05)
+
+ Private _additionalInformation As List(Of AdditionalInformationType03)
+
+ Private _transportCharges As TransportChargesType
+
+ Private _consignmentItem As List(Of ConsignmentItemType09)
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._consignmentItem = New List(Of ConsignmentItemType09)()
+ Me._transportCharges = New TransportChargesType()
+ Me._additionalInformation = New List(Of AdditionalInformationType03)()
+ Me._additionalReference = New List(Of AdditionalReferenceType05)()
+ Me._transportDocument = New List(Of TransportDocumentType04)()
+ Me._supportingDocument = New List(Of SupportingDocumentType05)()
+ Me._previousDocument = New List(Of PreviousDocumentType10)()
+ Me._departureTransportMeans = New List(Of DepartureTransportMeansType05)()
+ Me._additionalSupplyChainActor = New List(Of AdditionalSupplyChainActorType)()
+ Me._consignee = New ConsigneeType05()
+ Me._consignor = New ConsignorType07()
+ End Sub
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property countryOfDispatch() As String
+ Get
+ Return Me._countryOfDispatch
+ End Get
+ Set
+ Me._countryOfDispatch = Value
+ End Set
+ End Property
+
+
+ Public Property countryOfDestination() As String
+ Get
+ Return Me._countryOfDestination
+ End Get
+ Set
+ Me._countryOfDestination = Value
+ End Set
+ End Property
+
+
+ Public Property grossMass() As Decimal
+ Get
+ Return Me._grossMass
+ End Get
+ Set
+ Me._grossMass = Value
+ End Set
+ End Property
+
+
+ Public Property referenceNumberUCR() As String
+ Get
+ Return Me._referenceNumberUCR
+ End Get
+ Set
+ Me._referenceNumberUCR = Value
+ End Set
+ End Property
+
+
+ Public Property Consignor() As ConsignorType07
+ Get
+ Return Me._consignor
+ End Get
+ Set
+ Me._consignor = Value
+ End Set
+ End Property
+
+
+ Public Property Consignee() As ConsigneeType05
+ Get
+ Return Me._consignee
+ End Get
+ Set
+ Me._consignee = Value
+ End Set
+ End Property
+
+
+ Public Property AdditionalSupplyChainActor() As List(Of AdditionalSupplyChainActorType)
+ Get
+ Return Me._additionalSupplyChainActor
+ End Get
+ Set
+ Me._additionalSupplyChainActor = Value
+ End Set
+ End Property
+
+
+ Public Property DepartureTransportMeans() As List(Of DepartureTransportMeansType05)
+ Get
+ Return Me._departureTransportMeans
+ End Get
+ Set
+ Me._departureTransportMeans = Value
+ End Set
+ End Property
+
+
+ Public Property PreviousDocument() As List(Of PreviousDocumentType10)
+ Get
+ Return Me._previousDocument
+ End Get
+ Set
+ Me._previousDocument = Value
+ End Set
+ End Property
+
+
+ Public Property SupportingDocument() As List(Of SupportingDocumentType05)
+ Get
+ Return Me._supportingDocument
+ End Get
+ Set
+ Me._supportingDocument = Value
+ End Set
+ End Property
+
+
+ Public Property TransportDocument() As List(Of TransportDocumentType04)
+ Get
+ Return Me._transportDocument
+ End Get
+ Set
+ Me._transportDocument = Value
+ End Set
+ End Property
+
+
+ Public Property AdditionalReference() As List(Of AdditionalReferenceType05)
+ Get
+ Return Me._additionalReference
+ End Get
+ Set
+ Me._additionalReference = Value
+ End Set
+ End Property
+
+
+ Public Property AdditionalInformation() As List(Of AdditionalInformationType03)
+ Get
+ Return Me._additionalInformation
+ End Get
+ Set
+ Me._additionalInformation = Value
+ End Set
+ End Property
+
+
+ Public Property TransportCharges() As TransportChargesType
+ Get
+ Return Me._transportCharges
+ End Get
+ Set
+ Me._transportCharges = Value
+ End Set
+ End Property
+
+
+ Public Property ConsignmentItem() As List(Of ConsignmentItemType09)
+ Get
+ Return Me._consignmentItem
+ End Get
+ Set
+ Me._consignmentItem = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(HouseConsignmentType10))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize HouseConsignmentType10 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes HouseConsignmentType10 object
+ '''
+ ''' string to deserialize
+ ''' Output HouseConsignmentType10 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As HouseConsignmentType10, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, HouseConsignmentType10)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As HouseConsignmentType10) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As HouseConsignmentType10
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), HouseConsignmentType10)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As HouseConsignmentType10
+ Return CType(SerializerXml.Deserialize(s), HouseConsignmentType10)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current HouseConsignmentType10 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an HouseConsignmentType10 object
+ '''
+ ''' File to load and deserialize
+ ''' Output HouseConsignmentType10 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HouseConsignmentType10, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, HouseConsignmentType10)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HouseConsignmentType10) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As HouseConsignmentType10
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DepartureTransportMeansType05
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _typeOfIdentification As String
+
+ Private _identificationNumber As String
+
+ Private _nationality As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property typeOfIdentification() As String
+ Get
+ Return Me._typeOfIdentification
+ End Get
+ Set
+ Me._typeOfIdentification = Value
+ End Set
+ End Property
+
+
+ Public Property identificationNumber() As String
+ Get
+ Return Me._identificationNumber
+ End Get
+ Set
+ Me._identificationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property nationality() As String
+ Get
+ Return Me._nationality
+ End Get
+ Set
+ Me._nationality = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DepartureTransportMeansType05))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DepartureTransportMeansType05 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes DepartureTransportMeansType05 object
+ '''
+ ''' string to deserialize
+ ''' Output DepartureTransportMeansType05 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DepartureTransportMeansType05, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DepartureTransportMeansType05)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DepartureTransportMeansType05) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DepartureTransportMeansType05
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DepartureTransportMeansType05)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DepartureTransportMeansType05
+ Return CType(SerializerXml.Deserialize(s), DepartureTransportMeansType05)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DepartureTransportMeansType05 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DepartureTransportMeansType05 object
+ '''
+ ''' File to load and deserialize
+ ''' Output DepartureTransportMeansType05 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DepartureTransportMeansType05, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DepartureTransportMeansType05)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DepartureTransportMeansType05) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DepartureTransportMeansType05
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class PreviousDocumentType10
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _type As String
+
+ Private _referenceNumber As String
+
+ Private _complementOfInformation As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property type() As String
+ Get
+ Return Me._type
+ End Get
+ Set
+ Me._type = Value
+ End Set
+ End Property
+
+
+ Public Property referenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property complementOfInformation() As String
+ Get
+ Return Me._complementOfInformation
+ End Get
+ Set
+ Me._complementOfInformation = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PreviousDocumentType10))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize PreviousDocumentType10 object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ Dim streamReader As StreamReader = Nothing
+ Dim memoryStream As MemoryStream = Nothing
+ Try
+ memoryStream = New MemoryStream()
+ Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
+ Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
+ SerializerXml.Serialize(xmlWriter, Me)
+ memoryStream.Seek(0, SeekOrigin.Begin)
+ streamReader = New StreamReader(memoryStream)
+ Return streamReader.ReadToEnd
+ Finally
+ If (Not (streamReader) Is Nothing) Then
+ streamReader.Dispose()
+ End If
+ If (Not (memoryStream) Is Nothing) Then
+ memoryStream.Dispose()
+ End If
+ End Try
+ End Function
+
+ '''
+ ''' Deserializes PreviousDocumentType10 object
+ '''
+ ''' string to deserialize
+ ''' Output PreviousDocumentType10 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PreviousDocumentType10, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, PreviousDocumentType10)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PreviousDocumentType10) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As PreviousDocumentType10
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PreviousDocumentType10)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As PreviousDocumentType10
+ Return CType(SerializerXml.Deserialize(s), PreviousDocumentType10)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current PreviousDocumentType10 object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an PreviousDocumentType10 object
+ '''
+ ''' File to load and deserialize
+ ''' Output PreviousDocumentType10 object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PreviousDocumentType10, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, PreviousDocumentType10)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PreviousDocumentType10) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PreviousDocumentType10
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class ConsignmentItemType09
+
+#Region "Private fields"
+ Private _goodsItemNumber As String
+
+ Private _declarationGoodsItemNumber As String
+
+ Private _declarationType As String
+
+ Private _countryOfDispatch As String
+
+ Private _countryOfDestination As String
+
+ Private _referenceNumberUCR As String
+
+ Private _consignee As ConsigneeType02
+
+ Private _additionalSupplyChainActor As List(Of AdditionalSupplyChainActorType)
+
+ Private _commodity As CommodityType07
+
+ Private _packaging As List(Of PackagingType03)
+
+ Private _previousDocument As List(Of PreviousDocumentType08)
+
+ Private _supportingDocument As List(Of SupportingDocumentType05)
+
+ Private _transportDocument As List(Of TransportDocumentType04)
+
+ Private _additionalReference As List(Of AdditionalReferenceType04)
+
+ Private _additionalInformation As List(Of AdditionalInformationType03)
+
+ Private _transportCharges As TransportChargesType
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._transportCharges = New TransportChargesType()
+ Me._additionalInformation = New List(Of AdditionalInformationType03)()
+ Me._additionalReference = New List(Of AdditionalReferenceType04)()
+ Me._transportDocument = New List(Of TransportDocumentType04)()
+ Me._supportingDocument = New List(Of SupportingDocumentType05)()
+ Me._previousDocument = New List(Of PreviousDocumentType08)()
+ Me._packaging = New List(Of PackagingType03)()
+ Me._commodity = New CommodityType07()
+ Me._additionalSupplyChainActor = New List(Of AdditionalSupplyChainActorType)()
+ Me._consignee = New ConsigneeType02()
+ End Sub
+
+
+ Public Property goodsItemNumber() As String
+ Get
+ Return Me._goodsItemNumber
+ End Get
+ Set
+ Me._goodsItemNumber = Value
+ End Set
+ End Property
+
+
+ Public Property declarationGoodsItemNumber() As String
+ Get
+ Return Me._declarationGoodsItemNumber
+ End Get
+ Set
+ Me._declarationGoodsItemNumber = Value
+ End Set
+ End Property
+
+