diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/EZA/FreierVerkehr/FreierVerkehrAktVeredelUmwandlung_004_V2022.designer.vb b/DAKOSY_Worker/DAKOSY/ATLAS/EZA/FreierVerkehr/FreierVerkehrAktVeredelUmwandlung_004_V2022.designer.vb
index 320be0f..e880d86 100644
--- a/DAKOSY_Worker/DAKOSY/ATLAS/EZA/FreierVerkehr/FreierVerkehrAktVeredelUmwandlung_004_V2022.designer.vb
+++ b/DAKOSY_Worker/DAKOSY/ATLAS/EZA/FreierVerkehr/FreierVerkehrAktVeredelUmwandlung_004_V2022.designer.vb
@@ -1,7 +1,7 @@
'' ------------------------------------------------------------------------------
''
'' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com
-'' {"TargetFramework":"Net20","NameSpace":"FreierVerkehrAktVeredelUmwandlung_004","Language":"VisualBasic","CollectionBase":"","Properties":{"VirtualProperties":true,"PrivateFieldCustomPrefix":""},"XmlAttribute":{"Enabled":true,"GenerateOrderXmlAttributes":true},"ClassParams":{"GenerateInSeparateFilesDirectory":""},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{"IndentChars":"Indent1Space"},"JsonOutput":{},"Enabled":true,"EnableEncoding":true},"Miscellaneous":{"CleanupCode":false}}
+'' {"TargetFramework":"Net20","NameSpace":"FreierVerkehrAktVeredelUmwandlung_004","Language":"VisualBasic","CollectionBase":"","Properties":{"VirtualProperties":true,"PrivateFieldCustomPrefix":""},"XmlAttribute":{"Enabled":true,"GenerateOrderXmlAttributes":true},"ClassParams":{"GenerateInSeparateFilesDirectory":""},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{"Formating":true,"IndentChars":"Indent1Space","NewLineOnAttributes":true},"JsonOutput":{},"Enabled":true,"EnableEncoding":true},"Miscellaneous":{"CleanupCode":false}}
''
'' ------------------------------------------------------------------------------
#Disable Warning
@@ -69,6 +69,9 @@ Namespace FreierVerkehrAktVeredelUmwandlung_004
memoryStream = New System.IO.MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Encoding = encoding
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ xmlWriterSettings.NewLineOnAttributes = True
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
@@ -295,6 +298,9 @@ Namespace FreierVerkehrAktVeredelUmwandlung_004
memoryStream = New System.IO.MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Encoding = encoding
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ xmlWriterSettings.NewLineOnAttributes = True
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
@@ -639,6 +645,9 @@ Namespace FreierVerkehrAktVeredelUmwandlung_004
memoryStream = New System.IO.MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Encoding = encoding
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ xmlWriterSettings.NewLineOnAttributes = True
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
@@ -942,6 +951,9 @@ Namespace FreierVerkehrAktVeredelUmwandlung_004
memoryStream = New System.IO.MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Encoding = encoding
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ xmlWriterSettings.NewLineOnAttributes = True
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
@@ -1257,6 +1269,9 @@ Namespace FreierVerkehrAktVeredelUmwandlung_004
memoryStream = New System.IO.MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Encoding = encoding
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ xmlWriterSettings.NewLineOnAttributes = True
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
@@ -1464,6 +1479,9 @@ Namespace FreierVerkehrAktVeredelUmwandlung_004
memoryStream = New System.IO.MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Encoding = encoding
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ xmlWriterSettings.NewLineOnAttributes = True
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
@@ -1743,6 +1761,9 @@ Namespace FreierVerkehrAktVeredelUmwandlung_004
memoryStream = New System.IO.MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Encoding = encoding
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ xmlWriterSettings.NewLineOnAttributes = True
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
@@ -1962,6 +1983,9 @@ Namespace FreierVerkehrAktVeredelUmwandlung_004
memoryStream = New System.IO.MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Encoding = encoding
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ xmlWriterSettings.NewLineOnAttributes = True
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
@@ -2169,6 +2193,9 @@ Namespace FreierVerkehrAktVeredelUmwandlung_004
memoryStream = New System.IO.MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Encoding = encoding
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ xmlWriterSettings.NewLineOnAttributes = True
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
@@ -2424,6 +2451,9 @@ Namespace FreierVerkehrAktVeredelUmwandlung_004
memoryStream = New System.IO.MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Encoding = encoding
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ xmlWriterSettings.NewLineOnAttributes = True
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
@@ -2643,6 +2673,9 @@ Namespace FreierVerkehrAktVeredelUmwandlung_004
memoryStream = New System.IO.MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Encoding = encoding
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ xmlWriterSettings.NewLineOnAttributes = True
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
@@ -2850,6 +2883,9 @@ Namespace FreierVerkehrAktVeredelUmwandlung_004
memoryStream = New System.IO.MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Encoding = encoding
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ xmlWriterSettings.NewLineOnAttributes = True
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
@@ -3081,6 +3117,9 @@ Namespace FreierVerkehrAktVeredelUmwandlung_004
memoryStream = New System.IO.MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Encoding = encoding
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ xmlWriterSettings.NewLineOnAttributes = True
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
@@ -3300,6 +3339,9 @@ Namespace FreierVerkehrAktVeredelUmwandlung_004
memoryStream = New System.IO.MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Encoding = encoding
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ xmlWriterSettings.NewLineOnAttributes = True
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
@@ -4425,6 +4467,9 @@ Namespace FreierVerkehrAktVeredelUmwandlung_004
memoryStream = New System.IO.MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Encoding = encoding
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ xmlWriterSettings.NewLineOnAttributes = True
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
@@ -4812,6 +4857,9 @@ Namespace FreierVerkehrAktVeredelUmwandlung_004
memoryStream = New System.IO.MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Encoding = encoding
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ xmlWriterSettings.NewLineOnAttributes = True
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
@@ -5091,6 +5139,9 @@ Namespace FreierVerkehrAktVeredelUmwandlung_004
memoryStream = New System.IO.MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Encoding = encoding
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ xmlWriterSettings.NewLineOnAttributes = True
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
@@ -5334,6 +5385,9 @@ Namespace FreierVerkehrAktVeredelUmwandlung_004
memoryStream = New System.IO.MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Encoding = encoding
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ xmlWriterSettings.NewLineOnAttributes = True
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
@@ -5721,6 +5775,9 @@ Namespace FreierVerkehrAktVeredelUmwandlung_004
memoryStream = New System.IO.MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Encoding = encoding
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ xmlWriterSettings.NewLineOnAttributes = True
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
@@ -6000,6 +6057,9 @@ Namespace FreierVerkehrAktVeredelUmwandlung_004
memoryStream = New System.IO.MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Encoding = encoding
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ xmlWriterSettings.NewLineOnAttributes = True
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
@@ -6279,6 +6339,9 @@ Namespace FreierVerkehrAktVeredelUmwandlung_004
memoryStream = New System.IO.MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Encoding = encoding
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ xmlWriterSettings.NewLineOnAttributes = True
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
@@ -6510,6 +6573,9 @@ Namespace FreierVerkehrAktVeredelUmwandlung_004
memoryStream = New System.IO.MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Encoding = encoding
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ xmlWriterSettings.NewLineOnAttributes = True
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
@@ -6897,6 +6963,9 @@ Namespace FreierVerkehrAktVeredelUmwandlung_004
memoryStream = New System.IO.MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Encoding = encoding
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ xmlWriterSettings.NewLineOnAttributes = True
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
@@ -7236,6 +7305,9 @@ Namespace FreierVerkehrAktVeredelUmwandlung_004
memoryStream = New System.IO.MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Encoding = encoding
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ xmlWriterSettings.NewLineOnAttributes = True
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
@@ -8190,6 +8262,9 @@ Namespace FreierVerkehrAktVeredelUmwandlung_004
memoryStream = New System.IO.MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Encoding = encoding
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ xmlWriterSettings.NewLineOnAttributes = True
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
@@ -8457,6 +8532,9 @@ Namespace FreierVerkehrAktVeredelUmwandlung_004
memoryStream = New System.IO.MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Encoding = encoding
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ xmlWriterSettings.NewLineOnAttributes = True
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
@@ -8658,6 +8736,9 @@ Namespace FreierVerkehrAktVeredelUmwandlung_004
memoryStream = New System.IO.MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
xmlWriterSettings.Encoding = encoding
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ xmlWriterSettings.NewLineOnAttributes = True
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/EZA/FreierVerkehr/xsd2code.config b/DAKOSY_Worker/DAKOSY/ATLAS/EZA/FreierVerkehr/xsd2code.config
new file mode 100644
index 0000000..2c32c30
--- /dev/null
+++ b/DAKOSY_Worker/DAKOSY/ATLAS/EZA/FreierVerkehr/xsd2code.config
@@ -0,0 +1,27 @@
+
+
+ Net20
+ FreierVerkehrAktVeredelUmwandlung_004
+ VisualBasic
+ xsd2code.exe <XSD File> FreierVerkehrAktVeredelUmwandlung_004 <Output file> /l VisualBasic /p Net20 /vprop /s /encutf8 /xml /xa /xao /in /Indent1Space /nla
+
+
+ true
+
+
+
+ true
+ true
+
+
+
+
+
+ true
+ AllClasses
+ true
+
+
+ false
+
+
diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/EZA/FreierVerkehrAktVeredelUmwandlung/FCFCDE.Designer.vb b/DAKOSY_Worker/DAKOSY/ATLAS/EZA/FreierVerkehrAktVeredelUmwandlung/FCFCDE.Designer.vb
new file mode 100644
index 0000000..80cfbfa
--- /dev/null
+++ b/DAKOSY_Worker/DAKOSY/ATLAS/EZA/FreierVerkehrAktVeredelUmwandlung/FCFCDE.Designer.vb
@@ -0,0 +1,20289 @@
+'' ------------------------------------------------------------------------------
+''
+'' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com
+'' {"TargetFramework":"Net47","NameSpace":"FCFCDE","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 FCFCDE
+
+
+ Partial Public Class FCFCDE
+
+#Region "Private fields"
+ Private _metaData As FCFCDEMetaData
+
+ Private _header As FCFCDEHeader
+
+ Private _declarant As FCFCDEDeclarant
+
+ Private _representative As FCFCDERepresentative
+
+ Private _principal As FCFCDEPrincipal
+
+ Private _contactPerson As FCFCDEContactPerson
+
+ Private _dutyDefermentApproval As List(Of FCFCDEDutyDefermentApproval)
+
+ Private _borderTransportMeans As FCFCDEBorderTransportMeans
+
+ Private _arrivalTransportMeans As FCFCDEArrivalTransportMeans
+
+ Private _previousAdministrativeReferences As FCFCDEPreviousAdministrativeReferences
+
+ Private _summaryDeclaration As FCFCDESummaryDeclaration
+
+ Private _customsWarehouse As FCFCDECustomsWarehouse
+
+ Private _inwardProcessing As FCFCDEInwardProcessing
+
+ Private _body As FCFCDEBody
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._body = New FCFCDEBody()
+ Me._inwardProcessing = New FCFCDEInwardProcessing()
+ Me._customsWarehouse = New FCFCDECustomsWarehouse()
+ Me._summaryDeclaration = New FCFCDESummaryDeclaration()
+ Me._previousAdministrativeReferences = New FCFCDEPreviousAdministrativeReferences()
+ Me._arrivalTransportMeans = New FCFCDEArrivalTransportMeans()
+ Me._borderTransportMeans = New FCFCDEBorderTransportMeans()
+ Me._dutyDefermentApproval = New List(Of FCFCDEDutyDefermentApproval)()
+ Me._contactPerson = New FCFCDEContactPerson()
+ Me._principal = New FCFCDEPrincipal()
+ Me._representative = New FCFCDERepresentative()
+ Me._declarant = New FCFCDEDeclarant()
+ Me._header = New FCFCDEHeader()
+ Me._metaData = New FCFCDEMetaData()
+ End Sub
+
+ Public Property MetaData() As FCFCDEMetaData
+ Get
+ Return Me._metaData
+ End Get
+ Set
+ Me._metaData = Value
+ End Set
+ End Property
+
+ Public Property Header() As FCFCDEHeader
+ Get
+ Return Me._header
+ End Get
+ Set
+ Me._header = Value
+ End Set
+ End Property
+
+ Public Property Declarant() As FCFCDEDeclarant
+ Get
+ Return Me._declarant
+ End Get
+ Set
+ Me._declarant = Value
+ End Set
+ End Property
+
+ Public Property Representative() As FCFCDERepresentative
+ Get
+ Return Me._representative
+ End Get
+ Set
+ Me._representative = Value
+ End Set
+ End Property
+
+ Public Property Principal() As FCFCDEPrincipal
+ Get
+ Return Me._principal
+ End Get
+ Set
+ Me._principal = Value
+ End Set
+ End Property
+
+ Public Property ContactPerson() As FCFCDEContactPerson
+ Get
+ Return Me._contactPerson
+ End Get
+ Set
+ Me._contactPerson = Value
+ End Set
+ End Property
+
+
+ Public Property DutyDefermentApproval() As List(Of FCFCDEDutyDefermentApproval)
+ Get
+ Return Me._dutyDefermentApproval
+ End Get
+ Set
+ Me._dutyDefermentApproval = Value
+ End Set
+ End Property
+
+ Public Property BorderTransportMeans() As FCFCDEBorderTransportMeans
+ Get
+ Return Me._borderTransportMeans
+ End Get
+ Set
+ Me._borderTransportMeans = Value
+ End Set
+ End Property
+
+ Public Property ArrivalTransportMeans() As FCFCDEArrivalTransportMeans
+ Get
+ Return Me._arrivalTransportMeans
+ End Get
+ Set
+ Me._arrivalTransportMeans = Value
+ End Set
+ End Property
+
+ Public Property PreviousAdministrativeReferences() As FCFCDEPreviousAdministrativeReferences
+ Get
+ Return Me._previousAdministrativeReferences
+ End Get
+ Set
+ Me._previousAdministrativeReferences = Value
+ End Set
+ End Property
+
+ Public Property SummaryDeclaration() As FCFCDESummaryDeclaration
+ Get
+ Return Me._summaryDeclaration
+ End Get
+ Set
+ Me._summaryDeclaration = Value
+ End Set
+ End Property
+
+ Public Property CustomsWarehouse() As FCFCDECustomsWarehouse
+ Get
+ Return Me._customsWarehouse
+ End Get
+ Set
+ Me._customsWarehouse = Value
+ End Set
+ End Property
+
+ Public Property InwardProcessing() As FCFCDEInwardProcessing
+ Get
+ Return Me._inwardProcessing
+ End Get
+ Set
+ Me._inwardProcessing = Value
+ End Set
+ End Property
+
+ Public Property Body() As FCFCDEBody
+ Get
+ Return Me._body
+ End Get
+ Set
+ Me._body = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDE))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDE 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 FCFCDE object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDE 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 FCFCDE, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDE)
+ 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 FCFCDE) 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 FCFCDE
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDE)
+ 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 FCFCDE
+ Return CType(SerializerXml.Deserialize(s), FCFCDE)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDE 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 FCFCDE object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDE 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 FCFCDE, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDE)
+ 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 FCFCDE) 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 FCFCDE
+ 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 FCFCDEMetaData
+
+#Region "Private fields"
+ Private _preparation As FCFCDEMetaDataPreparation
+
+ Private _interchangeControlReference As String
+
+ Private _messageReferenceNumber As String
+
+ Private _messageIdentifier As String
+
+ Private _messageGroup As FCFCDEMetaDataMessageGroup
+
+ Private _testIndicator As FCFCDEMetaDataTestIndicator
+
+ Private _messageType As FCFCDEMetaDataMessageType
+
+ Private _interchangeSender As FCFCDEMetaDataInterchangeSender
+
+ Private _interchangeRecipient As FCFCDEMetaDataInterchangeRecipient
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._interchangeRecipient = New FCFCDEMetaDataInterchangeRecipient()
+ Me._interchangeSender = New FCFCDEMetaDataInterchangeSender()
+ Me._preparation = New FCFCDEMetaDataPreparation()
+ End Sub
+
+ Public Property Preparation() As FCFCDEMetaDataPreparation
+ Get
+ Return Me._preparation
+ End Get
+ Set
+ Me._preparation = Value
+ End Set
+ End Property
+
+
+ Public Property InterchangeControlReference() As String
+ Get
+ Return Me._interchangeControlReference
+ End Get
+ Set
+ Me._interchangeControlReference = Value
+ End Set
+ End Property
+
+
+ Public Property MessageReferenceNumber() As String
+ Get
+ Return Me._messageReferenceNumber
+ End Get
+ Set
+ Me._messageReferenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property MessageIdentifier() As String
+ Get
+ Return Me._messageIdentifier
+ End Get
+ Set
+ Me._messageIdentifier = Value
+ End Set
+ End Property
+
+ Public Property MessageGroup() As FCFCDEMetaDataMessageGroup
+ Get
+ Return Me._messageGroup
+ End Get
+ Set
+ Me._messageGroup = Value
+ End Set
+ End Property
+
+ Public Property TestIndicator() As FCFCDEMetaDataTestIndicator
+ Get
+ Return Me._testIndicator
+ End Get
+ Set
+ Me._testIndicator = Value
+ End Set
+ End Property
+
+ Public Property MessageType() As FCFCDEMetaDataMessageType
+ Get
+ Return Me._messageType
+ End Get
+ Set
+ Me._messageType = Value
+ End Set
+ End Property
+
+ Public Property InterchangeSender() As FCFCDEMetaDataInterchangeSender
+ Get
+ Return Me._interchangeSender
+ End Get
+ Set
+ Me._interchangeSender = Value
+ End Set
+ End Property
+
+ Public Property InterchangeRecipient() As FCFCDEMetaDataInterchangeRecipient
+ Get
+ Return Me._interchangeRecipient
+ End Get
+ Set
+ Me._interchangeRecipient = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEMetaData))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEMetaData 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 FCFCDEMetaData object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEMetaData 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 FCFCDEMetaData, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEMetaData)
+ 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 FCFCDEMetaData) 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 FCFCDEMetaData
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEMetaData)
+ 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 FCFCDEMetaData
+ Return CType(SerializerXml.Deserialize(s), FCFCDEMetaData)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEMetaData 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 FCFCDEMetaData object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEMetaData 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 FCFCDEMetaData, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEMetaData)
+ 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 FCFCDEMetaData) 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 FCFCDEMetaData
+ 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 FCFCDEMetaDataPreparation
+
+#Region "Private fields"
+ Private _date As Date
+
+ Private _time As Date
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property [Date]() As Date
+ Get
+ Return Me._date
+ End Get
+ Set
+ Me._date = Value
+ End Set
+ End Property
+
+
+ Public Property Time() As Date
+ Get
+ Return Me._time
+ End Get
+ Set
+ Me._time = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEMetaDataPreparation))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEMetaDataPreparation 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 FCFCDEMetaDataPreparation object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEMetaDataPreparation 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 FCFCDEMetaDataPreparation, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEMetaDataPreparation)
+ 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 FCFCDEMetaDataPreparation) 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 FCFCDEMetaDataPreparation
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEMetaDataPreparation)
+ 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 FCFCDEMetaDataPreparation
+ Return CType(SerializerXml.Deserialize(s), FCFCDEMetaDataPreparation)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEMetaDataPreparation 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 FCFCDEMetaDataPreparation object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEMetaDataPreparation 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 FCFCDEMetaDataPreparation, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEMetaDataPreparation)
+ 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 FCFCDEMetaDataPreparation) 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 FCFCDEMetaDataPreparation
+ 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 FCFCDEMetaDataMessageGroup
+
+ ZBE
+
+ ZBV
+ End Enum
+
+
+ Public Enum FCFCDEMetaDataTestIndicator
+
+
+ Item1
+ End Enum
+
+
+ Public Enum FCFCDEMetaDataMessageType
+
+ FCFCDE
+ End Enum
+
+
+ Partial Public Class FCFCDEMetaDataInterchangeSender
+
+#Region "Private fields"
+ Private _identification As FCFCDEMetaDataInterchangeSenderIdentification
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._identification = New FCFCDEMetaDataInterchangeSenderIdentification()
+ End Sub
+
+ Public Property Identification() As FCFCDEMetaDataInterchangeSenderIdentification
+ Get
+ Return Me._identification
+ End Get
+ Set
+ Me._identification = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEMetaDataInterchangeSender))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEMetaDataInterchangeSender 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 FCFCDEMetaDataInterchangeSender object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEMetaDataInterchangeSender 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 FCFCDEMetaDataInterchangeSender, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEMetaDataInterchangeSender)
+ 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 FCFCDEMetaDataInterchangeSender) 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 FCFCDEMetaDataInterchangeSender
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEMetaDataInterchangeSender)
+ 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 FCFCDEMetaDataInterchangeSender
+ Return CType(SerializerXml.Deserialize(s), FCFCDEMetaDataInterchangeSender)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEMetaDataInterchangeSender 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 FCFCDEMetaDataInterchangeSender object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEMetaDataInterchangeSender 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 FCFCDEMetaDataInterchangeSender, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEMetaDataInterchangeSender)
+ 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 FCFCDEMetaDataInterchangeSender) 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 FCFCDEMetaDataInterchangeSender
+ 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 FCFCDEMetaDataInterchangeSenderIdentification
+
+#Region "Private fields"
+ Private _referenceNumber As String
+
+ Private _subsidiaryNumber 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
+
+
+ Public Property SubsidiaryNumber() As String
+ Get
+ Return Me._subsidiaryNumber
+ End Get
+ Set
+ Me._subsidiaryNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEMetaDataInterchangeSenderIdentification))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEMetaDataInterchangeSenderIdentification 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 FCFCDEMetaDataInterchangeSenderIdentification object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEMetaDataInterchangeSenderIdentification 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 FCFCDEMetaDataInterchangeSenderIdentification, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEMetaDataInterchangeSenderIdentification)
+ 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 FCFCDEMetaDataInterchangeSenderIdentification) 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 FCFCDEMetaDataInterchangeSenderIdentification
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEMetaDataInterchangeSenderIdentification)
+ 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 FCFCDEMetaDataInterchangeSenderIdentification
+ Return CType(SerializerXml.Deserialize(s), FCFCDEMetaDataInterchangeSenderIdentification)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEMetaDataInterchangeSenderIdentification 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 FCFCDEMetaDataInterchangeSenderIdentification object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEMetaDataInterchangeSenderIdentification 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 FCFCDEMetaDataInterchangeSenderIdentification, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEMetaDataInterchangeSenderIdentification)
+ 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 FCFCDEMetaDataInterchangeSenderIdentification) 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 FCFCDEMetaDataInterchangeSenderIdentification
+ 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 FCFCDEMetaDataInterchangeRecipient
+
+#Region "Private fields"
+ Private _identification As FCFCDEMetaDataInterchangeRecipientIdentification
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._identification = New FCFCDEMetaDataInterchangeRecipientIdentification()
+ End Sub
+
+ Public Property Identification() As FCFCDEMetaDataInterchangeRecipientIdentification
+ Get
+ Return Me._identification
+ End Get
+ Set
+ Me._identification = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEMetaDataInterchangeRecipient))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEMetaDataInterchangeRecipient 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 FCFCDEMetaDataInterchangeRecipient object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEMetaDataInterchangeRecipient 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 FCFCDEMetaDataInterchangeRecipient, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEMetaDataInterchangeRecipient)
+ 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 FCFCDEMetaDataInterchangeRecipient) 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 FCFCDEMetaDataInterchangeRecipient
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEMetaDataInterchangeRecipient)
+ 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 FCFCDEMetaDataInterchangeRecipient
+ Return CType(SerializerXml.Deserialize(s), FCFCDEMetaDataInterchangeRecipient)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEMetaDataInterchangeRecipient 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 FCFCDEMetaDataInterchangeRecipient object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEMetaDataInterchangeRecipient 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 FCFCDEMetaDataInterchangeRecipient, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEMetaDataInterchangeRecipient)
+ 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 FCFCDEMetaDataInterchangeRecipient) 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 FCFCDEMetaDataInterchangeRecipient
+ 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 FCFCDEMetaDataInterchangeRecipientIdentification
+
+#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(FCFCDEMetaDataInterchangeRecipientIdentification))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEMetaDataInterchangeRecipientIdentification 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 FCFCDEMetaDataInterchangeRecipientIdentification object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEMetaDataInterchangeRecipientIdentification 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 FCFCDEMetaDataInterchangeRecipientIdentification, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEMetaDataInterchangeRecipientIdentification)
+ 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 FCFCDEMetaDataInterchangeRecipientIdentification) 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 FCFCDEMetaDataInterchangeRecipientIdentification
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEMetaDataInterchangeRecipientIdentification)
+ 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 FCFCDEMetaDataInterchangeRecipientIdentification
+ Return CType(SerializerXml.Deserialize(s), FCFCDEMetaDataInterchangeRecipientIdentification)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEMetaDataInterchangeRecipientIdentification 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 FCFCDEMetaDataInterchangeRecipientIdentification object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEMetaDataInterchangeRecipientIdentification 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 FCFCDEMetaDataInterchangeRecipientIdentification, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEMetaDataInterchangeRecipientIdentification)
+ 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 FCFCDEMetaDataInterchangeRecipientIdentification) 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 FCFCDEMetaDataInterchangeRecipientIdentification
+ 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 FCFCDEHeader
+
+#Region "Private fields"
+ Private _messageVersion As String
+
+ Private _messageCreationDate As Date
+
+ Private _declaration As FCFCDEHeaderDeclaration
+
+ Private _localReferenceNumber As String
+
+ Private _prematureInputFlag As String
+
+ Private _goodsItemQuantity As String
+
+ Private _customsGoodsStatus As String
+
+ Private _declarantIsConsigneeFlag As String
+
+ Private _customsAuthorisation As FCFCDEHeaderCustomsAuthorisation
+
+ Private _inputTaxDeductionFlag As String
+
+ Private _goodsLocation As String
+
+ Private _departureCountry As String
+
+ Private _paymentMethod As FCFCDEHeaderPaymentMethod
+
+ Private _currencyCode As FCFCDEHeaderCurrencyCode
+
+ Private _additionalInformation As String
+
+ Private _taxOffice As String
+
+ Private _representativeRelationshipFlag As String
+
+ Private _declarationPlace As String
+
+ Private _authorisationNumber As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._customsAuthorisation = New FCFCDEHeaderCustomsAuthorisation()
+ Me._declaration = New FCFCDEHeaderDeclaration()
+ End Sub
+
+
+ Public Property MessageVersion() As String
+ Get
+ Return Me._messageVersion
+ End Get
+ Set
+ Me._messageVersion = Value
+ End Set
+ End Property
+
+
+ Public Property MessageCreationDate() As Date
+ Get
+ Return Me._messageCreationDate
+ End Get
+ Set
+ Me._messageCreationDate = Value
+ End Set
+ End Property
+
+ Public Property Declaration() As FCFCDEHeaderDeclaration
+ Get
+ Return Me._declaration
+ End Get
+ Set
+ Me._declaration = Value
+ End Set
+ End Property
+
+
+ Public Property LocalReferenceNumber() As String
+ Get
+ Return Me._localReferenceNumber
+ End Get
+ Set
+ Me._localReferenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property PrematureInputFlag() As String
+ Get
+ Return Me._prematureInputFlag
+ End Get
+ Set
+ Me._prematureInputFlag = Value
+ End Set
+ End Property
+
+
+ Public Property GoodsItemQuantity() As String
+ Get
+ Return Me._goodsItemQuantity
+ End Get
+ Set
+ Me._goodsItemQuantity = Value
+ End Set
+ End Property
+
+
+ Public Property CustomsGoodsStatus() As String
+ Get
+ Return Me._customsGoodsStatus
+ End Get
+ Set
+ Me._customsGoodsStatus = Value
+ End Set
+ End Property
+
+
+ Public Property DeclarantIsConsigneeFlag() As String
+ Get
+ Return Me._declarantIsConsigneeFlag
+ End Get
+ Set
+ Me._declarantIsConsigneeFlag = Value
+ End Set
+ End Property
+
+ Public Property CustomsAuthorisation() As FCFCDEHeaderCustomsAuthorisation
+ Get
+ Return Me._customsAuthorisation
+ End Get
+ Set
+ Me._customsAuthorisation = Value
+ End Set
+ End Property
+
+
+ Public Property InputTaxDeductionFlag() As String
+ Get
+ Return Me._inputTaxDeductionFlag
+ End Get
+ Set
+ Me._inputTaxDeductionFlag = Value
+ End Set
+ End Property
+
+
+ Public Property GoodsLocation() As String
+ Get
+ Return Me._goodsLocation
+ End Get
+ Set
+ Me._goodsLocation = Value
+ End Set
+ End Property
+
+
+ Public Property DepartureCountry() As String
+ Get
+ Return Me._departureCountry
+ End Get
+ Set
+ Me._departureCountry = Value
+ End Set
+ End Property
+
+ Public Property PaymentMethod() As FCFCDEHeaderPaymentMethod
+ Get
+ Return Me._paymentMethod
+ End Get
+ Set
+ Me._paymentMethod = Value
+ End Set
+ End Property
+
+ Public Property CurrencyCode() As FCFCDEHeaderCurrencyCode
+ Get
+ Return Me._currencyCode
+ End Get
+ Set
+ Me._currencyCode = Value
+ End Set
+ End Property
+
+
+ Public Property AdditionalInformation() As String
+ Get
+ Return Me._additionalInformation
+ End Get
+ Set
+ Me._additionalInformation = Value
+ End Set
+ End Property
+
+
+ Public Property TaxOffice() As String
+ Get
+ Return Me._taxOffice
+ End Get
+ Set
+ Me._taxOffice = Value
+ End Set
+ End Property
+
+
+ Public Property RepresentativeRelationshipFlag() As String
+ Get
+ Return Me._representativeRelationshipFlag
+ End Get
+ Set
+ Me._representativeRelationshipFlag = Value
+ End Set
+ End Property
+
+
+ Public Property DeclarationPlace() As String
+ Get
+ Return Me._declarationPlace
+ End Get
+ Set
+ Me._declarationPlace = Value
+ End Set
+ End Property
+
+
+ Public Property AuthorisationNumber() As String
+ Get
+ Return Me._authorisationNumber
+ End Get
+ Set
+ Me._authorisationNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEHeader))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEHeader 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 FCFCDEHeader object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEHeader 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 FCFCDEHeader, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEHeader)
+ 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 FCFCDEHeader) 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 FCFCDEHeader
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEHeader)
+ 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 FCFCDEHeader
+ Return CType(SerializerXml.Deserialize(s), FCFCDEHeader)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEHeader 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 FCFCDEHeader object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEHeader 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 FCFCDEHeader, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEHeader)
+ 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 FCFCDEHeader) 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 FCFCDEHeader
+ 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 FCFCDEHeaderDeclaration
+
+#Region "Private fields"
+ Private _kind As FCFCDEHeaderDeclarationKind
+
+ Private _type As FCFCDEHeaderDeclarationType
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Property Kind() As FCFCDEHeaderDeclarationKind
+ Get
+ Return Me._kind
+ End Get
+ Set
+ Me._kind = Value
+ End Set
+ End Property
+
+ Public Property Type() As FCFCDEHeaderDeclarationType
+ 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(FCFCDEHeaderDeclaration))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEHeaderDeclaration 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 FCFCDEHeaderDeclaration object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEHeaderDeclaration 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 FCFCDEHeaderDeclaration, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEHeaderDeclaration)
+ 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 FCFCDEHeaderDeclaration) 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 FCFCDEHeaderDeclaration
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEHeaderDeclaration)
+ 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 FCFCDEHeaderDeclaration
+ Return CType(SerializerXml.Deserialize(s), FCFCDEHeaderDeclaration)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEHeaderDeclaration 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 FCFCDEHeaderDeclaration object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEHeaderDeclaration 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 FCFCDEHeaderDeclaration, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEHeaderDeclaration)
+ 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 FCFCDEHeaderDeclaration) 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 FCFCDEHeaderDeclaration
+ 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 FCFCDEHeaderDeclarationKind
+
+ A
+
+ B
+
+ D
+
+ E
+ End Enum
+
+
+ Public Enum FCFCDEHeaderDeclarationType
+
+ EZA
+ End Enum
+
+
+ Partial Public Class FCFCDEHeaderCustomsAuthorisation
+
+#Region "Private fields"
+ Private _endUse As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property EndUse() As String
+ Get
+ Return Me._endUse
+ End Get
+ Set
+ Me._endUse = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEHeaderCustomsAuthorisation))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEHeaderCustomsAuthorisation 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 FCFCDEHeaderCustomsAuthorisation object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEHeaderCustomsAuthorisation 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 FCFCDEHeaderCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEHeaderCustomsAuthorisation)
+ 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 FCFCDEHeaderCustomsAuthorisation) 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 FCFCDEHeaderCustomsAuthorisation
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEHeaderCustomsAuthorisation)
+ 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 FCFCDEHeaderCustomsAuthorisation
+ Return CType(SerializerXml.Deserialize(s), FCFCDEHeaderCustomsAuthorisation)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEHeaderCustomsAuthorisation 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 FCFCDEHeaderCustomsAuthorisation object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEHeaderCustomsAuthorisation 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 FCFCDEHeaderCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEHeaderCustomsAuthorisation)
+ 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 FCFCDEHeaderCustomsAuthorisation) 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 FCFCDEHeaderCustomsAuthorisation
+ 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 FCFCDEHeaderPaymentMethod
+
+ A
+
+ C
+
+ D
+
+ E
+
+ F
+
+ G
+
+ Y
+
+ Z
+ End Enum
+
+
+ Public Enum FCFCDEHeaderCurrencyCode
+
+ EUR
+ End Enum
+
+
+ Partial Public Class FCFCDEDeclarant
+
+#Region "Private fields"
+ Private _identification As FCFCDEDeclarantIdentification
+
+ Private _name As String
+
+ Private _address As FCFCDEDeclarantAddress
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._address = New FCFCDEDeclarantAddress()
+ Me._identification = New FCFCDEDeclarantIdentification()
+ End Sub
+
+ Public Property Identification() As FCFCDEDeclarantIdentification
+ Get
+ Return Me._identification
+ End Get
+ Set
+ Me._identification = 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 FCFCDEDeclarantAddress
+ 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(FCFCDEDeclarant))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEDeclarant 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 FCFCDEDeclarant object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEDeclarant 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 FCFCDEDeclarant, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEDeclarant)
+ 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 FCFCDEDeclarant) 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 FCFCDEDeclarant
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEDeclarant)
+ 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 FCFCDEDeclarant
+ Return CType(SerializerXml.Deserialize(s), FCFCDEDeclarant)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEDeclarant 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 FCFCDEDeclarant object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEDeclarant 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 FCFCDEDeclarant, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEDeclarant)
+ 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 FCFCDEDeclarant) 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 FCFCDEDeclarant
+ 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 FCFCDEDeclarantIdentification
+
+#Region "Private fields"
+ Private _referenceNumber As String
+
+ Private _subsidiaryNumber 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
+
+
+ Public Property SubsidiaryNumber() As String
+ Get
+ Return Me._subsidiaryNumber
+ End Get
+ Set
+ Me._subsidiaryNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEDeclarantIdentification))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEDeclarantIdentification 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 FCFCDEDeclarantIdentification object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEDeclarantIdentification 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 FCFCDEDeclarantIdentification, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEDeclarantIdentification)
+ 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 FCFCDEDeclarantIdentification) 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 FCFCDEDeclarantIdentification
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEDeclarantIdentification)
+ 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 FCFCDEDeclarantIdentification
+ Return CType(SerializerXml.Deserialize(s), FCFCDEDeclarantIdentification)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEDeclarantIdentification 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 FCFCDEDeclarantIdentification object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEDeclarantIdentification 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 FCFCDEDeclarantIdentification, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEDeclarantIdentification)
+ 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 FCFCDEDeclarantIdentification) 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 FCFCDEDeclarantIdentification
+ 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 FCFCDEDeclarantAddress
+
+#Region "Private fields"
+ Private _line As String
+
+ Private _country As String
+
+ Private _postcode As String
+
+ Private _city As String
+
+ Private _district As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property Line() As String
+ Get
+ Return Me._line
+ End Get
+ Set
+ Me._line = 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 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 District() As String
+ Get
+ Return Me._district
+ End Get
+ Set
+ Me._district = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEDeclarantAddress))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEDeclarantAddress 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 FCFCDEDeclarantAddress object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEDeclarantAddress 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 FCFCDEDeclarantAddress, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEDeclarantAddress)
+ 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 FCFCDEDeclarantAddress) 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 FCFCDEDeclarantAddress
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEDeclarantAddress)
+ 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 FCFCDEDeclarantAddress
+ Return CType(SerializerXml.Deserialize(s), FCFCDEDeclarantAddress)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEDeclarantAddress 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 FCFCDEDeclarantAddress object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEDeclarantAddress 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 FCFCDEDeclarantAddress, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEDeclarantAddress)
+ 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 FCFCDEDeclarantAddress) 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 FCFCDEDeclarantAddress
+ 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 FCFCDERepresentative
+
+#Region "Private fields"
+ Private _identification As FCFCDERepresentativeIdentification
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._identification = New FCFCDERepresentativeIdentification()
+ End Sub
+
+ Public Property Identification() As FCFCDERepresentativeIdentification
+ Get
+ Return Me._identification
+ End Get
+ Set
+ Me._identification = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDERepresentative))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDERepresentative 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 FCFCDERepresentative object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDERepresentative 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 FCFCDERepresentative, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDERepresentative)
+ 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 FCFCDERepresentative) 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 FCFCDERepresentative
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDERepresentative)
+ 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 FCFCDERepresentative
+ Return CType(SerializerXml.Deserialize(s), FCFCDERepresentative)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDERepresentative 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 FCFCDERepresentative object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDERepresentative 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 FCFCDERepresentative, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDERepresentative)
+ 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 FCFCDERepresentative) 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 FCFCDERepresentative
+ 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 FCFCDERepresentativeIdentification
+
+#Region "Private fields"
+ Private _referenceNumber As String
+
+ Private _subsidiaryNumber 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
+
+
+ Public Property SubsidiaryNumber() As String
+ Get
+ Return Me._subsidiaryNumber
+ End Get
+ Set
+ Me._subsidiaryNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDERepresentativeIdentification))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDERepresentativeIdentification 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 FCFCDERepresentativeIdentification object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDERepresentativeIdentification 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 FCFCDERepresentativeIdentification, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDERepresentativeIdentification)
+ 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 FCFCDERepresentativeIdentification) 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 FCFCDERepresentativeIdentification
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDERepresentativeIdentification)
+ 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 FCFCDERepresentativeIdentification
+ Return CType(SerializerXml.Deserialize(s), FCFCDERepresentativeIdentification)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDERepresentativeIdentification 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 FCFCDERepresentativeIdentification object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDERepresentativeIdentification 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 FCFCDERepresentativeIdentification, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDERepresentativeIdentification)
+ 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 FCFCDERepresentativeIdentification) 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 FCFCDERepresentativeIdentification
+ 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 FCFCDEPrincipal
+
+#Region "Private fields"
+ Private _identification As FCFCDEPrincipalIdentification
+
+ Private _name As String
+
+ Private _address As FCFCDEPrincipalAddress
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._address = New FCFCDEPrincipalAddress()
+ Me._identification = New FCFCDEPrincipalIdentification()
+ End Sub
+
+ Public Property Identification() As FCFCDEPrincipalIdentification
+ Get
+ Return Me._identification
+ End Get
+ Set
+ Me._identification = 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 FCFCDEPrincipalAddress
+ 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(FCFCDEPrincipal))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEPrincipal 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 FCFCDEPrincipal object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEPrincipal 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 FCFCDEPrincipal, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEPrincipal)
+ 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 FCFCDEPrincipal) 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 FCFCDEPrincipal
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEPrincipal)
+ 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 FCFCDEPrincipal
+ Return CType(SerializerXml.Deserialize(s), FCFCDEPrincipal)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEPrincipal 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 FCFCDEPrincipal object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEPrincipal 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 FCFCDEPrincipal, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEPrincipal)
+ 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 FCFCDEPrincipal) 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 FCFCDEPrincipal
+ 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 FCFCDEPrincipalIdentification
+
+#Region "Private fields"
+ Private _referenceNumber As String
+
+ Private _subsidiaryNumber 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
+
+
+ Public Property SubsidiaryNumber() As String
+ Get
+ Return Me._subsidiaryNumber
+ End Get
+ Set
+ Me._subsidiaryNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEPrincipalIdentification))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEPrincipalIdentification 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 FCFCDEPrincipalIdentification object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEPrincipalIdentification 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 FCFCDEPrincipalIdentification, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEPrincipalIdentification)
+ 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 FCFCDEPrincipalIdentification) 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 FCFCDEPrincipalIdentification
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEPrincipalIdentification)
+ 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 FCFCDEPrincipalIdentification
+ Return CType(SerializerXml.Deserialize(s), FCFCDEPrincipalIdentification)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEPrincipalIdentification 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 FCFCDEPrincipalIdentification object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEPrincipalIdentification 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 FCFCDEPrincipalIdentification, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEPrincipalIdentification)
+ 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 FCFCDEPrincipalIdentification) 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 FCFCDEPrincipalIdentification
+ 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 FCFCDEPrincipalAddress
+
+#Region "Private fields"
+ Private _line As String
+
+ Private _country As String
+
+ Private _postcode As String
+
+ Private _city As String
+
+ Private _district As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property Line() As String
+ Get
+ Return Me._line
+ End Get
+ Set
+ Me._line = 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 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 District() As String
+ Get
+ Return Me._district
+ End Get
+ Set
+ Me._district = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEPrincipalAddress))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEPrincipalAddress 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 FCFCDEPrincipalAddress object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEPrincipalAddress 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 FCFCDEPrincipalAddress, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEPrincipalAddress)
+ 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 FCFCDEPrincipalAddress) 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 FCFCDEPrincipalAddress
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEPrincipalAddress)
+ 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 FCFCDEPrincipalAddress
+ Return CType(SerializerXml.Deserialize(s), FCFCDEPrincipalAddress)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEPrincipalAddress 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 FCFCDEPrincipalAddress object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEPrincipalAddress 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 FCFCDEPrincipalAddress, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEPrincipalAddress)
+ 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 FCFCDEPrincipalAddress) 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 FCFCDEPrincipalAddress
+ 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 FCFCDEContactPerson
+
+#Region "Private fields"
+ Private _name As String
+
+ Private _position As String
+
+ Private _phoneNumber As String
+
+ Private _mailAddress 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 Position() As String
+ Get
+ Return Me._position
+ End Get
+ Set
+ Me._position = 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 MailAddress() As String
+ Get
+ Return Me._mailAddress
+ End Get
+ Set
+ Me._mailAddress = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEContactPerson))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEContactPerson 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 FCFCDEContactPerson object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEContactPerson 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 FCFCDEContactPerson, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEContactPerson)
+ 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 FCFCDEContactPerson) 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 FCFCDEContactPerson
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEContactPerson)
+ 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 FCFCDEContactPerson
+ Return CType(SerializerXml.Deserialize(s), FCFCDEContactPerson)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEContactPerson 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 FCFCDEContactPerson object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEContactPerson 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 FCFCDEContactPerson, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEContactPerson)
+ 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 FCFCDEContactPerson) 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 FCFCDEContactPerson
+ 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 FCFCDEDutyDefermentApproval
+
+#Region "Private fields"
+ Private _type As String
+
+ Private _applicationType As String
+
+ Private _accountPrefix As String
+
+ Private _accountNumber As String
+
+ Private _authorisationNumber As String
+
+ Private _dutyDefermentApplicant As FCFCDEDutyDefermentApprovalDutyDefermentApplicant
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._dutyDefermentApplicant = New FCFCDEDutyDefermentApprovalDutyDefermentApplicant()
+ End Sub
+
+
+ Public Property Type() As String
+ Get
+ Return Me._type
+ End Get
+ Set
+ Me._type = Value
+ End Set
+ End Property
+
+
+ Public Property ApplicationType() As String
+ Get
+ Return Me._applicationType
+ End Get
+ Set
+ Me._applicationType = Value
+ End Set
+ End Property
+
+
+ Public Property AccountPrefix() As String
+ Get
+ Return Me._accountPrefix
+ End Get
+ Set
+ Me._accountPrefix = Value
+ End Set
+ End Property
+
+
+ Public Property AccountNumber() As String
+ Get
+ Return Me._accountNumber
+ End Get
+ Set
+ Me._accountNumber = 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 DutyDefermentApplicant() As FCFCDEDutyDefermentApprovalDutyDefermentApplicant
+ Get
+ Return Me._dutyDefermentApplicant
+ End Get
+ Set
+ Me._dutyDefermentApplicant = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEDutyDefermentApproval))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEDutyDefermentApproval 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 FCFCDEDutyDefermentApproval object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEDutyDefermentApproval 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 FCFCDEDutyDefermentApproval, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEDutyDefermentApproval)
+ 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 FCFCDEDutyDefermentApproval) 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 FCFCDEDutyDefermentApproval
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEDutyDefermentApproval)
+ 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 FCFCDEDutyDefermentApproval
+ Return CType(SerializerXml.Deserialize(s), FCFCDEDutyDefermentApproval)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEDutyDefermentApproval 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 FCFCDEDutyDefermentApproval object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEDutyDefermentApproval 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 FCFCDEDutyDefermentApproval, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEDutyDefermentApproval)
+ 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 FCFCDEDutyDefermentApproval) 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 FCFCDEDutyDefermentApproval
+ 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 FCFCDEDutyDefermentApprovalDutyDefermentApplicant
+
+#Region "Private fields"
+ Private _identification As FCFCDEDutyDefermentApprovalDutyDefermentApplicantIdentification
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._identification = New FCFCDEDutyDefermentApprovalDutyDefermentApplicantIdentification()
+ End Sub
+
+ Public Property Identification() As FCFCDEDutyDefermentApprovalDutyDefermentApplicantIdentification
+ Get
+ Return Me._identification
+ End Get
+ Set
+ Me._identification = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEDutyDefermentApprovalDutyDefermentApplicant))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEDutyDefermentApprovalDutyDefermentApplicant 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 FCFCDEDutyDefermentApprovalDutyDefermentApplicant object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEDutyDefermentApprovalDutyDefermentApplicant 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 FCFCDEDutyDefermentApprovalDutyDefermentApplicant, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEDutyDefermentApprovalDutyDefermentApplicant)
+ 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 FCFCDEDutyDefermentApprovalDutyDefermentApplicant) 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 FCFCDEDutyDefermentApprovalDutyDefermentApplicant
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEDutyDefermentApprovalDutyDefermentApplicant)
+ 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 FCFCDEDutyDefermentApprovalDutyDefermentApplicant
+ Return CType(SerializerXml.Deserialize(s), FCFCDEDutyDefermentApprovalDutyDefermentApplicant)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEDutyDefermentApprovalDutyDefermentApplicant 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 FCFCDEDutyDefermentApprovalDutyDefermentApplicant object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEDutyDefermentApprovalDutyDefermentApplicant 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 FCFCDEDutyDefermentApprovalDutyDefermentApplicant, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEDutyDefermentApprovalDutyDefermentApplicant)
+ 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 FCFCDEDutyDefermentApprovalDutyDefermentApplicant) 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 FCFCDEDutyDefermentApprovalDutyDefermentApplicant
+ 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 FCFCDEDutyDefermentApprovalDutyDefermentApplicantIdentification
+
+#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(FCFCDEDutyDefermentApprovalDutyDefermentApplicantIdentification))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEDutyDefermentApprovalDutyDefermentApplicantIdentification 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 FCFCDEDutyDefermentApprovalDutyDefermentApplicantIdentification object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEDutyDefermentApprovalDutyDefermentApplicantIdentification 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 FCFCDEDutyDefermentApprovalDutyDefermentApplicantIdentification, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEDutyDefermentApprovalDutyDefermentApplicantIdentification)
+ 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 FCFCDEDutyDefermentApprovalDutyDefermentApplicantIdentification) 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 FCFCDEDutyDefermentApprovalDutyDefermentApplicantIdentification
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEDutyDefermentApprovalDutyDefermentApplicantIdentification)
+ 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 FCFCDEDutyDefermentApprovalDutyDefermentApplicantIdentification
+ Return CType(SerializerXml.Deserialize(s), FCFCDEDutyDefermentApprovalDutyDefermentApplicantIdentification)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEDutyDefermentApprovalDutyDefermentApplicantIdentification 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 FCFCDEDutyDefermentApprovalDutyDefermentApplicantIdentification object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEDutyDefermentApprovalDutyDefermentApplicantIdentification 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 FCFCDEDutyDefermentApprovalDutyDefermentApplicantIdentification, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEDutyDefermentApprovalDutyDefermentApplicantIdentification)
+ 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 FCFCDEDutyDefermentApprovalDutyDefermentApplicantIdentification) 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 FCFCDEDutyDefermentApprovalDutyDefermentApplicantIdentification
+ 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 FCFCDEBorderTransportMeans
+
+#Region "Private fields"
+ Private _mode As String
+
+ Private _type As String
+
+ Private _information As String
+
+ Private _nationality As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property Mode() As String
+ Get
+ Return Me._mode
+ End Get
+ Set
+ Me._mode = 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 Information() As String
+ Get
+ Return Me._information
+ End Get
+ Set
+ Me._information = 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(FCFCDEBorderTransportMeans))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBorderTransportMeans 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 FCFCDEBorderTransportMeans object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBorderTransportMeans 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 FCFCDEBorderTransportMeans, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBorderTransportMeans)
+ 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 FCFCDEBorderTransportMeans) 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 FCFCDEBorderTransportMeans
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBorderTransportMeans)
+ 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 FCFCDEBorderTransportMeans
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBorderTransportMeans)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBorderTransportMeans 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 FCFCDEBorderTransportMeans object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBorderTransportMeans 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 FCFCDEBorderTransportMeans, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBorderTransportMeans)
+ 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 FCFCDEBorderTransportMeans) 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 FCFCDEBorderTransportMeans
+ 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 FCFCDEArrivalTransportMeans
+
+#Region "Private fields"
+ Private _identity As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property Identity() As String
+ Get
+ Return Me._identity
+ End Get
+ Set
+ Me._identity = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEArrivalTransportMeans))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEArrivalTransportMeans 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 FCFCDEArrivalTransportMeans object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEArrivalTransportMeans 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 FCFCDEArrivalTransportMeans, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEArrivalTransportMeans)
+ 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 FCFCDEArrivalTransportMeans) 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 FCFCDEArrivalTransportMeans
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEArrivalTransportMeans)
+ 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 FCFCDEArrivalTransportMeans
+ Return CType(SerializerXml.Deserialize(s), FCFCDEArrivalTransportMeans)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEArrivalTransportMeans 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 FCFCDEArrivalTransportMeans object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEArrivalTransportMeans 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 FCFCDEArrivalTransportMeans, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEArrivalTransportMeans)
+ 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 FCFCDEArrivalTransportMeans) 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 FCFCDEArrivalTransportMeans
+ 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 FCFCDEPreviousAdministrativeReferences
+
+#Region "Private fields"
+ Private _type As String
+
+ Private _previousAdministrativeReference As FCFCDEPreviousAdministrativeReferencesPreviousAdministrativeReference
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._previousAdministrativeReference = New FCFCDEPreviousAdministrativeReferencesPreviousAdministrativeReference()
+ End Sub
+
+
+ Public Property Type() As String
+ Get
+ Return Me._type
+ End Get
+ Set
+ Me._type = Value
+ End Set
+ End Property
+
+ Public Property PreviousAdministrativeReference() As FCFCDEPreviousAdministrativeReferencesPreviousAdministrativeReference
+ Get
+ Return Me._previousAdministrativeReference
+ End Get
+ Set
+ Me._previousAdministrativeReference = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEPreviousAdministrativeReferences))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEPreviousAdministrativeReferences 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 FCFCDEPreviousAdministrativeReferences object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEPreviousAdministrativeReferences 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 FCFCDEPreviousAdministrativeReferences, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEPreviousAdministrativeReferences)
+ 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 FCFCDEPreviousAdministrativeReferences) 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 FCFCDEPreviousAdministrativeReferences
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEPreviousAdministrativeReferences)
+ 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 FCFCDEPreviousAdministrativeReferences
+ Return CType(SerializerXml.Deserialize(s), FCFCDEPreviousAdministrativeReferences)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEPreviousAdministrativeReferences 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 FCFCDEPreviousAdministrativeReferences object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEPreviousAdministrativeReferences 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 FCFCDEPreviousAdministrativeReferences, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEPreviousAdministrativeReferences)
+ 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 FCFCDEPreviousAdministrativeReferences) 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 FCFCDEPreviousAdministrativeReferences
+ 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 FCFCDEPreviousAdministrativeReferencesPreviousAdministrativeReference
+
+#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(FCFCDEPreviousAdministrativeReferencesPreviousAdministrativeReference))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEPreviousAdministrativeReferencesPreviousAdministrativeReference 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 FCFCDEPreviousAdministrativeReferencesPreviousAdministrativeReference object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEPreviousAdministrativeReferencesPreviousAdministrativeReference 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 FCFCDEPreviousAdministrativeReferencesPreviousAdministrativeReference, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEPreviousAdministrativeReferencesPreviousAdministrativeReference)
+ 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 FCFCDEPreviousAdministrativeReferencesPreviousAdministrativeReference) 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 FCFCDEPreviousAdministrativeReferencesPreviousAdministrativeReference
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEPreviousAdministrativeReferencesPreviousAdministrativeReference)
+ 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 FCFCDEPreviousAdministrativeReferencesPreviousAdministrativeReference
+ Return CType(SerializerXml.Deserialize(s), FCFCDEPreviousAdministrativeReferencesPreviousAdministrativeReference)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEPreviousAdministrativeReferencesPreviousAdministrativeReference 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 FCFCDEPreviousAdministrativeReferencesPreviousAdministrativeReference object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEPreviousAdministrativeReferencesPreviousAdministrativeReference 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 FCFCDEPreviousAdministrativeReferencesPreviousAdministrativeReference, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEPreviousAdministrativeReferencesPreviousAdministrativeReference)
+ 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 FCFCDEPreviousAdministrativeReferencesPreviousAdministrativeReference) 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 FCFCDEPreviousAdministrativeReferencesPreviousAdministrativeReference
+ 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 FCFCDESummaryDeclaration
+
+#Region "Private fields"
+ Private _identificationIndicator As FCFCDESummaryDeclarationIdentificationIndicator
+
+ Private _goodsItem As List(Of FCFCDESummaryDeclarationGoodsItem)
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._goodsItem = New List(Of FCFCDESummaryDeclarationGoodsItem)()
+ End Sub
+
+ Public Property IdentificationIndicator() As FCFCDESummaryDeclarationIdentificationIndicator
+ Get
+ Return Me._identificationIndicator
+ End Get
+ Set
+ Me._identificationIndicator = Value
+ End Set
+ End Property
+
+
+ Public Property GoodsItem() As List(Of FCFCDESummaryDeclarationGoodsItem)
+ Get
+ Return Me._goodsItem
+ End Get
+ Set
+ Me._goodsItem = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDESummaryDeclaration))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDESummaryDeclaration 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 FCFCDESummaryDeclaration object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDESummaryDeclaration 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 FCFCDESummaryDeclaration, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDESummaryDeclaration)
+ 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 FCFCDESummaryDeclaration) 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 FCFCDESummaryDeclaration
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDESummaryDeclaration)
+ 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 FCFCDESummaryDeclaration
+ Return CType(SerializerXml.Deserialize(s), FCFCDESummaryDeclaration)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDESummaryDeclaration 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 FCFCDESummaryDeclaration object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDESummaryDeclaration 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 FCFCDESummaryDeclaration, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDESummaryDeclaration)
+ 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 FCFCDESummaryDeclaration) 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 FCFCDESummaryDeclaration
+ 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 FCFCDESummaryDeclarationIdentificationIndicator
+
+ AWB
+
+ REG
+ End Enum
+
+
+ Partial Public Class FCFCDESummaryDeclarationGoodsItem
+
+#Region "Private fields"
+ Private _quantity As String
+
+ Private _identificationByKey As FCFCDESummaryDeclarationGoodsItemIdentificationByKey
+
+ Private _identificationByRegistration As FCFCDESummaryDeclarationGoodsItemIdentificationByRegistration
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._identificationByRegistration = New FCFCDESummaryDeclarationGoodsItemIdentificationByRegistration()
+ Me._identificationByKey = New FCFCDESummaryDeclarationGoodsItemIdentificationByKey()
+ End Sub
+
+
+ Public Property Quantity() As String
+ Get
+ Return Me._quantity
+ End Get
+ Set
+ Me._quantity = Value
+ End Set
+ End Property
+
+ Public Property IdentificationByKey() As FCFCDESummaryDeclarationGoodsItemIdentificationByKey
+ Get
+ Return Me._identificationByKey
+ End Get
+ Set
+ Me._identificationByKey = Value
+ End Set
+ End Property
+
+ Public Property IdentificationByRegistration() As FCFCDESummaryDeclarationGoodsItemIdentificationByRegistration
+ Get
+ Return Me._identificationByRegistration
+ End Get
+ Set
+ Me._identificationByRegistration = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDESummaryDeclarationGoodsItem))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDESummaryDeclarationGoodsItem 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 FCFCDESummaryDeclarationGoodsItem object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDESummaryDeclarationGoodsItem 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 FCFCDESummaryDeclarationGoodsItem, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDESummaryDeclarationGoodsItem)
+ 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 FCFCDESummaryDeclarationGoodsItem) 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 FCFCDESummaryDeclarationGoodsItem
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDESummaryDeclarationGoodsItem)
+ 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 FCFCDESummaryDeclarationGoodsItem
+ Return CType(SerializerXml.Deserialize(s), FCFCDESummaryDeclarationGoodsItem)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDESummaryDeclarationGoodsItem 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 FCFCDESummaryDeclarationGoodsItem object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDESummaryDeclarationGoodsItem 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 FCFCDESummaryDeclarationGoodsItem, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDESummaryDeclarationGoodsItem)
+ 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 FCFCDESummaryDeclarationGoodsItem) 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 FCFCDESummaryDeclarationGoodsItem
+ 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKey
+
+#Region "Private fields"
+ Private _kind As FCFCDESummaryDeclarationGoodsItemIdentificationByKeyKind
+
+ Private _number As String
+
+ Private _custodian As FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodian
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._custodian = New FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodian()
+ End Sub
+
+ Public Property Kind() As FCFCDESummaryDeclarationGoodsItemIdentificationByKeyKind
+ Get
+ Return Me._kind
+ End Get
+ Set
+ Me._kind = Value
+ End Set
+ End Property
+
+
+ Public Property Number() As String
+ Get
+ Return Me._number
+ End Get
+ Set
+ Me._number = Value
+ End Set
+ End Property
+
+ Public Property Custodian() As FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodian
+ Get
+ Return Me._custodian
+ End Get
+ Set
+ Me._custodian = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDESummaryDeclarationGoodsItemIdentificationByKey))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDESummaryDeclarationGoodsItemIdentificationByKey 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKey object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDESummaryDeclarationGoodsItemIdentificationByKey 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKey, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDESummaryDeclarationGoodsItemIdentificationByKey)
+ 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKey) 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKey
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDESummaryDeclarationGoodsItemIdentificationByKey)
+ 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKey
+ Return CType(SerializerXml.Deserialize(s), FCFCDESummaryDeclarationGoodsItemIdentificationByKey)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDESummaryDeclarationGoodsItemIdentificationByKey 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKey object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDESummaryDeclarationGoodsItemIdentificationByKey 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKey, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDESummaryDeclarationGoodsItemIdentificationByKey)
+ 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKey) 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKey
+ 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKeyKind
+
+ AWB
+
+ ULD
+ End Enum
+
+
+ Partial Public Class FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodian
+
+#Region "Private fields"
+ Private _identification As FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._identification = New FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification()
+ End Sub
+
+ Public Property Identification() As FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
+ Get
+ Return Me._identification
+ End Get
+ Set
+ Me._identification = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodian))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodian 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodian object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodian 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodian, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodian)
+ 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodian) 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodian
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodian)
+ 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodian
+ Return CType(SerializerXml.Deserialize(s), FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodian)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodian 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodian object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodian 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodian, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodian)
+ 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodian) 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodian
+ 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
+
+#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(FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification)
+ 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification) 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification)
+ 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
+ Return CType(SerializerXml.Deserialize(s), FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification)
+ 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification) 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 FCFCDESummaryDeclarationGoodsItemIdentificationByKeyCustodianIdentification
+ 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 FCFCDESummaryDeclarationGoodsItemIdentificationByRegistration
+
+#Region "Private fields"
+ Private _referencedRegistrationNumber As String
+
+ Private _referencedSequenceNumber As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property ReferencedRegistrationNumber() As String
+ Get
+ Return Me._referencedRegistrationNumber
+ End Get
+ Set
+ Me._referencedRegistrationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property ReferencedSequenceNumber() As String
+ Get
+ Return Me._referencedSequenceNumber
+ End Get
+ Set
+ Me._referencedSequenceNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDESummaryDeclarationGoodsItemIdentificationByRegistration))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDESummaryDeclarationGoodsItemIdentificationByRegistration 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 FCFCDESummaryDeclarationGoodsItemIdentificationByRegistration object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDESummaryDeclarationGoodsItemIdentificationByRegistration 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 FCFCDESummaryDeclarationGoodsItemIdentificationByRegistration, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDESummaryDeclarationGoodsItemIdentificationByRegistration)
+ 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 FCFCDESummaryDeclarationGoodsItemIdentificationByRegistration) 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 FCFCDESummaryDeclarationGoodsItemIdentificationByRegistration
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDESummaryDeclarationGoodsItemIdentificationByRegistration)
+ 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 FCFCDESummaryDeclarationGoodsItemIdentificationByRegistration
+ Return CType(SerializerXml.Deserialize(s), FCFCDESummaryDeclarationGoodsItemIdentificationByRegistration)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDESummaryDeclarationGoodsItemIdentificationByRegistration 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 FCFCDESummaryDeclarationGoodsItemIdentificationByRegistration object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDESummaryDeclarationGoodsItemIdentificationByRegistration 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 FCFCDESummaryDeclarationGoodsItemIdentificationByRegistration, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDESummaryDeclarationGoodsItemIdentificationByRegistration)
+ 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 FCFCDESummaryDeclarationGoodsItemIdentificationByRegistration) 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 FCFCDESummaryDeclarationGoodsItemIdentificationByRegistration
+ 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 FCFCDECustomsWarehouse
+
+#Region "Private fields"
+ Private _sequenceNumber As FCFCDECustomsWarehouseSequenceNumber
+
+ Private _goodsItemQuantity As String
+
+ Private _customsAuthorisation As FCFCDECustomsWarehouseCustomsAuthorisation
+
+ Private _localReferenceNumber As String
+
+ Private _goodsItem As List(Of FCFCDECustomsWarehouseGoodsItem)
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._goodsItem = New List(Of FCFCDECustomsWarehouseGoodsItem)()
+ Me._customsAuthorisation = New FCFCDECustomsWarehouseCustomsAuthorisation()
+ End Sub
+
+ Public Property SequenceNumber() As FCFCDECustomsWarehouseSequenceNumber
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property GoodsItemQuantity() As String
+ Get
+ Return Me._goodsItemQuantity
+ End Get
+ Set
+ Me._goodsItemQuantity = Value
+ End Set
+ End Property
+
+ Public Property CustomsAuthorisation() As FCFCDECustomsWarehouseCustomsAuthorisation
+ Get
+ Return Me._customsAuthorisation
+ End Get
+ Set
+ Me._customsAuthorisation = Value
+ End Set
+ End Property
+
+
+ Public Property LocalReferenceNumber() As String
+ Get
+ Return Me._localReferenceNumber
+ End Get
+ Set
+ Me._localReferenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property GoodsItem() As List(Of FCFCDECustomsWarehouseGoodsItem)
+ Get
+ Return Me._goodsItem
+ End Get
+ Set
+ Me._goodsItem = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDECustomsWarehouse))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDECustomsWarehouse 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 FCFCDECustomsWarehouse object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDECustomsWarehouse 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 FCFCDECustomsWarehouse, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDECustomsWarehouse)
+ 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 FCFCDECustomsWarehouse) 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 FCFCDECustomsWarehouse
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDECustomsWarehouse)
+ 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 FCFCDECustomsWarehouse
+ Return CType(SerializerXml.Deserialize(s), FCFCDECustomsWarehouse)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDECustomsWarehouse 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 FCFCDECustomsWarehouse object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDECustomsWarehouse 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 FCFCDECustomsWarehouse, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDECustomsWarehouse)
+ 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 FCFCDECustomsWarehouse) 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 FCFCDECustomsWarehouse
+ 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 FCFCDECustomsWarehouseSequenceNumber
+
+
+ Item1
+ End Enum
+
+
+ Partial Public Class FCFCDECustomsWarehouseCustomsAuthorisation
+
+#Region "Private fields"
+ Private _warehouseOwner As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property WarehouseOwner() As String
+ Get
+ Return Me._warehouseOwner
+ End Get
+ Set
+ Me._warehouseOwner = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDECustomsWarehouseCustomsAuthorisation))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDECustomsWarehouseCustomsAuthorisation 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 FCFCDECustomsWarehouseCustomsAuthorisation object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDECustomsWarehouseCustomsAuthorisation 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 FCFCDECustomsWarehouseCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDECustomsWarehouseCustomsAuthorisation)
+ 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 FCFCDECustomsWarehouseCustomsAuthorisation) 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 FCFCDECustomsWarehouseCustomsAuthorisation
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDECustomsWarehouseCustomsAuthorisation)
+ 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 FCFCDECustomsWarehouseCustomsAuthorisation
+ Return CType(SerializerXml.Deserialize(s), FCFCDECustomsWarehouseCustomsAuthorisation)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDECustomsWarehouseCustomsAuthorisation 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 FCFCDECustomsWarehouseCustomsAuthorisation object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDECustomsWarehouseCustomsAuthorisation 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 FCFCDECustomsWarehouseCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDECustomsWarehouseCustomsAuthorisation)
+ 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 FCFCDECustomsWarehouseCustomsAuthorisation) 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 FCFCDECustomsWarehouseCustomsAuthorisation
+ 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 FCFCDECustomsWarehouseGoodsItem
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _referencedRegistrationNumber As String
+
+ Private _referencedSequenceNumber As String
+
+ Private _accessViaAtlasFlag As String
+
+ Private _commodityCode As String
+
+ Private _usualProcessingFlag As String
+
+ Private _complement As String
+
+ Private _commercialAmount As FCFCDECustomsWarehouseGoodsItemCommercialAmount
+
+ Private _debitAmount As FCFCDECustomsWarehouseGoodsItemDebitAmount
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._debitAmount = New FCFCDECustomsWarehouseGoodsItemDebitAmount()
+ Me._commercialAmount = New FCFCDECustomsWarehouseGoodsItemCommercialAmount()
+ End Sub
+
+
+ Public Property SequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property ReferencedRegistrationNumber() As String
+ Get
+ Return Me._referencedRegistrationNumber
+ End Get
+ Set
+ Me._referencedRegistrationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property ReferencedSequenceNumber() As String
+ Get
+ Return Me._referencedSequenceNumber
+ End Get
+ Set
+ Me._referencedSequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property AccessViaAtlasFlag() As String
+ Get
+ Return Me._accessViaAtlasFlag
+ End Get
+ Set
+ Me._accessViaAtlasFlag = Value
+ End Set
+ End Property
+
+
+ Public Property CommodityCode() As String
+ Get
+ Return Me._commodityCode
+ End Get
+ Set
+ Me._commodityCode = Value
+ End Set
+ End Property
+
+
+ Public Property UsualProcessingFlag() As String
+ Get
+ Return Me._usualProcessingFlag
+ End Get
+ Set
+ Me._usualProcessingFlag = Value
+ End Set
+ End Property
+
+
+ Public Property Complement() As String
+ Get
+ Return Me._complement
+ End Get
+ Set
+ Me._complement = Value
+ End Set
+ End Property
+
+ Public Property CommercialAmount() As FCFCDECustomsWarehouseGoodsItemCommercialAmount
+ Get
+ Return Me._commercialAmount
+ End Get
+ Set
+ Me._commercialAmount = Value
+ End Set
+ End Property
+
+ Public Property DebitAmount() As FCFCDECustomsWarehouseGoodsItemDebitAmount
+ Get
+ Return Me._debitAmount
+ End Get
+ Set
+ Me._debitAmount = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDECustomsWarehouseGoodsItem))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDECustomsWarehouseGoodsItem 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 FCFCDECustomsWarehouseGoodsItem object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDECustomsWarehouseGoodsItem 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 FCFCDECustomsWarehouseGoodsItem, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDECustomsWarehouseGoodsItem)
+ 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 FCFCDECustomsWarehouseGoodsItem) 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 FCFCDECustomsWarehouseGoodsItem
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDECustomsWarehouseGoodsItem)
+ 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 FCFCDECustomsWarehouseGoodsItem
+ Return CType(SerializerXml.Deserialize(s), FCFCDECustomsWarehouseGoodsItem)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDECustomsWarehouseGoodsItem 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 FCFCDECustomsWarehouseGoodsItem object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDECustomsWarehouseGoodsItem 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 FCFCDECustomsWarehouseGoodsItem, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDECustomsWarehouseGoodsItem)
+ 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 FCFCDECustomsWarehouseGoodsItem) 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 FCFCDECustomsWarehouseGoodsItem
+ 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 FCFCDECustomsWarehouseGoodsItemCommercialAmount
+
+#Region "Private fields"
+ Private _quantity As Decimal
+
+ Private _measurementUnit As String
+
+ Private _qualifier As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Property Quantity() As Decimal
+ Get
+ Return Me._quantity
+ End Get
+ Set
+ Me._quantity = Value
+ End Set
+ End Property
+
+
+ Public Property MeasurementUnit() As String
+ Get
+ Return Me._measurementUnit
+ End Get
+ Set
+ Me._measurementUnit = Value
+ End Set
+ End Property
+
+
+ Public Property Qualifier() As String
+ Get
+ Return Me._qualifier
+ End Get
+ Set
+ Me._qualifier = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDECustomsWarehouseGoodsItemCommercialAmount))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDECustomsWarehouseGoodsItemCommercialAmount 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 FCFCDECustomsWarehouseGoodsItemCommercialAmount object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDECustomsWarehouseGoodsItemCommercialAmount 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 FCFCDECustomsWarehouseGoodsItemCommercialAmount, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDECustomsWarehouseGoodsItemCommercialAmount)
+ 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 FCFCDECustomsWarehouseGoodsItemCommercialAmount) 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 FCFCDECustomsWarehouseGoodsItemCommercialAmount
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDECustomsWarehouseGoodsItemCommercialAmount)
+ 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 FCFCDECustomsWarehouseGoodsItemCommercialAmount
+ Return CType(SerializerXml.Deserialize(s), FCFCDECustomsWarehouseGoodsItemCommercialAmount)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDECustomsWarehouseGoodsItemCommercialAmount 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 FCFCDECustomsWarehouseGoodsItemCommercialAmount object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDECustomsWarehouseGoodsItemCommercialAmount 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 FCFCDECustomsWarehouseGoodsItemCommercialAmount, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDECustomsWarehouseGoodsItemCommercialAmount)
+ 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 FCFCDECustomsWarehouseGoodsItemCommercialAmount) 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 FCFCDECustomsWarehouseGoodsItemCommercialAmount
+ 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 FCFCDECustomsWarehouseGoodsItemDebitAmount
+
+#Region "Private fields"
+ Private _quantity As Decimal
+
+ Private _measurementUnit As String
+
+ Private _qualifier As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Property Quantity() As Decimal
+ Get
+ Return Me._quantity
+ End Get
+ Set
+ Me._quantity = Value
+ End Set
+ End Property
+
+
+ Public Property MeasurementUnit() As String
+ Get
+ Return Me._measurementUnit
+ End Get
+ Set
+ Me._measurementUnit = Value
+ End Set
+ End Property
+
+
+ Public Property Qualifier() As String
+ Get
+ Return Me._qualifier
+ End Get
+ Set
+ Me._qualifier = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDECustomsWarehouseGoodsItemDebitAmount))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDECustomsWarehouseGoodsItemDebitAmount 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 FCFCDECustomsWarehouseGoodsItemDebitAmount object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDECustomsWarehouseGoodsItemDebitAmount 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 FCFCDECustomsWarehouseGoodsItemDebitAmount, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDECustomsWarehouseGoodsItemDebitAmount)
+ 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 FCFCDECustomsWarehouseGoodsItemDebitAmount) 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 FCFCDECustomsWarehouseGoodsItemDebitAmount
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDECustomsWarehouseGoodsItemDebitAmount)
+ 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 FCFCDECustomsWarehouseGoodsItemDebitAmount
+ Return CType(SerializerXml.Deserialize(s), FCFCDECustomsWarehouseGoodsItemDebitAmount)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDECustomsWarehouseGoodsItemDebitAmount 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 FCFCDECustomsWarehouseGoodsItemDebitAmount object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDECustomsWarehouseGoodsItemDebitAmount 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 FCFCDECustomsWarehouseGoodsItemDebitAmount, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDECustomsWarehouseGoodsItemDebitAmount)
+ 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 FCFCDECustomsWarehouseGoodsItemDebitAmount) 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 FCFCDECustomsWarehouseGoodsItemDebitAmount
+ 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 FCFCDEInwardProcessing
+
+#Region "Private fields"
+ Private _sequenceNumber As FCFCDEInwardProcessingSequenceNumber
+
+ Private _goodsItemQuantity As String
+
+ Private _customsAuthorisation As FCFCDEInwardProcessingCustomsAuthorisation
+
+ Private _simplifiedGrantAuthorisationFlag As String
+
+ Private _monitoringCustomsOffice As FCFCDEInwardProcessingMonitoringCustomsOffice
+
+ Private _goodsItem As List(Of FCFCDEInwardProcessingGoodsItem)
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._goodsItem = New List(Of FCFCDEInwardProcessingGoodsItem)()
+ Me._monitoringCustomsOffice = New FCFCDEInwardProcessingMonitoringCustomsOffice()
+ Me._customsAuthorisation = New FCFCDEInwardProcessingCustomsAuthorisation()
+ End Sub
+
+ Public Property SequenceNumber() As FCFCDEInwardProcessingSequenceNumber
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property GoodsItemQuantity() As String
+ Get
+ Return Me._goodsItemQuantity
+ End Get
+ Set
+ Me._goodsItemQuantity = Value
+ End Set
+ End Property
+
+ Public Property CustomsAuthorisation() As FCFCDEInwardProcessingCustomsAuthorisation
+ Get
+ Return Me._customsAuthorisation
+ End Get
+ Set
+ Me._customsAuthorisation = Value
+ End Set
+ End Property
+
+
+ Public Property SimplifiedGrantAuthorisationFlag() As String
+ Get
+ Return Me._simplifiedGrantAuthorisationFlag
+ End Get
+ Set
+ Me._simplifiedGrantAuthorisationFlag = Value
+ End Set
+ End Property
+
+ Public Property MonitoringCustomsOffice() As FCFCDEInwardProcessingMonitoringCustomsOffice
+ Get
+ Return Me._monitoringCustomsOffice
+ End Get
+ Set
+ Me._monitoringCustomsOffice = Value
+ End Set
+ End Property
+
+
+ Public Property GoodsItem() As List(Of FCFCDEInwardProcessingGoodsItem)
+ Get
+ Return Me._goodsItem
+ End Get
+ Set
+ Me._goodsItem = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEInwardProcessing))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEInwardProcessing 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 FCFCDEInwardProcessing object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEInwardProcessing 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 FCFCDEInwardProcessing, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEInwardProcessing)
+ 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 FCFCDEInwardProcessing) 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 FCFCDEInwardProcessing
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEInwardProcessing)
+ 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 FCFCDEInwardProcessing
+ Return CType(SerializerXml.Deserialize(s), FCFCDEInwardProcessing)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEInwardProcessing 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 FCFCDEInwardProcessing object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEInwardProcessing 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 FCFCDEInwardProcessing, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEInwardProcessing)
+ 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 FCFCDEInwardProcessing) 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 FCFCDEInwardProcessing
+ 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 FCFCDEInwardProcessingSequenceNumber
+
+
+ Item1
+ End Enum
+
+
+ Partial Public Class FCFCDEInwardProcessingCustomsAuthorisation
+
+#Region "Private fields"
+ Private _processingOwner As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property ProcessingOwner() As String
+ Get
+ Return Me._processingOwner
+ End Get
+ Set
+ Me._processingOwner = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEInwardProcessingCustomsAuthorisation))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEInwardProcessingCustomsAuthorisation 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 FCFCDEInwardProcessingCustomsAuthorisation object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEInwardProcessingCustomsAuthorisation 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 FCFCDEInwardProcessingCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEInwardProcessingCustomsAuthorisation)
+ 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 FCFCDEInwardProcessingCustomsAuthorisation) 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 FCFCDEInwardProcessingCustomsAuthorisation
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEInwardProcessingCustomsAuthorisation)
+ 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 FCFCDEInwardProcessingCustomsAuthorisation
+ Return CType(SerializerXml.Deserialize(s), FCFCDEInwardProcessingCustomsAuthorisation)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEInwardProcessingCustomsAuthorisation 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 FCFCDEInwardProcessingCustomsAuthorisation object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEInwardProcessingCustomsAuthorisation 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 FCFCDEInwardProcessingCustomsAuthorisation, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEInwardProcessingCustomsAuthorisation)
+ 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 FCFCDEInwardProcessingCustomsAuthorisation) 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 FCFCDEInwardProcessingCustomsAuthorisation
+ 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 FCFCDEInwardProcessingMonitoringCustomsOffice
+
+#Region "Private fields"
+ Private _identification As FCFCDEInwardProcessingMonitoringCustomsOfficeIdentification
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._identification = New FCFCDEInwardProcessingMonitoringCustomsOfficeIdentification()
+ End Sub
+
+ Public Property Identification() As FCFCDEInwardProcessingMonitoringCustomsOfficeIdentification
+ Get
+ Return Me._identification
+ End Get
+ Set
+ Me._identification = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEInwardProcessingMonitoringCustomsOffice))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEInwardProcessingMonitoringCustomsOffice 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 FCFCDEInwardProcessingMonitoringCustomsOffice object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEInwardProcessingMonitoringCustomsOffice 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 FCFCDEInwardProcessingMonitoringCustomsOffice, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEInwardProcessingMonitoringCustomsOffice)
+ 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 FCFCDEInwardProcessingMonitoringCustomsOffice) 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 FCFCDEInwardProcessingMonitoringCustomsOffice
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEInwardProcessingMonitoringCustomsOffice)
+ 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 FCFCDEInwardProcessingMonitoringCustomsOffice
+ Return CType(SerializerXml.Deserialize(s), FCFCDEInwardProcessingMonitoringCustomsOffice)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEInwardProcessingMonitoringCustomsOffice 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 FCFCDEInwardProcessingMonitoringCustomsOffice object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEInwardProcessingMonitoringCustomsOffice 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 FCFCDEInwardProcessingMonitoringCustomsOffice, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEInwardProcessingMonitoringCustomsOffice)
+ 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 FCFCDEInwardProcessingMonitoringCustomsOffice) 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 FCFCDEInwardProcessingMonitoringCustomsOffice
+ 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 FCFCDEInwardProcessingMonitoringCustomsOfficeIdentification
+
+#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(FCFCDEInwardProcessingMonitoringCustomsOfficeIdentification))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEInwardProcessingMonitoringCustomsOfficeIdentification 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 FCFCDEInwardProcessingMonitoringCustomsOfficeIdentification object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEInwardProcessingMonitoringCustomsOfficeIdentification 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 FCFCDEInwardProcessingMonitoringCustomsOfficeIdentification, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEInwardProcessingMonitoringCustomsOfficeIdentification)
+ 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 FCFCDEInwardProcessingMonitoringCustomsOfficeIdentification) 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 FCFCDEInwardProcessingMonitoringCustomsOfficeIdentification
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEInwardProcessingMonitoringCustomsOfficeIdentification)
+ 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 FCFCDEInwardProcessingMonitoringCustomsOfficeIdentification
+ Return CType(SerializerXml.Deserialize(s), FCFCDEInwardProcessingMonitoringCustomsOfficeIdentification)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEInwardProcessingMonitoringCustomsOfficeIdentification 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 FCFCDEInwardProcessingMonitoringCustomsOfficeIdentification object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEInwardProcessingMonitoringCustomsOfficeIdentification 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 FCFCDEInwardProcessingMonitoringCustomsOfficeIdentification, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEInwardProcessingMonitoringCustomsOfficeIdentification)
+ 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 FCFCDEInwardProcessingMonitoringCustomsOfficeIdentification) 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 FCFCDEInwardProcessingMonitoringCustomsOfficeIdentification
+ 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 FCFCDEInwardProcessingGoodsItem
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _referencedRegistrationNumber As String
+
+ Private _referencedSequenceNumber As String
+
+ Private _accessViaAtlasFlag As String
+
+ Private _goodsRelatedInformation 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 ReferencedRegistrationNumber() As String
+ Get
+ Return Me._referencedRegistrationNumber
+ End Get
+ Set
+ Me._referencedRegistrationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property ReferencedSequenceNumber() As String
+ Get
+ Return Me._referencedSequenceNumber
+ End Get
+ Set
+ Me._referencedSequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property AccessViaAtlasFlag() As String
+ Get
+ Return Me._accessViaAtlasFlag
+ End Get
+ Set
+ Me._accessViaAtlasFlag = Value
+ End Set
+ End Property
+
+
+ Public Property GoodsRelatedInformation() As String
+ Get
+ Return Me._goodsRelatedInformation
+ End Get
+ Set
+ Me._goodsRelatedInformation = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEInwardProcessingGoodsItem))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEInwardProcessingGoodsItem 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 FCFCDEInwardProcessingGoodsItem object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEInwardProcessingGoodsItem 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 FCFCDEInwardProcessingGoodsItem, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEInwardProcessingGoodsItem)
+ 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 FCFCDEInwardProcessingGoodsItem) 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 FCFCDEInwardProcessingGoodsItem
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEInwardProcessingGoodsItem)
+ 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 FCFCDEInwardProcessingGoodsItem
+ Return CType(SerializerXml.Deserialize(s), FCFCDEInwardProcessingGoodsItem)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEInwardProcessingGoodsItem 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 FCFCDEInwardProcessingGoodsItem object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEInwardProcessingGoodsItem 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 FCFCDEInwardProcessingGoodsItem, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEInwardProcessingGoodsItem)
+ 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 FCFCDEInwardProcessingGoodsItem) 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 FCFCDEInwardProcessingGoodsItem
+ 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 FCFCDEBody
+
+#Region "Private fields"
+ Private _customsValueFlag As String
+
+ Private _consignor As FCFCDEBodyConsignor
+
+ Private _consignee As FCFCDEBodyConsignee
+
+ Private _additionalDutyReferences As List(Of FCFCDEBodyAdditionalDutyReferences)
+
+ Private _containers As FCFCDEBodyContainers
+
+ Private _deliveryTerms As FCFCDEBodyDeliveryTerms
+
+ Private _paymentTransaction As FCFCDEBodyPaymentTransaction
+
+ Private _foreignTradeStatistics As FCFCDEBodyForeignTradeStatistics
+
+ Private _customsValue As FCFCDEBodyCustomsValue
+
+ Private _document As List(Of FCFCDEBodyDocument)
+
+ Private _goodsItem As List(Of FCFCDEBodyGoodsItem)
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._goodsItem = New List(Of FCFCDEBodyGoodsItem)()
+ Me._document = New List(Of FCFCDEBodyDocument)()
+ Me._customsValue = New FCFCDEBodyCustomsValue()
+ Me._foreignTradeStatistics = New FCFCDEBodyForeignTradeStatistics()
+ Me._paymentTransaction = New FCFCDEBodyPaymentTransaction()
+ Me._deliveryTerms = New FCFCDEBodyDeliveryTerms()
+ Me._containers = New FCFCDEBodyContainers()
+ Me._additionalDutyReferences = New List(Of FCFCDEBodyAdditionalDutyReferences)()
+ Me._consignee = New FCFCDEBodyConsignee()
+ Me._consignor = New FCFCDEBodyConsignor()
+ End Sub
+
+
+ Public Property CustomsValueFlag() As String
+ Get
+ Return Me._customsValueFlag
+ End Get
+ Set
+ Me._customsValueFlag = Value
+ End Set
+ End Property
+
+ Public Property Consignor() As FCFCDEBodyConsignor
+ Get
+ Return Me._consignor
+ End Get
+ Set
+ Me._consignor = Value
+ End Set
+ End Property
+
+ Public Property Consignee() As FCFCDEBodyConsignee
+ Get
+ Return Me._consignee
+ End Get
+ Set
+ Me._consignee = Value
+ End Set
+ End Property
+
+
+ Public Property AdditionalDutyReferences() As List(Of FCFCDEBodyAdditionalDutyReferences)
+ Get
+ Return Me._additionalDutyReferences
+ End Get
+ Set
+ Me._additionalDutyReferences = Value
+ End Set
+ End Property
+
+ Public Property Containers() As FCFCDEBodyContainers
+ Get
+ Return Me._containers
+ End Get
+ Set
+ Me._containers = Value
+ End Set
+ End Property
+
+ Public Property DeliveryTerms() As FCFCDEBodyDeliveryTerms
+ Get
+ Return Me._deliveryTerms
+ End Get
+ Set
+ Me._deliveryTerms = Value
+ End Set
+ End Property
+
+ Public Property PaymentTransaction() As FCFCDEBodyPaymentTransaction
+ Get
+ Return Me._paymentTransaction
+ End Get
+ Set
+ Me._paymentTransaction = Value
+ End Set
+ End Property
+
+ Public Property ForeignTradeStatistics() As FCFCDEBodyForeignTradeStatistics
+ Get
+ Return Me._foreignTradeStatistics
+ End Get
+ Set
+ Me._foreignTradeStatistics = Value
+ End Set
+ End Property
+
+ Public Property CustomsValue() As FCFCDEBodyCustomsValue
+ Get
+ Return Me._customsValue
+ End Get
+ Set
+ Me._customsValue = Value
+ End Set
+ End Property
+
+
+ Public Property Document() As List(Of FCFCDEBodyDocument)
+ Get
+ Return Me._document
+ End Get
+ Set
+ Me._document = Value
+ End Set
+ End Property
+
+
+ Public Property GoodsItem() As List(Of FCFCDEBodyGoodsItem)
+ Get
+ Return Me._goodsItem
+ End Get
+ Set
+ Me._goodsItem = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBody))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBody 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 FCFCDEBody object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBody 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 FCFCDEBody, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBody)
+ 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 FCFCDEBody) 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 FCFCDEBody
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBody)
+ 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 FCFCDEBody
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBody)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBody 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 FCFCDEBody object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBody 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 FCFCDEBody, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBody)
+ 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 FCFCDEBody) 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 FCFCDEBody
+ 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 FCFCDEBodyConsignor
+
+#Region "Private fields"
+ Private _identification As FCFCDEBodyConsignorIdentification
+
+ Private _name As String
+
+ Private _address As FCFCDEBodyConsignorAddress
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._address = New FCFCDEBodyConsignorAddress()
+ Me._identification = New FCFCDEBodyConsignorIdentification()
+ End Sub
+
+ Public Property Identification() As FCFCDEBodyConsignorIdentification
+ Get
+ Return Me._identification
+ End Get
+ Set
+ Me._identification = 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 FCFCDEBodyConsignorAddress
+ 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(FCFCDEBodyConsignor))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBodyConsignor 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 FCFCDEBodyConsignor object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBodyConsignor 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 FCFCDEBodyConsignor, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyConsignor)
+ 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 FCFCDEBodyConsignor) 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 FCFCDEBodyConsignor
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyConsignor)
+ 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 FCFCDEBodyConsignor
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBodyConsignor)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBodyConsignor 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 FCFCDEBodyConsignor object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBodyConsignor 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 FCFCDEBodyConsignor, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyConsignor)
+ 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 FCFCDEBodyConsignor) 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 FCFCDEBodyConsignor
+ 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 FCFCDEBodyConsignorIdentification
+
+#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(FCFCDEBodyConsignorIdentification))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBodyConsignorIdentification 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 FCFCDEBodyConsignorIdentification object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBodyConsignorIdentification 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 FCFCDEBodyConsignorIdentification, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyConsignorIdentification)
+ 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 FCFCDEBodyConsignorIdentification) 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 FCFCDEBodyConsignorIdentification
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyConsignorIdentification)
+ 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 FCFCDEBodyConsignorIdentification
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBodyConsignorIdentification)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBodyConsignorIdentification 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 FCFCDEBodyConsignorIdentification object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBodyConsignorIdentification 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 FCFCDEBodyConsignorIdentification, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyConsignorIdentification)
+ 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 FCFCDEBodyConsignorIdentification) 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 FCFCDEBodyConsignorIdentification
+ 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 FCFCDEBodyConsignorAddress
+
+#Region "Private fields"
+ Private _line As String
+
+ Private _country As String
+
+ Private _postcode As String
+
+ Private _city As String
+
+ Private _district As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property Line() As String
+ Get
+ Return Me._line
+ End Get
+ Set
+ Me._line = 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 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 District() As String
+ Get
+ Return Me._district
+ End Get
+ Set
+ Me._district = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyConsignorAddress))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBodyConsignorAddress 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 FCFCDEBodyConsignorAddress object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBodyConsignorAddress 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 FCFCDEBodyConsignorAddress, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyConsignorAddress)
+ 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 FCFCDEBodyConsignorAddress) 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 FCFCDEBodyConsignorAddress
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyConsignorAddress)
+ 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 FCFCDEBodyConsignorAddress
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBodyConsignorAddress)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBodyConsignorAddress 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 FCFCDEBodyConsignorAddress object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBodyConsignorAddress 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 FCFCDEBodyConsignorAddress, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyConsignorAddress)
+ 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 FCFCDEBodyConsignorAddress) 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 FCFCDEBodyConsignorAddress
+ 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 FCFCDEBodyConsignee
+
+#Region "Private fields"
+ Private _identification As FCFCDEBodyConsigneeIdentification
+
+ Private _name As String
+
+ Private _address As FCFCDEBodyConsigneeAddress
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._address = New FCFCDEBodyConsigneeAddress()
+ Me._identification = New FCFCDEBodyConsigneeIdentification()
+ End Sub
+
+ Public Property Identification() As FCFCDEBodyConsigneeIdentification
+ Get
+ Return Me._identification
+ End Get
+ Set
+ Me._identification = 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 FCFCDEBodyConsigneeAddress
+ 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(FCFCDEBodyConsignee))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBodyConsignee 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 FCFCDEBodyConsignee object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBodyConsignee 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 FCFCDEBodyConsignee, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyConsignee)
+ 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 FCFCDEBodyConsignee) 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 FCFCDEBodyConsignee
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyConsignee)
+ 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 FCFCDEBodyConsignee
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBodyConsignee)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBodyConsignee 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 FCFCDEBodyConsignee object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBodyConsignee 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 FCFCDEBodyConsignee, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyConsignee)
+ 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 FCFCDEBodyConsignee) 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 FCFCDEBodyConsignee
+ 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 FCFCDEBodyConsigneeIdentification
+
+#Region "Private fields"
+ Private _referenceNumber As String
+
+ Private _subsidiaryNumber 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
+
+
+ Public Property SubsidiaryNumber() As String
+ Get
+ Return Me._subsidiaryNumber
+ End Get
+ Set
+ Me._subsidiaryNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyConsigneeIdentification))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBodyConsigneeIdentification 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 FCFCDEBodyConsigneeIdentification object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBodyConsigneeIdentification 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 FCFCDEBodyConsigneeIdentification, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyConsigneeIdentification)
+ 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 FCFCDEBodyConsigneeIdentification) 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 FCFCDEBodyConsigneeIdentification
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyConsigneeIdentification)
+ 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 FCFCDEBodyConsigneeIdentification
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBodyConsigneeIdentification)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBodyConsigneeIdentification 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 FCFCDEBodyConsigneeIdentification object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBodyConsigneeIdentification 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 FCFCDEBodyConsigneeIdentification, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyConsigneeIdentification)
+ 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 FCFCDEBodyConsigneeIdentification) 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 FCFCDEBodyConsigneeIdentification
+ 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 FCFCDEBodyConsigneeAddress
+
+#Region "Private fields"
+ Private _line As String
+
+ Private _country As String
+
+ Private _postcode As String
+
+ Private _city As String
+
+ Private _district As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property Line() As String
+ Get
+ Return Me._line
+ End Get
+ Set
+ Me._line = 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 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 District() As String
+ Get
+ Return Me._district
+ End Get
+ Set
+ Me._district = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyConsigneeAddress))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBodyConsigneeAddress 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 FCFCDEBodyConsigneeAddress object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBodyConsigneeAddress 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 FCFCDEBodyConsigneeAddress, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyConsigneeAddress)
+ 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 FCFCDEBodyConsigneeAddress) 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 FCFCDEBodyConsigneeAddress
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyConsigneeAddress)
+ 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 FCFCDEBodyConsigneeAddress
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBodyConsigneeAddress)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBodyConsigneeAddress 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 FCFCDEBodyConsigneeAddress object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBodyConsigneeAddress 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 FCFCDEBodyConsigneeAddress, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyConsigneeAddress)
+ 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 FCFCDEBodyConsigneeAddress) 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 FCFCDEBodyConsigneeAddress
+ 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 FCFCDEBodyAdditionalDutyReferences
+
+#Region "Private fields"
+ Private _referenceNumber As String
+
+ Private _dutyInterestedParty As FCFCDEBodyAdditionalDutyReferencesDutyInterestedParty
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._dutyInterestedParty = New FCFCDEBodyAdditionalDutyReferencesDutyInterestedParty()
+ End Sub
+
+
+ Public Property ReferenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+ Public Property DutyInterestedParty() As FCFCDEBodyAdditionalDutyReferencesDutyInterestedParty
+ Get
+ Return Me._dutyInterestedParty
+ End Get
+ Set
+ Me._dutyInterestedParty = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyAdditionalDutyReferences))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBodyAdditionalDutyReferences 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 FCFCDEBodyAdditionalDutyReferences object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBodyAdditionalDutyReferences 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 FCFCDEBodyAdditionalDutyReferences, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyAdditionalDutyReferences)
+ 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 FCFCDEBodyAdditionalDutyReferences) 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 FCFCDEBodyAdditionalDutyReferences
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyAdditionalDutyReferences)
+ 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 FCFCDEBodyAdditionalDutyReferences
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBodyAdditionalDutyReferences)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBodyAdditionalDutyReferences 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 FCFCDEBodyAdditionalDutyReferences object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBodyAdditionalDutyReferences 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 FCFCDEBodyAdditionalDutyReferences, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyAdditionalDutyReferences)
+ 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 FCFCDEBodyAdditionalDutyReferences) 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 FCFCDEBodyAdditionalDutyReferences
+ 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedParty
+
+#Region "Private fields"
+ Private _identification As FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyIdentification
+
+ Private _name As String
+
+ Private _address As FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyAddress
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._address = New FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyAddress()
+ Me._identification = New FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyIdentification()
+ End Sub
+
+ Public Property Identification() As FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyIdentification
+ Get
+ Return Me._identification
+ End Get
+ Set
+ Me._identification = 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyAddress
+ 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(FCFCDEBodyAdditionalDutyReferencesDutyInterestedParty))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBodyAdditionalDutyReferencesDutyInterestedParty 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedParty object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBodyAdditionalDutyReferencesDutyInterestedParty 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedParty, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyAdditionalDutyReferencesDutyInterestedParty)
+ 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedParty) 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedParty
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyAdditionalDutyReferencesDutyInterestedParty)
+ 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedParty
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBodyAdditionalDutyReferencesDutyInterestedParty)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBodyAdditionalDutyReferencesDutyInterestedParty 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedParty object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBodyAdditionalDutyReferencesDutyInterestedParty 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedParty, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyAdditionalDutyReferencesDutyInterestedParty)
+ 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedParty) 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedParty
+ 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyIdentification
+
+#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(FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyIdentification))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyIdentification 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyIdentification object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyIdentification 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyIdentification, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyIdentification)
+ 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyIdentification) 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyIdentification
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyIdentification)
+ 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyIdentification
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyIdentification)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyIdentification 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyIdentification object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyIdentification 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyIdentification, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyIdentification)
+ 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyIdentification) 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyIdentification
+ 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyAddress
+
+#Region "Private fields"
+ Private _line As String
+
+ Private _country As String
+
+ Private _postcode As String
+
+ Private _city As String
+
+ Private _district As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property Line() As String
+ Get
+ Return Me._line
+ End Get
+ Set
+ Me._line = 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 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 District() As String
+ Get
+ Return Me._district
+ End Get
+ Set
+ Me._district = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyAddress))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyAddress 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyAddress object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyAddress 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyAddress, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyAddress)
+ 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyAddress) 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyAddress
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyAddress)
+ 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyAddress
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyAddress)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyAddress 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyAddress object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyAddress 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyAddress, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyAddress)
+ 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyAddress) 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 FCFCDEBodyAdditionalDutyReferencesDutyInterestedPartyAddress
+ 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 FCFCDEBodyContainers
+
+#Region "Private fields"
+ Private _containerFlag As String
+
+ Private _container As List(Of FCFCDEBodyContainersContainer)
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._container = New List(Of FCFCDEBodyContainersContainer)()
+ End Sub
+
+
+ Public Property ContainerFlag() As String
+ Get
+ Return Me._containerFlag
+ End Get
+ Set
+ Me._containerFlag = Value
+ End Set
+ End Property
+
+
+ Public Property Container() As List(Of FCFCDEBodyContainersContainer)
+ Get
+ Return Me._container
+ End Get
+ Set
+ Me._container = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyContainers))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBodyContainers 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 FCFCDEBodyContainers object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBodyContainers 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 FCFCDEBodyContainers, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyContainers)
+ 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 FCFCDEBodyContainers) 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 FCFCDEBodyContainers
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyContainers)
+ 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 FCFCDEBodyContainers
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBodyContainers)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBodyContainers 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 FCFCDEBodyContainers object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBodyContainers 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 FCFCDEBodyContainers, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyContainers)
+ 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 FCFCDEBodyContainers) 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 FCFCDEBodyContainers
+ 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 FCFCDEBodyContainersContainer
+
+#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(FCFCDEBodyContainersContainer))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBodyContainersContainer 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 FCFCDEBodyContainersContainer object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBodyContainersContainer 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 FCFCDEBodyContainersContainer, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyContainersContainer)
+ 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 FCFCDEBodyContainersContainer) 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 FCFCDEBodyContainersContainer
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyContainersContainer)
+ 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 FCFCDEBodyContainersContainer
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBodyContainersContainer)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBodyContainersContainer 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 FCFCDEBodyContainersContainer object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBodyContainersContainer 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 FCFCDEBodyContainersContainer, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyContainersContainer)
+ 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 FCFCDEBodyContainersContainer) 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 FCFCDEBodyContainersContainer
+ 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 FCFCDEBodyDeliveryTerms
+
+#Region "Private fields"
+ Private _code As String
+
+ Private _description As String
+
+ Private _place As String
+
+ Private _key As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property Code() As String
+ Get
+ Return Me._code
+ End Get
+ Set
+ Me._code = Value
+ End Set
+ End Property
+
+
+ Public Property Description() As String
+ Get
+ Return Me._description
+ End Get
+ Set
+ Me._description = Value
+ End Set
+ End Property
+
+
+ Public Property Place() As String
+ Get
+ Return Me._place
+ End Get
+ Set
+ Me._place = Value
+ End Set
+ End Property
+
+
+ Public Property Key() As String
+ Get
+ Return Me._key
+ End Get
+ Set
+ Me._key = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyDeliveryTerms))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBodyDeliveryTerms 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 FCFCDEBodyDeliveryTerms object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBodyDeliveryTerms 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 FCFCDEBodyDeliveryTerms, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyDeliveryTerms)
+ 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 FCFCDEBodyDeliveryTerms) 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 FCFCDEBodyDeliveryTerms
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyDeliveryTerms)
+ 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 FCFCDEBodyDeliveryTerms
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBodyDeliveryTerms)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBodyDeliveryTerms 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 FCFCDEBodyDeliveryTerms object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBodyDeliveryTerms 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 FCFCDEBodyDeliveryTerms, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyDeliveryTerms)
+ 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 FCFCDEBodyDeliveryTerms) 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 FCFCDEBodyDeliveryTerms
+ 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 FCFCDEBodyPaymentTransaction
+
+#Region "Private fields"
+ Private _amount As Decimal
+
+ Private _currencyCode As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Property Amount() As Decimal
+ Get
+ Return Me._amount
+ End Get
+ Set
+ Me._amount = Value
+ End Set
+ End Property
+
+
+ Public Property CurrencyCode() As String
+ Get
+ Return Me._currencyCode
+ End Get
+ Set
+ Me._currencyCode = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyPaymentTransaction))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBodyPaymentTransaction 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 FCFCDEBodyPaymentTransaction object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBodyPaymentTransaction 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 FCFCDEBodyPaymentTransaction, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyPaymentTransaction)
+ 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 FCFCDEBodyPaymentTransaction) 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 FCFCDEBodyPaymentTransaction
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyPaymentTransaction)
+ 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 FCFCDEBodyPaymentTransaction
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBodyPaymentTransaction)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBodyPaymentTransaction 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 FCFCDEBodyPaymentTransaction object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBodyPaymentTransaction 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 FCFCDEBodyPaymentTransaction, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyPaymentTransaction)
+ 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 FCFCDEBodyPaymentTransaction) 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 FCFCDEBodyPaymentTransaction
+ 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 FCFCDEBodyForeignTradeStatistics
+
+#Region "Private fields"
+ Private _goodsStatus As String
+
+ Private _transactionType As String
+
+ Private _destinationCountry As String
+
+ Private _destinationFederalState As String
+
+ Private _inlandTransportMode As String
+
+ Private _totalGrossMassMeasure As Decimal
+
+ Private _entryCustomsOffice As FCFCDEBodyForeignTradeStatisticsEntryCustomsOffice
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._entryCustomsOffice = New FCFCDEBodyForeignTradeStatisticsEntryCustomsOffice()
+ End Sub
+
+
+ Public Property GoodsStatus() As String
+ Get
+ Return Me._goodsStatus
+ End Get
+ Set
+ Me._goodsStatus = Value
+ End Set
+ End Property
+
+
+ Public Property TransactionType() As String
+ Get
+ Return Me._transactionType
+ End Get
+ Set
+ Me._transactionType = Value
+ End Set
+ End Property
+
+
+ Public Property DestinationCountry() As String
+ Get
+ Return Me._destinationCountry
+ End Get
+ Set
+ Me._destinationCountry = Value
+ End Set
+ End Property
+
+
+ Public Property DestinationFederalState() As String
+ Get
+ Return Me._destinationFederalState
+ End Get
+ Set
+ Me._destinationFederalState = Value
+ End Set
+ End Property
+
+
+ Public Property InlandTransportMode() As String
+ Get
+ Return Me._inlandTransportMode
+ End Get
+ Set
+ Me._inlandTransportMode = Value
+ End Set
+ End Property
+
+ Public Property TotalGrossMassMeasure() As Decimal
+ Get
+ Return Me._totalGrossMassMeasure
+ End Get
+ Set
+ Me._totalGrossMassMeasure = Value
+ End Set
+ End Property
+
+ Public Property EntryCustomsOffice() As FCFCDEBodyForeignTradeStatisticsEntryCustomsOffice
+ Get
+ Return Me._entryCustomsOffice
+ End Get
+ Set
+ Me._entryCustomsOffice = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyForeignTradeStatistics))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBodyForeignTradeStatistics 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 FCFCDEBodyForeignTradeStatistics object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBodyForeignTradeStatistics 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 FCFCDEBodyForeignTradeStatistics, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyForeignTradeStatistics)
+ 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 FCFCDEBodyForeignTradeStatistics) 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 FCFCDEBodyForeignTradeStatistics
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyForeignTradeStatistics)
+ 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 FCFCDEBodyForeignTradeStatistics
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBodyForeignTradeStatistics)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBodyForeignTradeStatistics 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 FCFCDEBodyForeignTradeStatistics object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBodyForeignTradeStatistics 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 FCFCDEBodyForeignTradeStatistics, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyForeignTradeStatistics)
+ 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 FCFCDEBodyForeignTradeStatistics) 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 FCFCDEBodyForeignTradeStatistics
+ 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 FCFCDEBodyForeignTradeStatisticsEntryCustomsOffice
+
+#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(FCFCDEBodyForeignTradeStatisticsEntryCustomsOffice))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBodyForeignTradeStatisticsEntryCustomsOffice 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 FCFCDEBodyForeignTradeStatisticsEntryCustomsOffice object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBodyForeignTradeStatisticsEntryCustomsOffice 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 FCFCDEBodyForeignTradeStatisticsEntryCustomsOffice, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyForeignTradeStatisticsEntryCustomsOffice)
+ 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 FCFCDEBodyForeignTradeStatisticsEntryCustomsOffice) 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 FCFCDEBodyForeignTradeStatisticsEntryCustomsOffice
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyForeignTradeStatisticsEntryCustomsOffice)
+ 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 FCFCDEBodyForeignTradeStatisticsEntryCustomsOffice
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBodyForeignTradeStatisticsEntryCustomsOffice)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBodyForeignTradeStatisticsEntryCustomsOffice 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 FCFCDEBodyForeignTradeStatisticsEntryCustomsOffice object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBodyForeignTradeStatisticsEntryCustomsOffice 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 FCFCDEBodyForeignTradeStatisticsEntryCustomsOffice, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyForeignTradeStatisticsEntryCustomsOffice)
+ 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 FCFCDEBodyForeignTradeStatisticsEntryCustomsOffice) 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 FCFCDEBodyForeignTradeStatisticsEntryCustomsOffice
+ 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 FCFCDEBodyCustomsValue
+
+#Region "Private fields"
+ Private _formerDecisions As String
+
+ Private _vendor As FCFCDEBodyCustomsValueVendor
+
+ Private _vendee As FCFCDEBodyCustomsValueVendee
+
+ Private _affiliation As FCFCDEBodyCustomsValueAffiliation
+
+ Private _restrictionOrCondition As FCFCDEBodyCustomsValueRestrictionOrCondition
+
+ Private _licenseFee As FCFCDEBodyCustomsValueLicenseFee
+
+ Private _resale As FCFCDEBodyCustomsValueResale
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._resale = New FCFCDEBodyCustomsValueResale()
+ Me._licenseFee = New FCFCDEBodyCustomsValueLicenseFee()
+ Me._restrictionOrCondition = New FCFCDEBodyCustomsValueRestrictionOrCondition()
+ Me._affiliation = New FCFCDEBodyCustomsValueAffiliation()
+ Me._vendee = New FCFCDEBodyCustomsValueVendee()
+ Me._vendor = New FCFCDEBodyCustomsValueVendor()
+ End Sub
+
+
+ Public Property FormerDecisions() As String
+ Get
+ Return Me._formerDecisions
+ End Get
+ Set
+ Me._formerDecisions = Value
+ End Set
+ End Property
+
+ Public Property Vendor() As FCFCDEBodyCustomsValueVendor
+ Get
+ Return Me._vendor
+ End Get
+ Set
+ Me._vendor = Value
+ End Set
+ End Property
+
+ Public Property Vendee() As FCFCDEBodyCustomsValueVendee
+ Get
+ Return Me._vendee
+ End Get
+ Set
+ Me._vendee = Value
+ End Set
+ End Property
+
+ Public Property Affiliation() As FCFCDEBodyCustomsValueAffiliation
+ Get
+ Return Me._affiliation
+ End Get
+ Set
+ Me._affiliation = Value
+ End Set
+ End Property
+
+ Public Property RestrictionOrCondition() As FCFCDEBodyCustomsValueRestrictionOrCondition
+ Get
+ Return Me._restrictionOrCondition
+ End Get
+ Set
+ Me._restrictionOrCondition = Value
+ End Set
+ End Property
+
+ Public Property LicenseFee() As FCFCDEBodyCustomsValueLicenseFee
+ Get
+ Return Me._licenseFee
+ End Get
+ Set
+ Me._licenseFee = Value
+ End Set
+ End Property
+
+ Public Property Resale() As FCFCDEBodyCustomsValueResale
+ Get
+ Return Me._resale
+ End Get
+ Set
+ Me._resale = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyCustomsValue))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBodyCustomsValue 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 FCFCDEBodyCustomsValue object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBodyCustomsValue 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 FCFCDEBodyCustomsValue, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyCustomsValue)
+ 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 FCFCDEBodyCustomsValue) 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 FCFCDEBodyCustomsValue
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyCustomsValue)
+ 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 FCFCDEBodyCustomsValue
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBodyCustomsValue)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBodyCustomsValue 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 FCFCDEBodyCustomsValue object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBodyCustomsValue 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 FCFCDEBodyCustomsValue, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyCustomsValue)
+ 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 FCFCDEBodyCustomsValue) 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 FCFCDEBodyCustomsValue
+ 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 FCFCDEBodyCustomsValueVendor
+
+#Region "Private fields"
+ Private _identification As FCFCDEBodyCustomsValueVendorIdentification
+
+ Private _name As String
+
+ Private _address As FCFCDEBodyCustomsValueVendorAddress
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._address = New FCFCDEBodyCustomsValueVendorAddress()
+ Me._identification = New FCFCDEBodyCustomsValueVendorIdentification()
+ End Sub
+
+ Public Property Identification() As FCFCDEBodyCustomsValueVendorIdentification
+ Get
+ Return Me._identification
+ End Get
+ Set
+ Me._identification = 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 FCFCDEBodyCustomsValueVendorAddress
+ 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(FCFCDEBodyCustomsValueVendor))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBodyCustomsValueVendor 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 FCFCDEBodyCustomsValueVendor object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBodyCustomsValueVendor 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 FCFCDEBodyCustomsValueVendor, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyCustomsValueVendor)
+ 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 FCFCDEBodyCustomsValueVendor) 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 FCFCDEBodyCustomsValueVendor
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyCustomsValueVendor)
+ 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 FCFCDEBodyCustomsValueVendor
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBodyCustomsValueVendor)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBodyCustomsValueVendor 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 FCFCDEBodyCustomsValueVendor object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBodyCustomsValueVendor 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 FCFCDEBodyCustomsValueVendor, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyCustomsValueVendor)
+ 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 FCFCDEBodyCustomsValueVendor) 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 FCFCDEBodyCustomsValueVendor
+ 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 FCFCDEBodyCustomsValueVendorIdentification
+
+#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(FCFCDEBodyCustomsValueVendorIdentification))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBodyCustomsValueVendorIdentification 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 FCFCDEBodyCustomsValueVendorIdentification object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBodyCustomsValueVendorIdentification 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 FCFCDEBodyCustomsValueVendorIdentification, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyCustomsValueVendorIdentification)
+ 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 FCFCDEBodyCustomsValueVendorIdentification) 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 FCFCDEBodyCustomsValueVendorIdentification
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyCustomsValueVendorIdentification)
+ 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 FCFCDEBodyCustomsValueVendorIdentification
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBodyCustomsValueVendorIdentification)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBodyCustomsValueVendorIdentification 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 FCFCDEBodyCustomsValueVendorIdentification object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBodyCustomsValueVendorIdentification 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 FCFCDEBodyCustomsValueVendorIdentification, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyCustomsValueVendorIdentification)
+ 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 FCFCDEBodyCustomsValueVendorIdentification) 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 FCFCDEBodyCustomsValueVendorIdentification
+ 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 FCFCDEBodyCustomsValueVendorAddress
+
+#Region "Private fields"
+ Private _line As String
+
+ Private _country As String
+
+ Private _postcode As String
+
+ Private _city As String
+
+ Private _district As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property Line() As String
+ Get
+ Return Me._line
+ End Get
+ Set
+ Me._line = 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 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 District() As String
+ Get
+ Return Me._district
+ End Get
+ Set
+ Me._district = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyCustomsValueVendorAddress))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBodyCustomsValueVendorAddress 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 FCFCDEBodyCustomsValueVendorAddress object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBodyCustomsValueVendorAddress 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 FCFCDEBodyCustomsValueVendorAddress, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyCustomsValueVendorAddress)
+ 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 FCFCDEBodyCustomsValueVendorAddress) 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 FCFCDEBodyCustomsValueVendorAddress
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyCustomsValueVendorAddress)
+ 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 FCFCDEBodyCustomsValueVendorAddress
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBodyCustomsValueVendorAddress)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBodyCustomsValueVendorAddress 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 FCFCDEBodyCustomsValueVendorAddress object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBodyCustomsValueVendorAddress 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 FCFCDEBodyCustomsValueVendorAddress, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyCustomsValueVendorAddress)
+ 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 FCFCDEBodyCustomsValueVendorAddress) 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 FCFCDEBodyCustomsValueVendorAddress
+ 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 FCFCDEBodyCustomsValueVendee
+
+#Region "Private fields"
+ Private _identification As FCFCDEBodyCustomsValueVendeeIdentification
+
+ Private _name As String
+
+ Private _address As FCFCDEBodyCustomsValueVendeeAddress
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._address = New FCFCDEBodyCustomsValueVendeeAddress()
+ Me._identification = New FCFCDEBodyCustomsValueVendeeIdentification()
+ End Sub
+
+ Public Property Identification() As FCFCDEBodyCustomsValueVendeeIdentification
+ Get
+ Return Me._identification
+ End Get
+ Set
+ Me._identification = 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 FCFCDEBodyCustomsValueVendeeAddress
+ 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(FCFCDEBodyCustomsValueVendee))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBodyCustomsValueVendee 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 FCFCDEBodyCustomsValueVendee object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBodyCustomsValueVendee 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 FCFCDEBodyCustomsValueVendee, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyCustomsValueVendee)
+ 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 FCFCDEBodyCustomsValueVendee) 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 FCFCDEBodyCustomsValueVendee
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyCustomsValueVendee)
+ 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 FCFCDEBodyCustomsValueVendee
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBodyCustomsValueVendee)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBodyCustomsValueVendee 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 FCFCDEBodyCustomsValueVendee object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBodyCustomsValueVendee 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 FCFCDEBodyCustomsValueVendee, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyCustomsValueVendee)
+ 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 FCFCDEBodyCustomsValueVendee) 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 FCFCDEBodyCustomsValueVendee
+ 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 FCFCDEBodyCustomsValueVendeeIdentification
+
+#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(FCFCDEBodyCustomsValueVendeeIdentification))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBodyCustomsValueVendeeIdentification 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 FCFCDEBodyCustomsValueVendeeIdentification object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBodyCustomsValueVendeeIdentification 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 FCFCDEBodyCustomsValueVendeeIdentification, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyCustomsValueVendeeIdentification)
+ 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 FCFCDEBodyCustomsValueVendeeIdentification) 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 FCFCDEBodyCustomsValueVendeeIdentification
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyCustomsValueVendeeIdentification)
+ 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 FCFCDEBodyCustomsValueVendeeIdentification
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBodyCustomsValueVendeeIdentification)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBodyCustomsValueVendeeIdentification 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 FCFCDEBodyCustomsValueVendeeIdentification object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBodyCustomsValueVendeeIdentification 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 FCFCDEBodyCustomsValueVendeeIdentification, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyCustomsValueVendeeIdentification)
+ 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 FCFCDEBodyCustomsValueVendeeIdentification) 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 FCFCDEBodyCustomsValueVendeeIdentification
+ 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 FCFCDEBodyCustomsValueVendeeAddress
+
+#Region "Private fields"
+ Private _line As String
+
+ Private _country As String
+
+ Private _postcode As String
+
+ Private _city As String
+
+ Private _district As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property Line() As String
+ Get
+ Return Me._line
+ End Get
+ Set
+ Me._line = 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 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 District() As String
+ Get
+ Return Me._district
+ End Get
+ Set
+ Me._district = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyCustomsValueVendeeAddress))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBodyCustomsValueVendeeAddress 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 FCFCDEBodyCustomsValueVendeeAddress object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBodyCustomsValueVendeeAddress 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 FCFCDEBodyCustomsValueVendeeAddress, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyCustomsValueVendeeAddress)
+ 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 FCFCDEBodyCustomsValueVendeeAddress) 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 FCFCDEBodyCustomsValueVendeeAddress
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyCustomsValueVendeeAddress)
+ 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 FCFCDEBodyCustomsValueVendeeAddress
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBodyCustomsValueVendeeAddress)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBodyCustomsValueVendeeAddress 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 FCFCDEBodyCustomsValueVendeeAddress object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBodyCustomsValueVendeeAddress 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 FCFCDEBodyCustomsValueVendeeAddress, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyCustomsValueVendeeAddress)
+ 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 FCFCDEBodyCustomsValueVendeeAddress) 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 FCFCDEBodyCustomsValueVendeeAddress
+ 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 FCFCDEBodyCustomsValueAffiliation
+
+#Region "Private fields"
+ Private _type As String
+
+ Private _description As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property Type() As String
+ Get
+ Return Me._type
+ End Get
+ Set
+ Me._type = Value
+ End Set
+ End Property
+
+
+ Public Property Description() As String
+ Get
+ Return Me._description
+ End Get
+ Set
+ Me._description = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyCustomsValueAffiliation))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBodyCustomsValueAffiliation 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 FCFCDEBodyCustomsValueAffiliation object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBodyCustomsValueAffiliation 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 FCFCDEBodyCustomsValueAffiliation, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyCustomsValueAffiliation)
+ 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 FCFCDEBodyCustomsValueAffiliation) 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 FCFCDEBodyCustomsValueAffiliation
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyCustomsValueAffiliation)
+ 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 FCFCDEBodyCustomsValueAffiliation
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBodyCustomsValueAffiliation)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBodyCustomsValueAffiliation 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 FCFCDEBodyCustomsValueAffiliation object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBodyCustomsValueAffiliation 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 FCFCDEBodyCustomsValueAffiliation, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyCustomsValueAffiliation)
+ 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 FCFCDEBodyCustomsValueAffiliation) 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 FCFCDEBodyCustomsValueAffiliation
+ 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 FCFCDEBodyCustomsValueRestrictionOrCondition
+
+#Region "Private fields"
+ Private _restrictionFlag As String
+
+ Private _conditionFlag As String
+
+ Private _description As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property RestrictionFlag() As String
+ Get
+ Return Me._restrictionFlag
+ End Get
+ Set
+ Me._restrictionFlag = Value
+ End Set
+ End Property
+
+
+ Public Property ConditionFlag() As String
+ Get
+ Return Me._conditionFlag
+ End Get
+ Set
+ Me._conditionFlag = Value
+ End Set
+ End Property
+
+
+ Public Property Description() As String
+ Get
+ Return Me._description
+ End Get
+ Set
+ Me._description = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyCustomsValueRestrictionOrCondition))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBodyCustomsValueRestrictionOrCondition 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 FCFCDEBodyCustomsValueRestrictionOrCondition object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBodyCustomsValueRestrictionOrCondition 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 FCFCDEBodyCustomsValueRestrictionOrCondition, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyCustomsValueRestrictionOrCondition)
+ 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 FCFCDEBodyCustomsValueRestrictionOrCondition) 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 FCFCDEBodyCustomsValueRestrictionOrCondition
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyCustomsValueRestrictionOrCondition)
+ 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 FCFCDEBodyCustomsValueRestrictionOrCondition
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBodyCustomsValueRestrictionOrCondition)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBodyCustomsValueRestrictionOrCondition 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 FCFCDEBodyCustomsValueRestrictionOrCondition object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBodyCustomsValueRestrictionOrCondition 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 FCFCDEBodyCustomsValueRestrictionOrCondition, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyCustomsValueRestrictionOrCondition)
+ 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 FCFCDEBodyCustomsValueRestrictionOrCondition) 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 FCFCDEBodyCustomsValueRestrictionOrCondition
+ 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 FCFCDEBodyCustomsValueLicenseFee
+
+#Region "Private fields"
+ Private _licenseFeeFlag As String
+
+ Private _description As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property LicenseFeeFlag() As String
+ Get
+ Return Me._licenseFeeFlag
+ End Get
+ Set
+ Me._licenseFeeFlag = Value
+ End Set
+ End Property
+
+
+ Public Property Description() As String
+ Get
+ Return Me._description
+ End Get
+ Set
+ Me._description = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyCustomsValueLicenseFee))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBodyCustomsValueLicenseFee 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 FCFCDEBodyCustomsValueLicenseFee object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBodyCustomsValueLicenseFee 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 FCFCDEBodyCustomsValueLicenseFee, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyCustomsValueLicenseFee)
+ 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 FCFCDEBodyCustomsValueLicenseFee) 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 FCFCDEBodyCustomsValueLicenseFee
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyCustomsValueLicenseFee)
+ 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 FCFCDEBodyCustomsValueLicenseFee
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBodyCustomsValueLicenseFee)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBodyCustomsValueLicenseFee 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 FCFCDEBodyCustomsValueLicenseFee object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBodyCustomsValueLicenseFee 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 FCFCDEBodyCustomsValueLicenseFee, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyCustomsValueLicenseFee)
+ 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 FCFCDEBodyCustomsValueLicenseFee) 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 FCFCDEBodyCustomsValueLicenseFee
+ 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 FCFCDEBodyCustomsValueResale
+
+#Region "Private fields"
+ Private _resaleFlag As String
+
+ Private _description As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property ResaleFlag() As String
+ Get
+ Return Me._resaleFlag
+ End Get
+ Set
+ Me._resaleFlag = Value
+ End Set
+ End Property
+
+
+ Public Property Description() As String
+ Get
+ Return Me._description
+ End Get
+ Set
+ Me._description = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyCustomsValueResale))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBodyCustomsValueResale 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 FCFCDEBodyCustomsValueResale object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBodyCustomsValueResale 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 FCFCDEBodyCustomsValueResale, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyCustomsValueResale)
+ 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 FCFCDEBodyCustomsValueResale) 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 FCFCDEBodyCustomsValueResale
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyCustomsValueResale)
+ 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 FCFCDEBodyCustomsValueResale
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBodyCustomsValueResale)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBodyCustomsValueResale 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 FCFCDEBodyCustomsValueResale object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBodyCustomsValueResale 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 FCFCDEBodyCustomsValueResale, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyCustomsValueResale)
+ 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 FCFCDEBodyCustomsValueResale) 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 FCFCDEBodyCustomsValueResale
+ 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 FCFCDEBodyDocument
+
+#Region "Private fields"
+ Private _division As FCFCDEBodyDocumentDivision
+
+ Private _type As String
+
+ Private _referenceNumber As String
+
+ Private _issuingDate As Date
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Property Division() As FCFCDEBodyDocumentDivision
+ Get
+ Return Me._division
+ End Get
+ Set
+ Me._division = 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 IssuingDate() As Date
+ Get
+ Return Me._issuingDate
+ End Get
+ Set
+ Me._issuingDate = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyDocument))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize FCFCDEBodyDocument 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 FCFCDEBodyDocument object
+ '''
+ ''' string to deserialize
+ ''' Output FCFCDEBodyDocument 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 FCFCDEBodyDocument, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyDocument)
+ 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 FCFCDEBodyDocument) 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 FCFCDEBodyDocument
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyDocument)
+ 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 FCFCDEBodyDocument
+ Return CType(SerializerXml.Deserialize(s), FCFCDEBodyDocument)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current FCFCDEBodyDocument 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 FCFCDEBodyDocument object
+ '''
+ ''' File to load and deserialize
+ ''' Output FCFCDEBodyDocument 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 FCFCDEBodyDocument, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, FCFCDEBodyDocument)
+ 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 FCFCDEBodyDocument) 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 FCFCDEBodyDocument
+ 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 FCFCDEBodyDocumentDivision
+
+
+ Item4
+ End Enum
+
+
+ Partial Public Class FCFCDEBodyGoodsItem
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _procedure As FCFCDEBodyGoodsItemProcedure
+
+ Private _cessionManagementFlag As String
+
+ Private _goodsDescription As String
+
+ Private _invoiceAmount As Decimal
+
+ Private _netMassMeasure As Decimal
+
+ Private _originCountry As String
+
+ Private _preferentialOriginCountry As String
+
+ Private _supplementaryInformation As String
+
+ Private _condition As String
+
+ Private _tobaccoRevenueStampNumber As String
+
+ Private _commodityCode As FCFCDEBodyGoodsItemCommodityCode
+
+ Private _additionalProcedure As List(Of FCFCDEBodyGoodsItemAdditionalProcedure)
+
+ Private _supplementaryCodes As List(Of FCFCDEBodyGoodsItemSupplementaryCodes)
+
+ Private _package As FCFCDEBodyGoodsItemPackage
+
+ Private _foreignTradeStatistics As FCFCDEBodyGoodsItemForeignTradeStatistics
+
+ Private _customsValue As FCFCDEBodyGoodsItemCustomsValue
+
+ Private _assessment As FCFCDEBodyGoodsItemAssessment
+
+ Private _exciseDuty As List(Of FCFCDEBodyGoodsItemExciseDuty)
+
+ Private _preferentialTreatment As FCFCDEBodyGoodsItemPreferentialTreatment
+
+ Private _specialCase As List(Of FCFCDEBodyGoodsItemSpecialCase)
+
+ Private _document As List(Of FCFCDEBodyGoodsItemDocument)
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._document = New List(Of FCFCDEBodyGoodsItemDocument)()
+ Me._specialCase = New List(Of FCFCDEBodyGoodsItemSpecialCase)()
+ Me._preferentialTreatment = New FCFCDEBodyGoodsItemPreferentialTreatment()
+ Me._exciseDuty = New List(Of FCFCDEBodyGoodsItemExciseDuty)()
+ Me._assessment = New FCFCDEBodyGoodsItemAssessment()
+ Me._customsValue = New FCFCDEBodyGoodsItemCustomsValue()
+ Me._foreignTradeStatistics = New FCFCDEBodyGoodsItemForeignTradeStatistics()
+ Me._package = New FCFCDEBodyGoodsItemPackage()
+ Me._supplementaryCodes = New List(Of FCFCDEBodyGoodsItemSupplementaryCodes)()
+ Me._additionalProcedure = New List(Of FCFCDEBodyGoodsItemAdditionalProcedure)()
+ Me._commodityCode = New FCFCDEBodyGoodsItemCommodityCode()
+ Me._procedure = New FCFCDEBodyGoodsItemProcedure()
+ End Sub
+
+
+ Public Property SequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+ Public Property Procedure() As FCFCDEBodyGoodsItemProcedure
+ Get
+ Return Me._procedure
+ End Get
+ Set
+ Me._procedure = Value
+ End Set
+ End Property
+
+
+ Public Property CessionManagementFlag() As String
+ Get
+ Return Me._cessionManagementFlag
+ End Get
+ Set
+ Me._cessionManagementFlag = Value
+ End Set
+ End Property
+
+
+ Public Property GoodsDescription() As String
+ Get
+ Return Me._goodsDescription
+ End Get
+ Set
+ Me._goodsDescription = Value
+ End Set
+ End Property
+
+ Public Property InvoiceAmount() As Decimal
+ Get
+ Return Me._invoiceAmount
+ End Get
+ Set
+ Me._invoiceAmount = Value
+ End Set
+ End Property
+
+ Public Property NetMassMeasure() As Decimal
+ Get
+ Return Me._netMassMeasure
+ End Get
+ Set
+ Me._netMassMeasure = Value
+ End Set
+ End Property
+
+
+ Public Property OriginCountry() As String
+ Get
+ Return Me._originCountry
+ End Get
+ Set
+ Me._originCountry = Value
+ End Set
+ End Property
+
+
+ Public Property PreferentialOriginCountry() As String
+ Get
+ Return Me._preferentialOriginCountry
+ End Get
+ Set
+ Me._preferentialOriginCountry = Value
+ End Set
+ End Property
+
+
+ Public Property SupplementaryInformation() As String
+ Get
+ Return Me._supplementaryInformation
+ End Get
+ Set
+ Me._supplementaryInformation = Value
+ End Set
+ End Property
+
+
+ Public Property Condition() As String
+ Get
+ Return Me._condition
+ End Get
+ Set
+ Me._condition = Value
+ End Set
+ End Property
+
+