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 + + + Public Property TobaccoRevenueStampNumber() As String + Get + Return Me._tobaccoRevenueStampNumber + End Get + Set + Me._tobaccoRevenueStampNumber = Value + End Set + End Property + + Public Property CommodityCode() As FCFCDEBodyGoodsItemCommodityCode + Get + Return Me._commodityCode + End Get + Set + Me._commodityCode = Value + End Set + End Property + + + Public Property AdditionalProcedure() As List(Of FCFCDEBodyGoodsItemAdditionalProcedure) + Get + Return Me._additionalProcedure + End Get + Set + Me._additionalProcedure = Value + End Set + End Property + + + Public Property SupplementaryCodes() As List(Of FCFCDEBodyGoodsItemSupplementaryCodes) + Get + Return Me._supplementaryCodes + End Get + Set + Me._supplementaryCodes = Value + End Set + End Property + + Public Property Package() As FCFCDEBodyGoodsItemPackage + Get + Return Me._package + End Get + Set + Me._package = Value + End Set + End Property + + Public Property ForeignTradeStatistics() As FCFCDEBodyGoodsItemForeignTradeStatistics + Get + Return Me._foreignTradeStatistics + End Get + Set + Me._foreignTradeStatistics = Value + End Set + End Property + + Public Property CustomsValue() As FCFCDEBodyGoodsItemCustomsValue + Get + Return Me._customsValue + End Get + Set + Me._customsValue = Value + End Set + End Property + + Public Property Assessment() As FCFCDEBodyGoodsItemAssessment + Get + Return Me._assessment + End Get + Set + Me._assessment = Value + End Set + End Property + + + Public Property ExciseDuty() As List(Of FCFCDEBodyGoodsItemExciseDuty) + Get + Return Me._exciseDuty + End Get + Set + Me._exciseDuty = Value + End Set + End Property + + Public Property PreferentialTreatment() As FCFCDEBodyGoodsItemPreferentialTreatment + Get + Return Me._preferentialTreatment + End Get + Set + Me._preferentialTreatment = Value + End Set + End Property + + + Public Property SpecialCase() As List(Of FCFCDEBodyGoodsItemSpecialCase) + Get + Return Me._specialCase + End Get + Set + Me._specialCase = Value + End Set + End Property + + + Public Property Document() As List(Of FCFCDEBodyGoodsItemDocument) + Get + Return Me._document + End Get + Set + Me._document = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyGoodsItem)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FCFCDEBodyGoodsItem 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 FCFCDEBodyGoodsItem object + ''' + ''' string to deserialize + ''' Output FCFCDEBodyGoodsItem 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 FCFCDEBodyGoodsItem, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItem) + 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 FCFCDEBodyGoodsItem) 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 FCFCDEBodyGoodsItem + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyGoodsItem) + 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 FCFCDEBodyGoodsItem + Return CType(SerializerXml.Deserialize(s), FCFCDEBodyGoodsItem) + End Function +#End Region + + ''' + ''' Serializes current FCFCDEBodyGoodsItem 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 FCFCDEBodyGoodsItem object + ''' + ''' File to load and deserialize + ''' Output FCFCDEBodyGoodsItem 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 FCFCDEBodyGoodsItem, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItem) + 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 FCFCDEBodyGoodsItem) 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 FCFCDEBodyGoodsItem + 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 FCFCDEBodyGoodsItemProcedure + +#Region "Private fields" + Private _requestedPreviousProcedure As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property RequestedPreviousProcedure() As String + Get + Return Me._requestedPreviousProcedure + End Get + Set + Me._requestedPreviousProcedure = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyGoodsItemProcedure)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FCFCDEBodyGoodsItemProcedure 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 FCFCDEBodyGoodsItemProcedure object + ''' + ''' string to deserialize + ''' Output FCFCDEBodyGoodsItemProcedure 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 FCFCDEBodyGoodsItemProcedure, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemProcedure) + 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 FCFCDEBodyGoodsItemProcedure) 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 FCFCDEBodyGoodsItemProcedure + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyGoodsItemProcedure) + 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 FCFCDEBodyGoodsItemProcedure + Return CType(SerializerXml.Deserialize(s), FCFCDEBodyGoodsItemProcedure) + End Function +#End Region + + ''' + ''' Serializes current FCFCDEBodyGoodsItemProcedure 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 FCFCDEBodyGoodsItemProcedure object + ''' + ''' File to load and deserialize + ''' Output FCFCDEBodyGoodsItemProcedure 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 FCFCDEBodyGoodsItemProcedure, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemProcedure) + 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 FCFCDEBodyGoodsItemProcedure) 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 FCFCDEBodyGoodsItemProcedure + 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 FCFCDEBodyGoodsItemCommodityCode + +#Region "Private fields" + Private _commodityCode As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property CommodityCode() As String + Get + Return Me._commodityCode + End Get + Set + Me._commodityCode = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyGoodsItemCommodityCode)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FCFCDEBodyGoodsItemCommodityCode 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 FCFCDEBodyGoodsItemCommodityCode object + ''' + ''' string to deserialize + ''' Output FCFCDEBodyGoodsItemCommodityCode 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 FCFCDEBodyGoodsItemCommodityCode, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemCommodityCode) + 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 FCFCDEBodyGoodsItemCommodityCode) 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 FCFCDEBodyGoodsItemCommodityCode + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyGoodsItemCommodityCode) + 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 FCFCDEBodyGoodsItemCommodityCode + Return CType(SerializerXml.Deserialize(s), FCFCDEBodyGoodsItemCommodityCode) + End Function +#End Region + + ''' + ''' Serializes current FCFCDEBodyGoodsItemCommodityCode 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 FCFCDEBodyGoodsItemCommodityCode object + ''' + ''' File to load and deserialize + ''' Output FCFCDEBodyGoodsItemCommodityCode 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 FCFCDEBodyGoodsItemCommodityCode, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemCommodityCode) + 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 FCFCDEBodyGoodsItemCommodityCode) 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 FCFCDEBodyGoodsItemCommodityCode + 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 FCFCDEBodyGoodsItemAdditionalProcedure + +#Region "Private fields" + Private _code 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 + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyGoodsItemAdditionalProcedure)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FCFCDEBodyGoodsItemAdditionalProcedure 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 FCFCDEBodyGoodsItemAdditionalProcedure object + ''' + ''' string to deserialize + ''' Output FCFCDEBodyGoodsItemAdditionalProcedure 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 FCFCDEBodyGoodsItemAdditionalProcedure, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemAdditionalProcedure) + 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 FCFCDEBodyGoodsItemAdditionalProcedure) 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 FCFCDEBodyGoodsItemAdditionalProcedure + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyGoodsItemAdditionalProcedure) + 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 FCFCDEBodyGoodsItemAdditionalProcedure + Return CType(SerializerXml.Deserialize(s), FCFCDEBodyGoodsItemAdditionalProcedure) + End Function +#End Region + + ''' + ''' Serializes current FCFCDEBodyGoodsItemAdditionalProcedure 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 FCFCDEBodyGoodsItemAdditionalProcedure object + ''' + ''' File to load and deserialize + ''' Output FCFCDEBodyGoodsItemAdditionalProcedure 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 FCFCDEBodyGoodsItemAdditionalProcedure, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemAdditionalProcedure) + 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 FCFCDEBodyGoodsItemAdditionalProcedure) 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 FCFCDEBodyGoodsItemAdditionalProcedure + 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 FCFCDEBodyGoodsItemSupplementaryCodes + +#Region "Private fields" + Private _code 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 + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyGoodsItemSupplementaryCodes)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FCFCDEBodyGoodsItemSupplementaryCodes 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 FCFCDEBodyGoodsItemSupplementaryCodes object + ''' + ''' string to deserialize + ''' Output FCFCDEBodyGoodsItemSupplementaryCodes 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 FCFCDEBodyGoodsItemSupplementaryCodes, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemSupplementaryCodes) + 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 FCFCDEBodyGoodsItemSupplementaryCodes) 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 FCFCDEBodyGoodsItemSupplementaryCodes + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyGoodsItemSupplementaryCodes) + 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 FCFCDEBodyGoodsItemSupplementaryCodes + Return CType(SerializerXml.Deserialize(s), FCFCDEBodyGoodsItemSupplementaryCodes) + End Function +#End Region + + ''' + ''' Serializes current FCFCDEBodyGoodsItemSupplementaryCodes 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 FCFCDEBodyGoodsItemSupplementaryCodes object + ''' + ''' File to load and deserialize + ''' Output FCFCDEBodyGoodsItemSupplementaryCodes 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 FCFCDEBodyGoodsItemSupplementaryCodes, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemSupplementaryCodes) + 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 FCFCDEBodyGoodsItemSupplementaryCodes) 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 FCFCDEBodyGoodsItemSupplementaryCodes + 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 FCFCDEBodyGoodsItemPackage + +#Region "Private fields" + Private _kind As String + + Private _quantity As String + + Private _marksNumbers As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Kind() As String + Get + Return Me._kind + End Get + Set + Me._kind = Value + End Set + End Property + + + Public Property Quantity() As String + Get + Return Me._quantity + End Get + Set + Me._quantity = Value + End Set + End Property + + + Public Property MarksNumbers() As String + Get + Return Me._marksNumbers + End Get + Set + Me._marksNumbers = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyGoodsItemPackage)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FCFCDEBodyGoodsItemPackage 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 FCFCDEBodyGoodsItemPackage object + ''' + ''' string to deserialize + ''' Output FCFCDEBodyGoodsItemPackage 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 FCFCDEBodyGoodsItemPackage, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemPackage) + 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 FCFCDEBodyGoodsItemPackage) 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 FCFCDEBodyGoodsItemPackage + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyGoodsItemPackage) + 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 FCFCDEBodyGoodsItemPackage + Return CType(SerializerXml.Deserialize(s), FCFCDEBodyGoodsItemPackage) + End Function +#End Region + + ''' + ''' Serializes current FCFCDEBodyGoodsItemPackage 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 FCFCDEBodyGoodsItemPackage object + ''' + ''' File to load and deserialize + ''' Output FCFCDEBodyGoodsItemPackage 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 FCFCDEBodyGoodsItemPackage, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemPackage) + 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 FCFCDEBodyGoodsItemPackage) 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 FCFCDEBodyGoodsItemPackage + 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 FCFCDEBodyGoodsItemForeignTradeStatistics + +#Region "Private fields" + Private _quantity As String + + Private _grossMassMeasure As Decimal + + Private _amount As FCFCDEBodyGoodsItemForeignTradeStatisticsAmount + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._amount = New FCFCDEBodyGoodsItemForeignTradeStatisticsAmount() + End Sub + + + Public Property Quantity() As String + Get + Return Me._quantity + End Get + Set + Me._quantity = Value + End Set + End Property + + Public Property GrossMassMeasure() As Decimal + Get + Return Me._grossMassMeasure + End Get + Set + Me._grossMassMeasure = Value + End Set + End Property + + Public Property Amount() As FCFCDEBodyGoodsItemForeignTradeStatisticsAmount + Get + Return Me._amount + End Get + Set + Me._amount = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyGoodsItemForeignTradeStatistics)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FCFCDEBodyGoodsItemForeignTradeStatistics 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 FCFCDEBodyGoodsItemForeignTradeStatistics object + ''' + ''' string to deserialize + ''' Output FCFCDEBodyGoodsItemForeignTradeStatistics 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 FCFCDEBodyGoodsItemForeignTradeStatistics, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemForeignTradeStatistics) + 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 FCFCDEBodyGoodsItemForeignTradeStatistics) 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 FCFCDEBodyGoodsItemForeignTradeStatistics + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyGoodsItemForeignTradeStatistics) + 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 FCFCDEBodyGoodsItemForeignTradeStatistics + Return CType(SerializerXml.Deserialize(s), FCFCDEBodyGoodsItemForeignTradeStatistics) + End Function +#End Region + + ''' + ''' Serializes current FCFCDEBodyGoodsItemForeignTradeStatistics 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 FCFCDEBodyGoodsItemForeignTradeStatistics object + ''' + ''' File to load and deserialize + ''' Output FCFCDEBodyGoodsItemForeignTradeStatistics 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 FCFCDEBodyGoodsItemForeignTradeStatistics, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemForeignTradeStatistics) + 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 FCFCDEBodyGoodsItemForeignTradeStatistics) 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 FCFCDEBodyGoodsItemForeignTradeStatistics + 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 FCFCDEBodyGoodsItemForeignTradeStatisticsAmount + +#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(FCFCDEBodyGoodsItemForeignTradeStatisticsAmount)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FCFCDEBodyGoodsItemForeignTradeStatisticsAmount 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 FCFCDEBodyGoodsItemForeignTradeStatisticsAmount object + ''' + ''' string to deserialize + ''' Output FCFCDEBodyGoodsItemForeignTradeStatisticsAmount 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 FCFCDEBodyGoodsItemForeignTradeStatisticsAmount, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemForeignTradeStatisticsAmount) + 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 FCFCDEBodyGoodsItemForeignTradeStatisticsAmount) 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 FCFCDEBodyGoodsItemForeignTradeStatisticsAmount + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyGoodsItemForeignTradeStatisticsAmount) + 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 FCFCDEBodyGoodsItemForeignTradeStatisticsAmount + Return CType(SerializerXml.Deserialize(s), FCFCDEBodyGoodsItemForeignTradeStatisticsAmount) + End Function +#End Region + + ''' + ''' Serializes current FCFCDEBodyGoodsItemForeignTradeStatisticsAmount 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 FCFCDEBodyGoodsItemForeignTradeStatisticsAmount object + ''' + ''' File to load and deserialize + ''' Output FCFCDEBodyGoodsItemForeignTradeStatisticsAmount 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 FCFCDEBodyGoodsItemForeignTradeStatisticsAmount, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemForeignTradeStatisticsAmount) + 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 FCFCDEBodyGoodsItemForeignTradeStatisticsAmount) 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 FCFCDEBodyGoodsItemForeignTradeStatisticsAmount + 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 FCFCDEBodyGoodsItemCustomsValue + +#Region "Private fields" + Private _departureAirport As String + + Private _destinationPlace As String + + Private _additionDeductionDescription As String + + Private _netPrice As FCFCDEBodyGoodsItemCustomsValueNetPrice + + Private _indirectPayment As FCFCDEBodyGoodsItemCustomsValueIndirectPayment + + Private _airFreightCosts As FCFCDEBodyGoodsItemCustomsValueAirFreightCosts + + Private _additionDeduction As List(Of FCFCDEBodyGoodsItemCustomsValueAdditionDeduction) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._additionDeduction = New List(Of FCFCDEBodyGoodsItemCustomsValueAdditionDeduction)() + Me._airFreightCosts = New FCFCDEBodyGoodsItemCustomsValueAirFreightCosts() + Me._indirectPayment = New FCFCDEBodyGoodsItemCustomsValueIndirectPayment() + Me._netPrice = New FCFCDEBodyGoodsItemCustomsValueNetPrice() + End Sub + + + Public Property DepartureAirport() As String + Get + Return Me._departureAirport + End Get + Set + Me._departureAirport = Value + End Set + End Property + + + Public Property DestinationPlace() As String + Get + Return Me._destinationPlace + End Get + Set + Me._destinationPlace = Value + End Set + End Property + + + Public Property AdditionDeductionDescription() As String + Get + Return Me._additionDeductionDescription + End Get + Set + Me._additionDeductionDescription = Value + End Set + End Property + + Public Property NetPrice() As FCFCDEBodyGoodsItemCustomsValueNetPrice + Get + Return Me._netPrice + End Get + Set + Me._netPrice = Value + End Set + End Property + + Public Property IndirectPayment() As FCFCDEBodyGoodsItemCustomsValueIndirectPayment + Get + Return Me._indirectPayment + End Get + Set + Me._indirectPayment = Value + End Set + End Property + + Public Property AirFreightCosts() As FCFCDEBodyGoodsItemCustomsValueAirFreightCosts + Get + Return Me._airFreightCosts + End Get + Set + Me._airFreightCosts = Value + End Set + End Property + + + Public Property AdditionDeduction() As List(Of FCFCDEBodyGoodsItemCustomsValueAdditionDeduction) + Get + Return Me._additionDeduction + End Get + Set + Me._additionDeduction = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyGoodsItemCustomsValue)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FCFCDEBodyGoodsItemCustomsValue 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 FCFCDEBodyGoodsItemCustomsValue object + ''' + ''' string to deserialize + ''' Output FCFCDEBodyGoodsItemCustomsValue 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 FCFCDEBodyGoodsItemCustomsValue, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemCustomsValue) + 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 FCFCDEBodyGoodsItemCustomsValue) 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 FCFCDEBodyGoodsItemCustomsValue + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyGoodsItemCustomsValue) + 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 FCFCDEBodyGoodsItemCustomsValue + Return CType(SerializerXml.Deserialize(s), FCFCDEBodyGoodsItemCustomsValue) + End Function +#End Region + + ''' + ''' Serializes current FCFCDEBodyGoodsItemCustomsValue 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 FCFCDEBodyGoodsItemCustomsValue object + ''' + ''' File to load and deserialize + ''' Output FCFCDEBodyGoodsItemCustomsValue 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 FCFCDEBodyGoodsItemCustomsValue, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemCustomsValue) + 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 FCFCDEBodyGoodsItemCustomsValue) 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 FCFCDEBodyGoodsItemCustomsValue + 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 FCFCDEBodyGoodsItemCustomsValueNetPrice + +#Region "Private fields" + Private _value As Decimal + + Private _currencyCode As String + + Private _currencyRateAgreedFlag As String + + Private _currencyRate As Decimal + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Property Value() As Decimal + Get + Return Me._value + End Get + Set + Me._value = Value + End Set + End Property + + + Public Property CurrencyCode() As String + Get + Return Me._currencyCode + End Get + Set + Me._currencyCode = Value + End Set + End Property + + + Public Property CurrencyRateAgreedFlag() As String + Get + Return Me._currencyRateAgreedFlag + End Get + Set + Me._currencyRateAgreedFlag = Value + End Set + End Property + + Public Property CurrencyRate() As Decimal + Get + Return Me._currencyRate + End Get + Set + Me._currencyRate = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyGoodsItemCustomsValueNetPrice)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FCFCDEBodyGoodsItemCustomsValueNetPrice 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 FCFCDEBodyGoodsItemCustomsValueNetPrice object + ''' + ''' string to deserialize + ''' Output FCFCDEBodyGoodsItemCustomsValueNetPrice 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 FCFCDEBodyGoodsItemCustomsValueNetPrice, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemCustomsValueNetPrice) + 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 FCFCDEBodyGoodsItemCustomsValueNetPrice) 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 FCFCDEBodyGoodsItemCustomsValueNetPrice + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyGoodsItemCustomsValueNetPrice) + 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 FCFCDEBodyGoodsItemCustomsValueNetPrice + Return CType(SerializerXml.Deserialize(s), FCFCDEBodyGoodsItemCustomsValueNetPrice) + End Function +#End Region + + ''' + ''' Serializes current FCFCDEBodyGoodsItemCustomsValueNetPrice 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 FCFCDEBodyGoodsItemCustomsValueNetPrice object + ''' + ''' File to load and deserialize + ''' Output FCFCDEBodyGoodsItemCustomsValueNetPrice 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 FCFCDEBodyGoodsItemCustomsValueNetPrice, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemCustomsValueNetPrice) + 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 FCFCDEBodyGoodsItemCustomsValueNetPrice) 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 FCFCDEBodyGoodsItemCustomsValueNetPrice + 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 FCFCDEBodyGoodsItemCustomsValueIndirectPayment + +#Region "Private fields" + Private _value As Decimal + + Private _currencyCode As String + + Private _currencyRateAgreedFlag As String + + Private _currencyRate As Decimal + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Property Value() As Decimal + Get + Return Me._value + End Get + Set + Me._value = Value + End Set + End Property + + + Public Property CurrencyCode() As String + Get + Return Me._currencyCode + End Get + Set + Me._currencyCode = Value + End Set + End Property + + + Public Property CurrencyRateAgreedFlag() As String + Get + Return Me._currencyRateAgreedFlag + End Get + Set + Me._currencyRateAgreedFlag = Value + End Set + End Property + + Public Property CurrencyRate() As Decimal + Get + Return Me._currencyRate + End Get + Set + Me._currencyRate = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyGoodsItemCustomsValueIndirectPayment)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FCFCDEBodyGoodsItemCustomsValueIndirectPayment 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 FCFCDEBodyGoodsItemCustomsValueIndirectPayment object + ''' + ''' string to deserialize + ''' Output FCFCDEBodyGoodsItemCustomsValueIndirectPayment 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 FCFCDEBodyGoodsItemCustomsValueIndirectPayment, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemCustomsValueIndirectPayment) + 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 FCFCDEBodyGoodsItemCustomsValueIndirectPayment) 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 FCFCDEBodyGoodsItemCustomsValueIndirectPayment + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyGoodsItemCustomsValueIndirectPayment) + 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 FCFCDEBodyGoodsItemCustomsValueIndirectPayment + Return CType(SerializerXml.Deserialize(s), FCFCDEBodyGoodsItemCustomsValueIndirectPayment) + End Function +#End Region + + ''' + ''' Serializes current FCFCDEBodyGoodsItemCustomsValueIndirectPayment 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 FCFCDEBodyGoodsItemCustomsValueIndirectPayment object + ''' + ''' File to load and deserialize + ''' Output FCFCDEBodyGoodsItemCustomsValueIndirectPayment 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 FCFCDEBodyGoodsItemCustomsValueIndirectPayment, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemCustomsValueIndirectPayment) + 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 FCFCDEBodyGoodsItemCustomsValueIndirectPayment) 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 FCFCDEBodyGoodsItemCustomsValueIndirectPayment + 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 FCFCDEBodyGoodsItemCustomsValueAirFreightCosts + +#Region "Private fields" + Private _value As Decimal + + Private _currencyCode As String + + Private _currencyRateIATA As String + + Private _currencyRateAgreedFlag As String + + Private _currencyRate As Decimal + + Private _currencyRateDate As Date + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Property Value() As Decimal + Get + Return Me._value + End Get + Set + Me._value = Value + End Set + End Property + + + Public Property CurrencyCode() As String + Get + Return Me._currencyCode + End Get + Set + Me._currencyCode = Value + End Set + End Property + + + Public Property CurrencyRateIATA() As String + Get + Return Me._currencyRateIATA + End Get + Set + Me._currencyRateIATA = Value + End Set + End Property + + + Public Property CurrencyRateAgreedFlag() As String + Get + Return Me._currencyRateAgreedFlag + End Get + Set + Me._currencyRateAgreedFlag = Value + End Set + End Property + + Public Property CurrencyRate() As Decimal + Get + Return Me._currencyRate + End Get + Set + Me._currencyRate = Value + End Set + End Property + + + Public Property CurrencyRateDate() As Date + Get + Return Me._currencyRateDate + End Get + Set + Me._currencyRateDate = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyGoodsItemCustomsValueAirFreightCosts)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FCFCDEBodyGoodsItemCustomsValueAirFreightCosts 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 FCFCDEBodyGoodsItemCustomsValueAirFreightCosts object + ''' + ''' string to deserialize + ''' Output FCFCDEBodyGoodsItemCustomsValueAirFreightCosts 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 FCFCDEBodyGoodsItemCustomsValueAirFreightCosts, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemCustomsValueAirFreightCosts) + 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 FCFCDEBodyGoodsItemCustomsValueAirFreightCosts) 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 FCFCDEBodyGoodsItemCustomsValueAirFreightCosts + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyGoodsItemCustomsValueAirFreightCosts) + 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 FCFCDEBodyGoodsItemCustomsValueAirFreightCosts + Return CType(SerializerXml.Deserialize(s), FCFCDEBodyGoodsItemCustomsValueAirFreightCosts) + End Function +#End Region + + ''' + ''' Serializes current FCFCDEBodyGoodsItemCustomsValueAirFreightCosts 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 FCFCDEBodyGoodsItemCustomsValueAirFreightCosts object + ''' + ''' File to load and deserialize + ''' Output FCFCDEBodyGoodsItemCustomsValueAirFreightCosts 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 FCFCDEBodyGoodsItemCustomsValueAirFreightCosts, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemCustomsValueAirFreightCosts) + 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 FCFCDEBodyGoodsItemCustomsValueAirFreightCosts) 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 FCFCDEBodyGoodsItemCustomsValueAirFreightCosts + 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 FCFCDEBodyGoodsItemCustomsValueAdditionDeduction + +#Region "Private fields" + Private _type As String + + Private _value As Decimal + + Private _currencyCode As String + + Private _currencyRateIATA As String + + Private _currencyRateAgreedFlag As String + + Private _currencyRate As Decimal + + Private _currencyRateDate As Date + + Private _percentage As Decimal + + 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 Value() As Decimal + Get + Return Me._value + End Get + Set + Me._value = Value + End Set + End Property + + + Public Property CurrencyCode() As String + Get + Return Me._currencyCode + End Get + Set + Me._currencyCode = Value + End Set + End Property + + + Public Property CurrencyRateIATA() As String + Get + Return Me._currencyRateIATA + End Get + Set + Me._currencyRateIATA = Value + End Set + End Property + + + Public Property CurrencyRateAgreedFlag() As String + Get + Return Me._currencyRateAgreedFlag + End Get + Set + Me._currencyRateAgreedFlag = Value + End Set + End Property + + Public Property CurrencyRate() As Decimal + Get + Return Me._currencyRate + End Get + Set + Me._currencyRate = Value + End Set + End Property + + + Public Property CurrencyRateDate() As Date + Get + Return Me._currencyRateDate + End Get + Set + Me._currencyRateDate = Value + End Set + End Property + + Public Property Percentage() As Decimal + Get + Return Me._percentage + End Get + Set + Me._percentage = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyGoodsItemCustomsValueAdditionDeduction)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FCFCDEBodyGoodsItemCustomsValueAdditionDeduction 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 FCFCDEBodyGoodsItemCustomsValueAdditionDeduction object + ''' + ''' string to deserialize + ''' Output FCFCDEBodyGoodsItemCustomsValueAdditionDeduction 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 FCFCDEBodyGoodsItemCustomsValueAdditionDeduction, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemCustomsValueAdditionDeduction) + 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 FCFCDEBodyGoodsItemCustomsValueAdditionDeduction) 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 FCFCDEBodyGoodsItemCustomsValueAdditionDeduction + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyGoodsItemCustomsValueAdditionDeduction) + 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 FCFCDEBodyGoodsItemCustomsValueAdditionDeduction + Return CType(SerializerXml.Deserialize(s), FCFCDEBodyGoodsItemCustomsValueAdditionDeduction) + End Function +#End Region + + ''' + ''' Serializes current FCFCDEBodyGoodsItemCustomsValueAdditionDeduction 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 FCFCDEBodyGoodsItemCustomsValueAdditionDeduction object + ''' + ''' File to load and deserialize + ''' Output FCFCDEBodyGoodsItemCustomsValueAdditionDeduction 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 FCFCDEBodyGoodsItemCustomsValueAdditionDeduction, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemCustomsValueAdditionDeduction) + 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 FCFCDEBodyGoodsItemCustomsValueAdditionDeduction) 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 FCFCDEBodyGoodsItemCustomsValueAdditionDeduction + 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 FCFCDEBodyGoodsItemAssessment + +#Region "Private fields" + Private _customsValue As Decimal + + Private _outwardProcessingFee As Decimal + + Private _taxCosts As Decimal + + Private _amount As List(Of FCFCDEBodyGoodsItemAssessmentAmount) + + Private _specificRate As List(Of FCFCDEBodyGoodsItemAssessmentSpecificRate) + + Private _contentInformation As List(Of FCFCDEBodyGoodsItemAssessmentContentInformation) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contentInformation = New List(Of FCFCDEBodyGoodsItemAssessmentContentInformation)() + Me._specificRate = New List(Of FCFCDEBodyGoodsItemAssessmentSpecificRate)() + Me._amount = New List(Of FCFCDEBodyGoodsItemAssessmentAmount)() + End Sub + + Public Property CustomsValue() As Decimal + Get + Return Me._customsValue + End Get + Set + Me._customsValue = Value + End Set + End Property + + Public Property OutwardProcessingFee() As Decimal + Get + Return Me._outwardProcessingFee + End Get + Set + Me._outwardProcessingFee = Value + End Set + End Property + + Public Property TaxCosts() As Decimal + Get + Return Me._taxCosts + End Get + Set + Me._taxCosts = Value + End Set + End Property + + + Public Property Amount() As List(Of FCFCDEBodyGoodsItemAssessmentAmount) + Get + Return Me._amount + End Get + Set + Me._amount = Value + End Set + End Property + + + Public Property SpecificRate() As List(Of FCFCDEBodyGoodsItemAssessmentSpecificRate) + Get + Return Me._specificRate + End Get + Set + Me._specificRate = Value + End Set + End Property + + + Public Property ContentInformation() As List(Of FCFCDEBodyGoodsItemAssessmentContentInformation) + Get + Return Me._contentInformation + End Get + Set + Me._contentInformation = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyGoodsItemAssessment)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FCFCDEBodyGoodsItemAssessment 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 FCFCDEBodyGoodsItemAssessment object + ''' + ''' string to deserialize + ''' Output FCFCDEBodyGoodsItemAssessment 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 FCFCDEBodyGoodsItemAssessment, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemAssessment) + 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 FCFCDEBodyGoodsItemAssessment) 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 FCFCDEBodyGoodsItemAssessment + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyGoodsItemAssessment) + 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 FCFCDEBodyGoodsItemAssessment + Return CType(SerializerXml.Deserialize(s), FCFCDEBodyGoodsItemAssessment) + End Function +#End Region + + ''' + ''' Serializes current FCFCDEBodyGoodsItemAssessment 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 FCFCDEBodyGoodsItemAssessment object + ''' + ''' File to load and deserialize + ''' Output FCFCDEBodyGoodsItemAssessment 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 FCFCDEBodyGoodsItemAssessment, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemAssessment) + 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 FCFCDEBodyGoodsItemAssessment) 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 FCFCDEBodyGoodsItemAssessment + 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 FCFCDEBodyGoodsItemAssessmentAmount + +#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(FCFCDEBodyGoodsItemAssessmentAmount)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FCFCDEBodyGoodsItemAssessmentAmount 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 FCFCDEBodyGoodsItemAssessmentAmount object + ''' + ''' string to deserialize + ''' Output FCFCDEBodyGoodsItemAssessmentAmount 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 FCFCDEBodyGoodsItemAssessmentAmount, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemAssessmentAmount) + 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 FCFCDEBodyGoodsItemAssessmentAmount) 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 FCFCDEBodyGoodsItemAssessmentAmount + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyGoodsItemAssessmentAmount) + 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 FCFCDEBodyGoodsItemAssessmentAmount + Return CType(SerializerXml.Deserialize(s), FCFCDEBodyGoodsItemAssessmentAmount) + End Function +#End Region + + ''' + ''' Serializes current FCFCDEBodyGoodsItemAssessmentAmount 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 FCFCDEBodyGoodsItemAssessmentAmount object + ''' + ''' File to load and deserialize + ''' Output FCFCDEBodyGoodsItemAssessmentAmount 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 FCFCDEBodyGoodsItemAssessmentAmount, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemAssessmentAmount) + 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 FCFCDEBodyGoodsItemAssessmentAmount) 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 FCFCDEBodyGoodsItemAssessmentAmount + 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 FCFCDEBodyGoodsItemAssessmentSpecificRate + +#Region "Private fields" + Private _type As String + + Private _value As Decimal + + 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 Value() As Decimal + Get + Return Me._value + End Get + Set + Me._value = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyGoodsItemAssessmentSpecificRate)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FCFCDEBodyGoodsItemAssessmentSpecificRate 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 FCFCDEBodyGoodsItemAssessmentSpecificRate object + ''' + ''' string to deserialize + ''' Output FCFCDEBodyGoodsItemAssessmentSpecificRate 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 FCFCDEBodyGoodsItemAssessmentSpecificRate, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemAssessmentSpecificRate) + 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 FCFCDEBodyGoodsItemAssessmentSpecificRate) 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 FCFCDEBodyGoodsItemAssessmentSpecificRate + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyGoodsItemAssessmentSpecificRate) + 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 FCFCDEBodyGoodsItemAssessmentSpecificRate + Return CType(SerializerXml.Deserialize(s), FCFCDEBodyGoodsItemAssessmentSpecificRate) + End Function +#End Region + + ''' + ''' Serializes current FCFCDEBodyGoodsItemAssessmentSpecificRate 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 FCFCDEBodyGoodsItemAssessmentSpecificRate object + ''' + ''' File to load and deserialize + ''' Output FCFCDEBodyGoodsItemAssessmentSpecificRate 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 FCFCDEBodyGoodsItemAssessmentSpecificRate, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemAssessmentSpecificRate) + 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 FCFCDEBodyGoodsItemAssessmentSpecificRate) 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 FCFCDEBodyGoodsItemAssessmentSpecificRate + 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 FCFCDEBodyGoodsItemAssessmentContentInformation + +#Region "Private fields" + Private _type As String + + Private _degreePercentage As Decimal + + 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 DegreePercentage() As Decimal + Get + Return Me._degreePercentage + End Get + Set + Me._degreePercentage = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyGoodsItemAssessmentContentInformation)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FCFCDEBodyGoodsItemAssessmentContentInformation 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 FCFCDEBodyGoodsItemAssessmentContentInformation object + ''' + ''' string to deserialize + ''' Output FCFCDEBodyGoodsItemAssessmentContentInformation 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 FCFCDEBodyGoodsItemAssessmentContentInformation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemAssessmentContentInformation) + 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 FCFCDEBodyGoodsItemAssessmentContentInformation) 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 FCFCDEBodyGoodsItemAssessmentContentInformation + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyGoodsItemAssessmentContentInformation) + 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 FCFCDEBodyGoodsItemAssessmentContentInformation + Return CType(SerializerXml.Deserialize(s), FCFCDEBodyGoodsItemAssessmentContentInformation) + End Function +#End Region + + ''' + ''' Serializes current FCFCDEBodyGoodsItemAssessmentContentInformation 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 FCFCDEBodyGoodsItemAssessmentContentInformation object + ''' + ''' File to load and deserialize + ''' Output FCFCDEBodyGoodsItemAssessmentContentInformation 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 FCFCDEBodyGoodsItemAssessmentContentInformation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemAssessmentContentInformation) + 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 FCFCDEBodyGoodsItemAssessmentContentInformation) 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 FCFCDEBodyGoodsItemAssessmentContentInformation + 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 FCFCDEBodyGoodsItemExciseDuty + +#Region "Private fields" + Private _code As String + + Private _degreePercentage As Decimal + + Private _value As Decimal + + Private _amount As FCFCDEBodyGoodsItemExciseDutyAmount + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._amount = New FCFCDEBodyGoodsItemExciseDutyAmount() + End Sub + + + Public Property Code() As String + Get + Return Me._code + End Get + Set + Me._code = Value + End Set + End Property + + + Public Property DegreePercentage() As Decimal + Get + Return Me._degreePercentage + End Get + Set + Me._degreePercentage = Value + End Set + End Property + + Public Property Value() As Decimal + Get + Return Me._value + End Get + Set + Me._value = Value + End Set + End Property + + Public Property Amount() As FCFCDEBodyGoodsItemExciseDutyAmount + Get + Return Me._amount + End Get + Set + Me._amount = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyGoodsItemExciseDuty)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FCFCDEBodyGoodsItemExciseDuty 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 FCFCDEBodyGoodsItemExciseDuty object + ''' + ''' string to deserialize + ''' Output FCFCDEBodyGoodsItemExciseDuty 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 FCFCDEBodyGoodsItemExciseDuty, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemExciseDuty) + 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 FCFCDEBodyGoodsItemExciseDuty) 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 FCFCDEBodyGoodsItemExciseDuty + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyGoodsItemExciseDuty) + 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 FCFCDEBodyGoodsItemExciseDuty + Return CType(SerializerXml.Deserialize(s), FCFCDEBodyGoodsItemExciseDuty) + End Function +#End Region + + ''' + ''' Serializes current FCFCDEBodyGoodsItemExciseDuty 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 FCFCDEBodyGoodsItemExciseDuty object + ''' + ''' File to load and deserialize + ''' Output FCFCDEBodyGoodsItemExciseDuty 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 FCFCDEBodyGoodsItemExciseDuty, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemExciseDuty) + 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 FCFCDEBodyGoodsItemExciseDuty) 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 FCFCDEBodyGoodsItemExciseDuty + 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 FCFCDEBodyGoodsItemExciseDutyAmount + +#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(FCFCDEBodyGoodsItemExciseDutyAmount)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FCFCDEBodyGoodsItemExciseDutyAmount 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 FCFCDEBodyGoodsItemExciseDutyAmount object + ''' + ''' string to deserialize + ''' Output FCFCDEBodyGoodsItemExciseDutyAmount 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 FCFCDEBodyGoodsItemExciseDutyAmount, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemExciseDutyAmount) + 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 FCFCDEBodyGoodsItemExciseDutyAmount) 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 FCFCDEBodyGoodsItemExciseDutyAmount + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyGoodsItemExciseDutyAmount) + 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 FCFCDEBodyGoodsItemExciseDutyAmount + Return CType(SerializerXml.Deserialize(s), FCFCDEBodyGoodsItemExciseDutyAmount) + End Function +#End Region + + ''' + ''' Serializes current FCFCDEBodyGoodsItemExciseDutyAmount 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 FCFCDEBodyGoodsItemExciseDutyAmount object + ''' + ''' File to load and deserialize + ''' Output FCFCDEBodyGoodsItemExciseDutyAmount 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 FCFCDEBodyGoodsItemExciseDutyAmount, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemExciseDutyAmount) + 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 FCFCDEBodyGoodsItemExciseDutyAmount) 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 FCFCDEBodyGoodsItemExciseDutyAmount + 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 FCFCDEBodyGoodsItemPreferentialTreatment + +#Region "Private fields" + Private _requestedPreferentialTreatment As String + + Private _declaration As FCFCDEBodyGoodsItemPreferentialTreatmentDeclaration + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._declaration = New FCFCDEBodyGoodsItemPreferentialTreatmentDeclaration() + End Sub + + + Public Property RequestedPreferentialTreatment() As String + Get + Return Me._requestedPreferentialTreatment + End Get + Set + Me._requestedPreferentialTreatment = Value + End Set + End Property + + Public Property Declaration() As FCFCDEBodyGoodsItemPreferentialTreatmentDeclaration + Get + Return Me._declaration + End Get + Set + Me._declaration = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyGoodsItemPreferentialTreatment)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FCFCDEBodyGoodsItemPreferentialTreatment 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 FCFCDEBodyGoodsItemPreferentialTreatment object + ''' + ''' string to deserialize + ''' Output FCFCDEBodyGoodsItemPreferentialTreatment 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 FCFCDEBodyGoodsItemPreferentialTreatment, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemPreferentialTreatment) + 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 FCFCDEBodyGoodsItemPreferentialTreatment) 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 FCFCDEBodyGoodsItemPreferentialTreatment + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyGoodsItemPreferentialTreatment) + 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 FCFCDEBodyGoodsItemPreferentialTreatment + Return CType(SerializerXml.Deserialize(s), FCFCDEBodyGoodsItemPreferentialTreatment) + End Function +#End Region + + ''' + ''' Serializes current FCFCDEBodyGoodsItemPreferentialTreatment 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 FCFCDEBodyGoodsItemPreferentialTreatment object + ''' + ''' File to load and deserialize + ''' Output FCFCDEBodyGoodsItemPreferentialTreatment 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 FCFCDEBodyGoodsItemPreferentialTreatment, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemPreferentialTreatment) + 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 FCFCDEBodyGoodsItemPreferentialTreatment) 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 FCFCDEBodyGoodsItemPreferentialTreatment + 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclaration + +#Region "Private fields" + Private _contingent As List(Of FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationContingent) + + Private _preferentialTreatmentQuantity As FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._preferentialTreatmentQuantity = New FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity() + Me._contingent = New List(Of FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationContingent)() + End Sub + + + Public Property Contingent() As List(Of FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationContingent) + Get + Return Me._contingent + End Get + Set + Me._contingent = Value + End Set + End Property + + Public Property PreferentialTreatmentQuantity() As FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity + Get + Return Me._preferentialTreatmentQuantity + End Get + Set + Me._preferentialTreatmentQuantity = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyGoodsItemPreferentialTreatmentDeclaration)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FCFCDEBodyGoodsItemPreferentialTreatmentDeclaration 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclaration object + ''' + ''' string to deserialize + ''' Output FCFCDEBodyGoodsItemPreferentialTreatmentDeclaration 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclaration, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemPreferentialTreatmentDeclaration) + 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclaration) 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclaration + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyGoodsItemPreferentialTreatmentDeclaration) + 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclaration + Return CType(SerializerXml.Deserialize(s), FCFCDEBodyGoodsItemPreferentialTreatmentDeclaration) + End Function +#End Region + + ''' + ''' Serializes current FCFCDEBodyGoodsItemPreferentialTreatmentDeclaration 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclaration object + ''' + ''' File to load and deserialize + ''' Output FCFCDEBodyGoodsItemPreferentialTreatmentDeclaration 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclaration, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemPreferentialTreatmentDeclaration) + 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclaration) 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclaration + 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationContingent + +#Region "Private fields" + Private _contingentNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property ContingentNumber() As String + Get + Return Me._contingentNumber + End Get + Set + Me._contingentNumber = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationContingent)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationContingent 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationContingent object + ''' + ''' string to deserialize + ''' Output FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationContingent 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationContingent, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationContingent) + 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationContingent) 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationContingent + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationContingent) + 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationContingent + Return CType(SerializerXml.Deserialize(s), FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationContingent) + End Function +#End Region + + ''' + ''' Serializes current FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationContingent 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationContingent object + ''' + ''' File to load and deserialize + ''' Output FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationContingent 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationContingent, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationContingent) + 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationContingent) 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationContingent + 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity + +#Region "Private fields" + Private _quantity As String + + Private _measurementUnit As String + + Private _qualifier As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Quantity() As String + 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(FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity object + ''' + ''' string to deserialize + ''' Output FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity) + 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity) 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity) + 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity + Return CType(SerializerXml.Deserialize(s), FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity) + End Function +#End Region + + ''' + ''' Serializes current FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity object + ''' + ''' File to load and deserialize + ''' Output FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity) + 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity) 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 FCFCDEBodyGoodsItemPreferentialTreatmentDeclarationPreferentialTreatmentQuantity + 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 FCFCDEBodyGoodsItemSpecialCase + +#Region "Private fields" + Private _group As String + + Private _applicationType As String + + Private _rateOrAmountOrFactor As Decimal + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Group() As String + Get + Return Me._group + End Get + Set + Me._group = 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 RateOrAmountOrFactor() As Decimal + Get + Return Me._rateOrAmountOrFactor + End Get + Set + Me._rateOrAmountOrFactor = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyGoodsItemSpecialCase)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FCFCDEBodyGoodsItemSpecialCase 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 FCFCDEBodyGoodsItemSpecialCase object + ''' + ''' string to deserialize + ''' Output FCFCDEBodyGoodsItemSpecialCase 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 FCFCDEBodyGoodsItemSpecialCase, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemSpecialCase) + 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 FCFCDEBodyGoodsItemSpecialCase) 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 FCFCDEBodyGoodsItemSpecialCase + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyGoodsItemSpecialCase) + 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 FCFCDEBodyGoodsItemSpecialCase + Return CType(SerializerXml.Deserialize(s), FCFCDEBodyGoodsItemSpecialCase) + End Function +#End Region + + ''' + ''' Serializes current FCFCDEBodyGoodsItemSpecialCase 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 FCFCDEBodyGoodsItemSpecialCase object + ''' + ''' File to load and deserialize + ''' Output FCFCDEBodyGoodsItemSpecialCase 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 FCFCDEBodyGoodsItemSpecialCase, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemSpecialCase) + 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 FCFCDEBodyGoodsItemSpecialCase) 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 FCFCDEBodyGoodsItemSpecialCase + 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 FCFCDEBodyGoodsItemDocument + +#Region "Private fields" + Private _division As String + + Private _type As String + + Private _referenceNumber As String + + Private _issuingDate As Date + + Private _atHandFlag As String + + Private _writeOff As FCFCDEBodyGoodsItemDocumentWriteOff + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._writeOff = New FCFCDEBodyGoodsItemDocumentWriteOff() + End Sub + + + Public Property Division() As String + 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 + + + Public Property AtHandFlag() As String + Get + Return Me._atHandFlag + End Get + Set + Me._atHandFlag = Value + End Set + End Property + + Public Property WriteOff() As FCFCDEBodyGoodsItemDocumentWriteOff + Get + Return Me._writeOff + End Get + Set + Me._writeOff = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FCFCDEBodyGoodsItemDocument)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FCFCDEBodyGoodsItemDocument 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 FCFCDEBodyGoodsItemDocument object + ''' + ''' string to deserialize + ''' Output FCFCDEBodyGoodsItemDocument 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 FCFCDEBodyGoodsItemDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemDocument) + 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 FCFCDEBodyGoodsItemDocument) 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 FCFCDEBodyGoodsItemDocument + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyGoodsItemDocument) + 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 FCFCDEBodyGoodsItemDocument + Return CType(SerializerXml.Deserialize(s), FCFCDEBodyGoodsItemDocument) + End Function +#End Region + + ''' + ''' Serializes current FCFCDEBodyGoodsItemDocument 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 FCFCDEBodyGoodsItemDocument object + ''' + ''' File to load and deserialize + ''' Output FCFCDEBodyGoodsItemDocument 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 FCFCDEBodyGoodsItemDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemDocument) + 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 FCFCDEBodyGoodsItemDocument) 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 FCFCDEBodyGoodsItemDocument + 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 FCFCDEBodyGoodsItemDocumentWriteOff + +#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(FCFCDEBodyGoodsItemDocumentWriteOff)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FCFCDEBodyGoodsItemDocumentWriteOff 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 FCFCDEBodyGoodsItemDocumentWriteOff object + ''' + ''' string to deserialize + ''' Output FCFCDEBodyGoodsItemDocumentWriteOff 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 FCFCDEBodyGoodsItemDocumentWriteOff, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemDocumentWriteOff) + 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 FCFCDEBodyGoodsItemDocumentWriteOff) 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 FCFCDEBodyGoodsItemDocumentWriteOff + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FCFCDEBodyGoodsItemDocumentWriteOff) + 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 FCFCDEBodyGoodsItemDocumentWriteOff + Return CType(SerializerXml.Deserialize(s), FCFCDEBodyGoodsItemDocumentWriteOff) + End Function +#End Region + + ''' + ''' Serializes current FCFCDEBodyGoodsItemDocumentWriteOff 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 FCFCDEBodyGoodsItemDocumentWriteOff object + ''' + ''' File to load and deserialize + ''' Output FCFCDEBodyGoodsItemDocumentWriteOff 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 FCFCDEBodyGoodsItemDocumentWriteOff, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FCFCDEBodyGoodsItemDocumentWriteOff) + 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 FCFCDEBodyGoodsItemDocumentWriteOff) 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 FCFCDEBodyGoodsItemDocumentWriteOff + 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 +End Namespace +#Enable Warning diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/EZA/FreierVerkehrAktVeredelUmwandlung/FCFCDE.xsd b/DAKOSY_Worker/DAKOSY/ATLAS/EZA/FreierVerkehrAktVeredelUmwandlung/FCFCDE.xsd new file mode 100644 index 0000000..fc70a3d --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/EZA/FreierVerkehrAktVeredelUmwandlung/FCFCDE.xsd @@ -0,0 +1,5579 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/EZA/FreierVerkehrAktVeredelUmwandlung/xsd2code.config b/DAKOSY_Worker/DAKOSY/ATLAS/EZA/FreierVerkehrAktVeredelUmwandlung/xsd2code.config new file mode 100644 index 0000000..fd27216 --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/EZA/FreierVerkehrAktVeredelUmwandlung/xsd2code.config @@ -0,0 +1,25 @@ + + + Net20 + FCFCDF + VisualBasic + + + + + + true + true + + + + + + true + AllClasses + true + + + false + + diff --git a/DAKOSY_Worker/DAKOSY_Worker_lib.vbproj b/DAKOSY_Worker/DAKOSY_Worker_lib.vbproj index d13e0bf..c78bd72 100644 --- a/DAKOSY_Worker/DAKOSY_Worker_lib.vbproj +++ b/DAKOSY_Worker/DAKOSY_Worker_lib.vbproj @@ -101,6 +101,7 @@ + @@ -241,9 +242,13 @@ Designer + + Designer + Designer + Designer @@ -256,6 +261,7 @@ Designer + Designer diff --git a/UID/ADMIN.vbproj b/UID/ADMIN.vbproj index fd5fd67..d90253b 100644 --- a/UID/ADMIN.vbproj +++ b/UID/ADMIN.vbproj @@ -311,7 +311,6 @@ Component - frmDienstAbwesenheitenUebersicht.vb diff --git a/UID/Dienstplan/cFeiertage.vb b/UID/Dienstplan/cFeiertage.vb deleted file mode 100644 index 00a31e7..0000000 --- a/UID/Dienstplan/cFeiertage.vb +++ /dev/null @@ -1,242 +0,0 @@ -Public Class cFeiertage - Private _Year As Integer - Private _Ostern As Date - - ''' - ''' Initialisiert die Feiertags-Klasse für das aktuelle Jahr - ''' - Public Sub New() - _Year = Now.Year - End Sub - - ''' - ''' Initialisiert die Feiertags-Klasse für das angegebene Jahr - ''' - Public Sub New(ByVal Year As Integer) - _Year = Year - End Sub - - ''' - ''' Gibt das Datum für den Ostersonntag zurück. - ''' - Public ReadOnly Property Ostersonntag_OLD() As Date - Get - If _Ostern.Ticks = 0 Then - ' Datum des ersten Vollmondes nach Frühlingsanfang - Dim a As Integer = _Year Mod 19 - Dim b As Integer = _Year Mod 4 - Dim c As Integer = _Year Mod 7 - Dim M As Integer = Val(((8 * Val(_Year / 100) + 13) / 25) - 2) - Dim s As Integer = Val(_Year / 100) - Val(_Year / 400) - 2 - - M = (15 + s - M) Mod 30 - - Dim N As Integer = (6 + s) Mod 7 - Dim d As Integer = (M + 19 * a) Mod 30 - If d = 29 Then - d = 28 - ElseIf d = 28 Then - If (_Year Mod 19) > 10 Then d = 27 - End If - - Dim e As Integer = (2 * b + 4 * c + 6 * d + N) Mod 7 - - ' Ostersonntag - _Ostern = New DateTime(_Year, 3, 21).AddDays(d + e + 1) - End If - Return _Ostern - End Get - End Property - - Public Function Ostersonntag() As Date - Dim _month As Integer - Dim _day As Integer - Dim _moon As Integer - Dim _epact As Integer - Dim _sunday As Integer - Dim _gold As Integer - Dim _century As Integer - Dim _corx As Integer - Dim _corz As Integer - ' The Golden Number of the year in the 19 year Metonic Cycle: - _gold = (_Year Mod 19) + 1 - ' Calculate the Century: - _century = (_Year \ 100) + 1 - ' Number of years in which leap year was dropped in order - ' to keep in step with the sun: - _corx = (3 * _century) \ 4 - 12 - ' Special correction to syncronize Easter with moon's orbit: - _corz = (8 * _century + 5) \ 25 - 5 - ' Find Sunday: - _sunday = (5 * _Year) \ 4 - _corx - 10 - ' ^ evtl. long To prevent overflow at year 6554 - ' Set Epact - specifies occurrence of full moon: - _epact = (11 * _gold + 20 + _corz - _corx) Mod 30 - If _epact < 0 Then - _epact += 30 - End If - If (((_epact = 25) AndAlso (_gold > 11)) OrElse (_epact = 24)) Then - _epact += 1 - End If - ' Find Full Moon: - _moon = 44 - _epact - If _moon < 21 Then - _moon += 30 - End If - ' Advance to Sunday: - _moon += 7 - ((_sunday + _moon) Mod 7) - If (_moon > 31) Then - _month = 4 - _day = _moon - 31 - Else - _month = 3 - _day = _moon - End If - Return New DateTime(_Year, _month, _day) - End Function - - - ''' - ''' Gibt das Datum für den Ostermontag zurück. - ''' - Public ReadOnly Property Ostermontag() As Date - Get - Return Ostersonntag.AddDays(1) - End Get - End Property - - ''' - ''' Gibt das Datum für den BussUndBettag zurück. - ''' - Public ReadOnly Property BussUndBettag() As Date - Get - Dim i As Long - Dim VierterAdvent As Date - For i = 24 To 1 Step -1 - If CDate(i & ".12." & _Year).ToString("ddd") = "So" Then - VierterAdvent = CDate(i & ".12." & _Year).ToShortDateString - Exit For - End If - Next i - Dim ErsterAdvent As Date = VierterAdvent.AddDays(-21) ' DateAdd("d", -21, VierterAdvent) - Return ErsterAdvent.AddDays(-11) ' DateAdd("d", -11, ErsterAdvent) 'BussUndBettag - End Get - - End Property - ''' - ''' Gibt das Datum für den Karfreitag zurück. - ''' - Public ReadOnly Property Karfreitag() As Date - Get - Return Ostersonntag.AddDays(-2) - End Get - End Property - - ''' - ''' Gibt das Datum für den Pfingstsonntag zurück. - ''' - Public ReadOnly Property Pfingstsonntag() As Date - Get - Return Ostersonntag.AddDays(49) - End Get - End Property - - ''' - ''' Gibt das Datum für den Pfingsmontag zurück. - ''' - Public ReadOnly Property Pfingstmontag() As Date - Get - Return Ostersonntag.AddDays(50) - End Get - End Property - - ''' - ''' Gibt das Datum für Christi-Himmelfahrt zurück. - ''' - Public ReadOnly Property Himmelfahrt() As Date - Get - Return Ostersonntag.AddDays(39) - End Get - End Property - - ''' - ''' Gibt das Datum für Fronleichnam zurück. - ''' - Public ReadOnly Property Fronleichnam() As Date - Get - Return Ostersonntag.AddDays(60) - End Get - End Property - - ''' - ''' Gibt das Datum für Aschermittwoch zurück. - ''' - Public ReadOnly Property Aschermittwoch() As Date - Get - Return Ostersonntag.AddDays(-46) - End Get - End Property - - - Public Function isFeiertag(datum As Date, land As String) As Boolean - If datum = CDate("01.01." & _Year) Then Return True - If datum = CDate("06.01." & _Year) Then Return True - If datum = CDate("15.08." & _Year) Then Return True - If datum = CDate("01.11." & _Year) Then Return True - If datum = CDate("25.12." & _Year) Then Return True - If datum = CDate("26.12." & _Year) Then Return True - - - If datum = Ostermontag Then Return True - If datum = Ostersonntag() Then Return True - If datum = Himmelfahrt Then Return True - If datum = Pfingstmontag Then Return True - If datum = Pfingstsonntag Then Return True - If datum = Fronleichnam Then Return True - - Select Case land - Case "AT" - If datum = CDate("26.10." & _Year) Then Return True - If datum = CDate("08.12." & _Year) Then Return True - If datum = CDate("01.05." & _Year) Then Return True 'Staatsfeiertag - Case "DE" 'BAYERN - If datum = CDate("03.10." & _Year) Then Return True ' Tag der Deutschen Einheit - ' If datum = BussUndBettag Then Return True ' Buß- und Bettag '!!!!ABEWEICHEND --> kein Feiertag in BAYERN - ' If datum = CDate("08.08." & _Year) Then Return True ' Augsburger Friedensfest - If datum = CDate("01.05." & _Year) Then Return True ' Maifeiertag - If datum = Karfreitag Then Return True - End Select - Return False - End Function - 'Public Function isFeiertag(datum As Date, land As String) As Boolean - ' If datum = CDate("01.01." & _Year) Then Return True - ' If datum = CDate("06.01." & _Year) Then Return True - ' If datum = CDate("15.08." & _Year) Then Return True - ' If datum = CDate("01.11." & _Year) Then Return True - ' If datum = CDate("25.12." & _Year) Then Return True - ' If datum = CDate("26.12." & _Year) Then Return True - - - ' If datum = Ostermontag Then MsgBox("Ostermontag") : Return True - ' If datum = Ostersonntag() Then MsgBox("Ostersonntag") : Return True - ' If datum = Himmelfahrt Then MsgBox("Himmelfahrt") : Return True - ' If datum = Pfingstmontag Then MsgBox("Pfingstmontag") : Return True - ' If datum = Pfingstsonntag Then MsgBox("Pfingstsonntag") : Return True - ' If datum = Fronleichnam Then MsgBox("Fronleichnam") : Return True - - ' Select Case land - ' Case "AT" - ' If datum = CDate("26.10." & _Year) Then Return True - ' If datum = CDate("08.12." & _Year) Then Return True - ' If datum = CDate("01.05." & _Year) Then Return True 'Staatsfeiertag - ' Case "DE" 'BAYERN - ' If datum = CDate("03.10." & _Year) Then Return True ' Tag der Deutschen Einheit - ' If datum = BussUndBettag Then MsgBox("BussUndBettag") : Return True ' Buß- und Bettag '!!!!ABEWEICHEND - ' If datum = CDate("08.08." & _Year) Then Return True ' Augsburger Friedensfest - ' If datum = CDate("01.05." & _Year) Then Return True ' Maifeiertag - ' If datum = Karfreitag Then MsgBox("Karfreitag") : Return True - ' End Select - ' Return False - 'End Function - -End Class \ No newline at end of file diff --git a/UID/Dienstplan/frmDienstplanVariabel.vb b/UID/Dienstplan/frmDienstplanVariabel.vb index 4e6b612..a942241 100644 --- a/UID/Dienstplan/frmDienstplanVariabel.vb +++ b/UID/Dienstplan/frmDienstplanVariabel.vb @@ -1226,7 +1226,7 @@ Public Class frmDienstplanVariabel Dim datum As Date = montag For i = 1 To 7 - Dim FT As New cFeiertage(datum.Year) 'Evtl Jahressprung, darum neu definieren + Dim FT As New VERAG_PROG_ALLGEMEIN.cFeiertage(datum.Year) 'Evtl Jahressprung, darum neu definieren For Each m In ma Dim eintrag As New cDienstEintrag eintrag.dstetr_dstmaId = m.dstma_id @@ -2503,7 +2503,7 @@ Public Class frmDienstplanVariabel Blatt.Range("C1").Value = dateWork.ToString("MMMM yyyy") - Dim FT As New cFeiertage(dateWork.Year) 'Evtl Jahressprung, darum neu definieren + Dim FT As New VERAG_PROG_ALLGEMEIN.cFeiertage(dateWork.Year) 'Evtl Jahressprung, darum neu definieren Dim cnt3 = 0 While dateWork <= dateEnde diff --git a/initATLASAufschubkonten/cGetMsgType.vb b/initATLASAufschubkonten/cGetMsgType.vb index 4898903..d31fe79 100644 --- a/initATLASAufschubkonten/cGetMsgType.vb +++ b/initATLASAufschubkonten/cGetMsgType.vb @@ -409,6 +409,21 @@ Public Class cGetMsgType End If Return False End Function + Shared Function isEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDE(doc As XmlDocument) As Boolean + If doc.HasChildNodes Then + ' If doc.GetElementsByTagName("DakosyMessageInternal").Count > 0 Then + Dim sw = New StringWriter() + Dim xw = New XmlTextWriter(sw) + doc.WriteTo(xw) + Dim XmlString = sw.ToString() + If XmlString.Contains("") Then + + Return True + End If + 'End If + End If + Return False + End Function Shared Function isEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDF(doc As XmlDocument) As Boolean If doc.HasChildNodes Then diff --git a/initATLASAufschubkonten/frmDYNachrichtenVerarbeitung.vb b/initATLASAufschubkonten/frmDYNachrichtenVerarbeitung.vb index b099cb7..2ce72e9 100644 --- a/initATLASAufschubkonten/frmDYNachrichtenVerarbeitung.vb +++ b/initATLASAufschubkonten/frmDYNachrichtenVerarbeitung.vb @@ -345,6 +345,14 @@ Public Class frmDYNachrichtenVerarbeitung found = True End If End If + 'EZA: FreierVerkehrAktVeredelUmwandlung NEU XML + If Not found AndAlso cGetMsgType.isEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDE(doc) Then + Dim bezugsNr = readEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDE(doc) + If bezugsNr <> "" Then + found = True + End If + End If + 'EZA: FreierVerkehrAktVeredelUmwandlung NEU XML If Not found AndAlso cGetMsgType.isEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDF(doc) Then Dim bezugsNr = readEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDF(doc) @@ -3092,6 +3100,624 @@ Public Class frmDYNachrichtenVerarbeitung End Try End Function + + Function readEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDE(doc As XmlDocument) As String + Try + readEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDE = "" + Dim sw = New StringWriter() + Dim xw = New XmlTextWriter(sw) + doc.WriteTo(xw) + Dim XmlString = sw.ToString() + If XmlString.Contains("") Then + Dim xmlFCFCDE = XmlString.Substring(XmlString.IndexOf(""), XmlString.IndexOf("") + 9 - XmlString.IndexOf("")) + ' MsgBox(xmlFCFCDE) + Dim p = Path.GetTempFileName + + Using outputFile As New StreamWriter(p, False, System.Text.Encoding.Default) + outputFile.Write(xmlFCFCDE) + outputFile.Close() + + + + Dim FCFCDE As DAKOSY_Worker.FCFCDE.FCFCDE = DAKOSY_Worker.FCFCDE.FCFCDE.LoadFromFile(p) + ' Dim EZA As New DAKOSY_Worker.cDakosyEZA + + + + If FCFCDE IsNot Nothing And FCFCDE.Header IsNot Nothing And FCFCDE.Header.LocalReferenceNumber IsNot Nothing Then + readEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDE = FCFCDE.Header.LocalReferenceNumber + Else + Return "" 'Keine Bezugsnummer + End If + + + Dim DY_TMP As DAKOSY_Worker.cDakosy_Zollanmeldungen = saveDY_ZA(readEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDE, "EZA") + + Dim EZA As DAKOSY_Worker.cDakosyEZA = DAKOSY_Worker.cDakosyEZA.LOADByBezugsNr(readEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDE, False) ' Falls schon ein DS mit dieser Bezugsnummer vorhanden ist. + If EZA Is Nothing Then EZA = New DAKOSY_Worker.cDakosyEZA + If DY_TMP IsNot Nothing Then EZA.eza_dyaAnmID = DY_TMP.dy_Id + + If DY_TMP.dy_AvisoId Is Nothing Then + DY_TMP.tryFindAviso() + DY_TMP.SAVE() + End If + + + If FCFCDE IsNot Nothing Then + EZA.eza_ObjectName = readEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDE + + If FCFCDE.MetaData IsNot Nothing Then + If FCFCDE.MetaData.Preparation IsNot Nothing Then EZA.eza_Trans_DatumZeit = CDate(FCFCDE.MetaData.Preparation.Date).ToShortDateString + End If + + + If FCFCDE.Header IsNot Nothing Then + + EZA.eza_VersendungsLandCode = FCFCDE.Header.DepartureCountry + EZA.eza_FinanzamtAnmelder = FCFCDE.Header.TaxOffice + 'EZA.eza_UstIdAnmelder = FCFCDE.Header.TaxNumber + + EZA.eza_Warenort = FCFCDE.Header.GoodsLocation + EZA.eza_Ausstellungsort = FCFCDE.Header.DeclarationPlace + + + EZA.eza_ZollrechtlicherStatus = FCFCDE.Header.CustomsGoodsStatus + EZA.eza_Zahlungsart = FCFCDE.Header.PaymentMethod + EZA.eza_AnmelderistEmpfaenger = FCFCDE.Header.DeclarantIsConsigneeFlag + EZA.eza_VertretungsVerhaeltnisCode = FCFCDE.Header.RepresentativeRelationshipFlag + EZA.eza_Vorsteuerabzug = FCFCDE.Header.InputTaxDeductionFlag + EZA.eza_ZusatzangabenAnmeldung = FCFCDE.Header.AdditionalInformation + + ' EZA.eza_VerfahrenBeantragtCode + End If + + End If + + If FCFCDE.Body IsNot Nothing Then + If FCFCDE.Body.ForeignTradeStatistics IsNot Nothing Then + + EZA.eza_ArtGeschaeftCode = FCFCDE.Body.ForeignTradeStatistics.TransactionType + EZA.eza_Bestimmungsland = FCFCDE.Body.ForeignTradeStatistics.DestinationCountry + EZA.eza_Bestimmungsbundesland = FCFCDE.Body.ForeignTradeStatistics.DestinationFederalState + + If FCFCDE.Body.ForeignTradeStatistics.EntryCustomsOffice IsNot Nothing Then + EZA.eza_Eingangszollstelle = FCFCDE.Body.ForeignTradeStatistics.EntryCustomsOffice.ReferenceNumber + End If + + EZA.eza_Statistikstatus = FCFCDE.Body.ForeignTradeStatistics.GoodsStatus + EZA.eza_DV1Kz = FCFCDE.Body.CustomsValueFlag + EZA.eza_GesamtRohmasse = FCFCDE.Body.ForeignTradeStatistics.TotalGrossMassMeasure + + End If + + If FCFCDE.Body.PaymentTransaction IsNot Nothing Then + EZA.eza_Rechnungswaehrung = FCFCDE.Body.PaymentTransaction.CurrencyCode + EZA.eza_Rechnungspreis = FCFCDE.Body.PaymentTransaction.Amount + + End If + + If FCFCDE.Body.CustomsValue IsNot Nothing Then + If FCFCDE.Body.CustomsValue.RestrictionOrCondition IsNot Nothing Then EZA.eza_DV1EinschraenkungenKz = FCFCDE.Body.CustomsValue.RestrictionOrCondition.RestrictionFlag + EZA.eza_DV1FruehereEntscheidungen = FCFCDE.Body.CustomsValue.FormerDecisions + + If FCFCDE.Body.CustomsValue.Affiliation IsNot Nothing Then EZA.eza_DV1Verbundenheit = FCFCDE.Body.CustomsValue.Affiliation.Type + If FCFCDE.Body.CustomsValue.Affiliation IsNot Nothing Then EZA.eza_DV1VerbungenheitEinzelheiten = FCFCDE.Body.CustomsValue.Affiliation.Description + If FCFCDE.Body.CustomsValue.LicenseFee IsNot Nothing Then EZA.eza_DV1LizenzgebuehrenUmstand = FCFCDE.Body.CustomsValue.LicenseFee.Description + If FCFCDE.Body.CustomsValue.LicenseFee IsNot Nothing Then EZA.eza_DV1LizenzgebuehrenKz = FCFCDE.Body.CustomsValue.LicenseFee.LicenseFeeFlag + End If + + If FCFCDE.Body.Document IsNot Nothing AndAlso FCFCDE.Body.Document.Count > 0 Then + For Each docTMP In FCFCDE.Body.Document + Dim UNTERLAGE As New DAKOSY_Worker.cDakosy_EZA_Unterlagen + UNTERLAGE.ezaUl_Art = docTMP.Type + UNTERLAGE.ezaUl_Nummer = docTMP.ReferenceNumber + UNTERLAGE.ezaUl_Bereich = docTMP.Division + UNTERLAGE.ezaUl_DatumAusstellung = CDate(docTMP.IssuingDate).ToShortDateString + + EZA.eza_UNTERLAGEN.Add(UNTERLAGE) + Next + + End If + + ' EZA.eza_DV1Verbundenheit = cEDI.getSimpleLine("GIS+904:::", lines, Nothing)??? + ' EZA.eza_BewilligungsIDZLAVUV = cEDI.getSimpleLine("RFF+AEM:", lines) '? + + 'Vorpapier + If FCFCDE.PreviousAdministrativeReferences IsNot Nothing Then + EZA.eza_VorpapierArtCode = FCFCDE.PreviousAdministrativeReferences.Type + If FCFCDE.PreviousAdministrativeReferences.PreviousAdministrativeReference IsNot Nothing Then EZA.eza_VorpapierNr = FCFCDE.PreviousAdministrativeReferences.PreviousAdministrativeReference.ReferenceNumber + End If + + 'Beförderungsmittel Grenze + If FCFCDE.BorderTransportMeans IsNot Nothing Then + EZA.eza_BeförderungsmittelGrenzeArt = FCFCDE.BorderTransportMeans.Type + EZA.eza_VerkehrszweigGrenze = FCFCDE.BorderTransportMeans.Mode + EZA.eza_BeförderungsmittelGrenze = FCFCDE.BorderTransportMeans.Information + EZA.eza_BeförderungsmittelGrenzeStaatszugehörigkeitCode = FCFCDE.BorderTransportMeans.Nationality + End If + + 'Beförderungsmittel Inland + If FCFCDE.BorderTransportMeans IsNot Nothing Then + EZA.eza_BeförderungsmittelGrenzeArt = FCFCDE.BorderTransportMeans.Type + EZA.eza_VerkehrszweigGrenze = FCFCDE.BorderTransportMeans.Mode + EZA.eza_BeförderungsmittelGrenze = FCFCDE.BorderTransportMeans.Information + EZA.eza_BeförderungsmittelGrenzeStaatszugehörigkeitCode = FCFCDE.BorderTransportMeans.Nationality + End If + + 'Beförderungsmittel Inland + If FCFCDE.ArrivalTransportMeans IsNot Nothing Then + EZA.eza_KennzeichenNameBefoerderungsmittelAnkunft = FCFCDE.ArrivalTransportMeans.Identity + End If + + 'Ansprechpartenr + If FCFCDE.ContactPerson IsNot Nothing Then + EZA.eza_AnmeldenderBearbeiterName = FCFCDE.ContactPerson.Name + EZA.eza_AnmeldenderBearbeiterEMail = FCFCDE.ContactPerson.MailAddress + EZA.eza_AnmeldenderBearbeiterStellung = FCFCDE.ContactPerson.Position + EZA.eza_AnmeldenderBearbeiterTel = FCFCDE.ContactPerson.PhoneNumber + Dim SB_Tmp = SQL.getValueTxtBySql("SELECT isnull([mit_DAKOSY_SB],'') FROM [tblMitarbeiter] where [mit_DAKOSY_SBFull]='" & EZA.eza_AnmeldenderBearbeiterName & "'", "ADMIN") + If SB_Tmp <> "" Then + EZA.eza_Bearbeiter = SB_Tmp + End If + End If + + + + 'Anmleder + If FCFCDE.Declarant IsNot Nothing Then + Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen + ADR.ezaAd_AdressTyp = "DT" + If FCFCDE.Declarant.Name IsNot Nothing Then + If FCFCDE.Declarant.Name.ToString.Length > 40 Then + If FCFCDE.Declarant.Name.ToString.Length > 80 Then + ADR.ezaAd_NameFirma1 = FCFCDE.Declarant.Name.ToString.Substring(0, 40) + ADR.ezaAd_NameFirma2 = FCFCDE.Declarant.Name.ToString.Substring(40, 40) + ADR.ezaAd_NameFirma3 = FCFCDE.Declarant.Name.ToString.Substring(80, FCFCDE.Declarant.Name.ToString.Length - 80) + End If + ADR.ezaAd_NameFirma1 = FCFCDE.Declarant.Name.ToString.Substring(0, 40) + ADR.ezaAd_NameFirma2 = FCFCDE.Declarant.Name.ToString.Substring(40, FCFCDE.Declarant.Name.ToString.Length - 40) + Else + ADR.ezaAd_NameFirma1 = FCFCDE.Declarant.Name + End If + End If + If FCFCDE.Declarant.Identification IsNot Nothing Then + ADR.ezaAd_TeilnehmerEORI = FCFCDE.Declarant.Identification.ReferenceNumber + ADR.ezaAd_TeilnehmerNLNR = FCFCDE.Declarant.Identification.SubsidiaryNumber + End If + If FCFCDE.Declarant.Address IsNot Nothing Then + ADR.ezaAd_StrasseHausNr1 = FCFCDE.Declarant.Address.Line + ADR.ezaAd_StrasseHausNr2 = Nothing + ADR.ezaAd_Ort = FCFCDE.Declarant.Address.City + ADR.ezaAd_PLZ = FCFCDE.Declarant.Address.Postcode + ADR.ezaAd_LandCode = FCFCDE.Declarant.Address.Country + End If + EZA.eza_ADRESSEN.Add(ADR) + End If + + + + 'Vertreter + If FCFCDE.Representative IsNot Nothing Then + Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen + ADR.ezaAd_AdressTyp = "CB" + If FCFCDE.Representative.Identification IsNot Nothing Then + ADR.ezaAd_TeilnehmerEORI = FCFCDE.Representative.Identification.ReferenceNumber + ADR.ezaAd_TeilnehmerNLNR = FCFCDE.Representative.Identification.SubsidiaryNumber + EZA.eza_ADRESSEN.Add(ADR) + End If + End If + + + 'Empfänger + If FCFCDE.Body IsNot Nothing AndAlso FCFCDE.Body.Consignee IsNot Nothing Then + Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen + ADR.ezaAd_AdressTyp = "CN" + If FCFCDE.Body.Consignee.Name IsNot Nothing Then + If FCFCDE.Body.Consignee.Name.ToString.Length > 40 Then + If FCFCDE.Body.Consignee.Name.ToString.Length > 80 Then + ADR.ezaAd_NameFirma1 = FCFCDE.Body.Consignee.Name.ToString.Substring(0, 40) + ADR.ezaAd_NameFirma2 = FCFCDE.Body.Consignee.Name.ToString.Substring(40, 40) + ADR.ezaAd_NameFirma3 = FCFCDE.Body.Consignee.Name.ToString.Substring(80, FCFCDE.Body.Consignee.Name.ToString.Length - 80) + End If + ADR.ezaAd_NameFirma1 = FCFCDE.Body.Consignee.Name.ToString.Substring(0, 40) + ADR.ezaAd_NameFirma2 = FCFCDE.Body.Consignee.Name.ToString.Substring(40, FCFCDE.Body.Consignee.Name.ToString.Length - 40) + Else + ADR.ezaAd_NameFirma1 = FCFCDE.Body.Consignee.Name + End If + End If + If FCFCDE.Body.Consignee.Identification IsNot Nothing Then + ADR.ezaAd_TeilnehmerEORI = FCFCDE.Body.Consignee.Identification.ReferenceNumber + ADR.ezaAd_TeilnehmerNLNR = FCFCDE.Body.Consignee.Identification.SubsidiaryNumber + End If + If FCFCDE.Body.Consignee.Address IsNot Nothing Then + ADR.ezaAd_StrasseHausNr1 = FCFCDE.Body.Consignee.Address.Line + ADR.ezaAd_StrasseHausNr2 = Nothing + ADR.ezaAd_Ort = FCFCDE.Body.Consignee.Address.City + ADR.ezaAd_PLZ = FCFCDE.Body.Consignee.Address.Postcode + ADR.ezaAd_LandCode = FCFCDE.Body.Consignee.Address.Country + End If + EZA.eza_ADRESSEN.Add(ADR) + End If + + 'Erwerber --> NEU!!! = zusätzl. Steuerl. Angaben + If FCFCDE.Body IsNot Nothing AndAlso FCFCDE.Body.AdditionalDutyReferences IsNot Nothing AndAlso FCFCDE.Body.AdditionalDutyReferences.Count > 0 AndAlso FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty IsNot Nothing Then + + Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen + ADR.ezaAd_AdressTyp = "UC" + If FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Name IsNot Nothing Then + If FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Name.ToString.Length > 40 Then + If FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Name.ToString.Length > 80 Then + ADR.ezaAd_NameFirma1 = FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Name.ToString.Substring(0, 40) + ADR.ezaAd_NameFirma2 = FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Name.ToString.Substring(40, 40) + ADR.ezaAd_NameFirma3 = FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Name.ToString.Substring(80, FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Name.ToString.Length - 80) + End If + ADR.ezaAd_NameFirma1 = FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Name.ToString.Substring(0, 40) + ADR.ezaAd_NameFirma2 = FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Name.ToString.Substring(40, FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Name.ToString.Length - 40) + Else + ADR.ezaAd_NameFirma1 = FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Name + End If + End If + If FCFCDE.Body.AdditionalDutyReferences(0).ReferenceNumber IsNot Nothing Then + ADR.ezaAd_UStIDAnmelder = FCFCDE.Body.AdditionalDutyReferences(0).ReferenceNumber + EZA.eza_UstIdAnmelder = FCFCDE.Body.AdditionalDutyReferences(0).ReferenceNumber + End If + + If FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Identification IsNot Nothing Then + ADR.ezaAd_TeilnehmerEORI = FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Identification.ReferenceNumber + 'ADR.ezaAd_TeilnehmerNLNR = FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Identification.ReferenceNumber + End If + If FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Address IsNot Nothing Then + ADR.ezaAd_StrasseHausNr1 = FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Address.Line + ADR.ezaAd_StrasseHausNr2 = Nothing + ADR.ezaAd_Ort = FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Address.City + ADR.ezaAd_PLZ = FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Address.Postcode + ADR.ezaAd_LandCode = FCFCDE.Body.AdditionalDutyReferences(0).DutyInterestedParty.Address.Country + End If + EZA.eza_ADRESSEN.Add(ADR) + End If + + 'Versender/Ausführer + If FCFCDE.Body IsNot Nothing AndAlso FCFCDE.Body.Consignor IsNot Nothing Then + Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen + ADR.ezaAd_AdressTyp = "CZ" + If FCFCDE.Body.Consignor.Name IsNot Nothing Then + If FCFCDE.Body.Consignor.Name.ToString.Length > 40 Then + If FCFCDE.Body.Consignor.Name.ToString.Length > 80 Then + ADR.ezaAd_NameFirma1 = FCFCDE.Body.Consignor.Name.ToString.Substring(0, 40) + ADR.ezaAd_NameFirma2 = FCFCDE.Body.Consignor.Name.ToString.Substring(40, 40) + ADR.ezaAd_NameFirma3 = FCFCDE.Body.Consignor.Name.ToString.Substring(80, FCFCDE.Body.Consignor.Name.ToString.Length - 80) + End If + ADR.ezaAd_NameFirma1 = FCFCDE.Body.Consignor.Name.ToString.Substring(0, 40) + ADR.ezaAd_NameFirma2 = FCFCDE.Body.Consignor.Name.ToString.Substring(40, FCFCDE.Body.Consignor.Name.ToString.Length - 40) + Else + ADR.ezaAd_NameFirma1 = FCFCDE.Body.Consignor.Name + End If + End If + If FCFCDE.Body.Consignor.Identification IsNot Nothing Then + ADR.ezaAd_TeilnehmerEORI = FCFCDE.Body.Consignor.Identification.ReferenceNumber + ' ADR.ezaAd_TeilnehmerNLNR = FCFCDE.Body.Consignor.Identification.SubsidiaryNumber + End If + If FCFCDE.Body.Consignor.Address IsNot Nothing Then + ADR.ezaAd_StrasseHausNr1 = FCFCDE.Body.Consignor.Address.Line + ADR.ezaAd_StrasseHausNr2 = Nothing + ADR.ezaAd_Ort = FCFCDE.Body.Consignor.Address.City + ADR.ezaAd_PLZ = FCFCDE.Body.Consignor.Address.Postcode + ADR.ezaAd_LandCode = FCFCDE.Body.Consignor.Address.Country + End If + EZA.eza_ADRESSEN.Add(ADR) + End If + + 'Verkäufer + If FCFCDE.Body IsNot Nothing AndAlso FCFCDE.Body.CustomsValue IsNot Nothing AndAlso FCFCDE.Body.CustomsValue.Vendor IsNot Nothing Then + Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen + ADR.ezaAd_AdressTyp = "SE" + If FCFCDE.Body.CustomsValue.Vendor.Name IsNot Nothing Then + If FCFCDE.Body.CustomsValue.Vendor.Name.ToString.Length > 40 Then + If FCFCDE.Body.CustomsValue.Vendor.Name.ToString.Length > 80 Then + ADR.ezaAd_NameFirma1 = FCFCDE.Body.CustomsValue.Vendor.Name.ToString.Substring(0, 40) + ADR.ezaAd_NameFirma2 = FCFCDE.Body.CustomsValue.Vendor.Name.ToString.Substring(40, 40) + ADR.ezaAd_NameFirma3 = FCFCDE.Body.CustomsValue.Vendor.Name.ToString.Substring(80, FCFCDE.Body.CustomsValue.Vendor.Name.ToString.Length - 80) + End If + ADR.ezaAd_NameFirma1 = FCFCDE.Body.CustomsValue.Vendor.Name.ToString.Substring(0, 40) + ADR.ezaAd_NameFirma2 = FCFCDE.Body.CustomsValue.Vendor.Name.ToString.Substring(40, FCFCDE.Body.CustomsValue.Vendor.Name.ToString.Length - 40) + Else + ADR.ezaAd_NameFirma1 = FCFCDE.Body.CustomsValue.Vendor.Name + End If + End If + If FCFCDE.Body.CustomsValue.Vendor.Identification IsNot Nothing Then + ADR.ezaAd_TeilnehmerEORI = FCFCDE.Body.CustomsValue.Vendor.Identification.ReferenceNumber + 'ADR.ezaAd_TeilnehmerNLNR = FCFCDE.Body.CustomsValue.Vendor.Identification.SubsidiaryNumber + End If + If FCFCDE.Body.CustomsValue.Vendor.Address IsNot Nothing Then + ADR.ezaAd_StrasseHausNr1 = FCFCDE.Body.CustomsValue.Vendor.Address.Line + ADR.ezaAd_StrasseHausNr2 = Nothing + ADR.ezaAd_Ort = FCFCDE.Body.CustomsValue.Vendor.Address.City + ADR.ezaAd_PLZ = FCFCDE.Body.CustomsValue.Vendor.Address.Postcode + ADR.ezaAd_LandCode = FCFCDE.Body.CustomsValue.Vendor.Address.Country + End If + EZA.eza_ADRESSEN.Add(ADR) + End If + + 'Käufer + If FCFCDE.Body IsNot Nothing AndAlso FCFCDE.Body.CustomsValue IsNot Nothing AndAlso FCFCDE.Body.CustomsValue.Vendee IsNot Nothing Then + Dim ADR As New DAKOSY_Worker.cDakosy_EZA_Adressen + ADR.ezaAd_AdressTyp = "BY" + If FCFCDE.Body.CustomsValue.Vendee.Name IsNot Nothing Then + If FCFCDE.Body.CustomsValue.Vendee.Name.ToString.Length > 40 Then + If FCFCDE.Body.CustomsValue.Vendee.Name.ToString.Length > 80 Then + ADR.ezaAd_NameFirma1 = FCFCDE.Body.CustomsValue.Vendee.Name.ToString.Substring(0, 40) + ADR.ezaAd_NameFirma2 = FCFCDE.Body.CustomsValue.Vendee.Name.ToString.Substring(40, 40) + ADR.ezaAd_NameFirma3 = FCFCDE.Body.CustomsValue.Vendee.Name.ToString.Substring(80, FCFCDE.Body.CustomsValue.Vendee.Name.ToString.Length - 80) + End If + ADR.ezaAd_NameFirma1 = FCFCDE.Body.CustomsValue.Vendee.Name.ToString.Substring(0, 40) + ADR.ezaAd_NameFirma2 = FCFCDE.Body.CustomsValue.Vendee.Name.ToString.Substring(40, FCFCDE.Body.CustomsValue.Vendee.Name.ToString.Length - 40) + Else + ADR.ezaAd_NameFirma1 = FCFCDE.Body.CustomsValue.Vendee.Name + End If + End If + If FCFCDE.Body.CustomsValue.Vendee.Identification IsNot Nothing Then + ADR.ezaAd_TeilnehmerEORI = FCFCDE.Body.CustomsValue.Vendee.Identification.ReferenceNumber + 'ADR.ezaAd_TeilnehmerNLNR = FCFCDE.Body.CustomsValue.Vendee.Identification.SubsidiaryNumber + End If + If FCFCDE.Body.CustomsValue.Vendee.Address IsNot Nothing Then + ADR.ezaAd_StrasseHausNr1 = FCFCDE.Body.CustomsValue.Vendee.Address.Line + ADR.ezaAd_StrasseHausNr2 = Nothing + ADR.ezaAd_Ort = FCFCDE.Body.CustomsValue.Vendee.Address.City + ADR.ezaAd_PLZ = FCFCDE.Body.CustomsValue.Vendee.Address.Postcode + ADR.ezaAd_LandCode = FCFCDE.Body.CustomsValue.Vendee.Address.Country + End If + EZA.eza_ADRESSEN.Add(ADR) + End If + End If + + + + + ''Zollwertanmelder + 'ADRTMP = cEDI.getValuesFromLine(cEDI.getSimpleLine("NAD+PQ++", lines, , False)) + 'If ADRTMP.Length > 0 Then EZA.eza_ADRESSEN.Add(getEZAAresseFromLine(ADRTMP, "PQ")) + + + ''Vertr. Zollwertanmelder + 'ADRTMP = cEDI.getValuesFromLine(cEDI.getSimpleLine("NAD+AG++", lines, , False)) + 'If ADRTMP.Length > 0 Then EZA.eza_ADRESSEN.Add(getEZAAresseFromLine(ADRTMP, "AG")) + + ''Rechnung + 'ADRTMP = cEDI.getValuesFromLine(cEDI.getSimpleLine("NAD+AA++", lines)) + 'If ADRTMP.Length > 0 Then EZA.eza_ADRESSEN.Add(getEZAAresseFromLine(ADRTMP, "AA")) + + ''Postfachadresse + 'ADRTMP = cEDI.getValuesFromLine(cEDI.getSimpleLine("NAD+AAP++", lines)) + 'If ADRTMP.Length > 0 Then EZA.eza_ADRESSEN.Add(getEZAAresseFromLine(ADRTMP, "AAP")) + ''-- + + 'AUFSCHUB + If FCFCDE.DutyDefermentApproval IsNot Nothing AndAlso FCFCDE.DutyDefermentApproval.Count > 0 Then + For Each TMP In FCFCDE.DutyDefermentApproval + Dim AUFSCHUB As New DAKOSY_Worker.cDakosy_EZA_Aufschub + If TMP.DutyDefermentApplicant IsNot Nothing AndAlso TMP.DutyDefermentApplicant.Identification IsNot Nothing Then + AUFSCHUB.ezaAfb_AufschubnehmerEORI = TMP.DutyDefermentApplicant.Identification.ReferenceNumber + End If + + + AUFSCHUB.ezaAfb_AufschuBIN = TMP.AuthorisationNumber + AUFSCHUB.ezaAfb_HZA = TMP.AccountPrefix + AUFSCHUB.ezaAfb_KontoNr = TMP.AccountNumber + AUFSCHUB.ezaAfb_Aufschubart = TMP.Type + AUFSCHUB.ezaAfb_ArtAufschubantrag = TMP.ApplicationType + EZA.eza_AUFSCHUB.Add(AUFSCHUB) + Next + + End If + + + 'Lieferbedingungen + If FCFCDE.Body.DeliveryTerms IsNot Nothing Then + EZA.eza_LieferbedingungCode = FCFCDE.Body.DeliveryTerms.Code + EZA.eza_LieferbedingungText = FCFCDE.Body.DeliveryTerms.Description + EZA.eza_LieferbedingungOrt = FCFCDE.Body.DeliveryTerms.Place + EZA.eza_LieferbedingungSchluessel = FCFCDE.Body.DeliveryTerms.Key + End If + + + ' ################################################### + 'POSITIONEN + ' ################################################### + + If FCFCDE.Body IsNot Nothing AndAlso FCFCDE.Body.GoodsItem IsNot Nothing AndAlso FCFCDE.Body.GoodsItem.Count > 0 Then + For Each GOODSITEM In FCFCDE.Body.GoodsItem + Dim POS As New DAKOSY_Worker.cDakosy_EZA_Warenposition + + + POS.ezaWP_PositionsNummer = GOODSITEM.SequenceNumber + If GOODSITEM.CommodityCode IsNot Nothing Then POS.ezaWP_WarennummerEZT = GOODSITEM.CommodityCode.CommodityCode + If GOODSITEM.Procedure IsNot Nothing Then POS.ezaWP_AnmeldeVErfahren = GOODSITEM.Procedure.RequestedPreviousProcedure + + POS.ezaWP_AbgabensteuerungKz = GOODSITEM.CessionManagementFlag + POS.ezaWP_Warenbezeichnung = GOODSITEM.GoodsDescription + POS.ezaWP_PositionsZusatz = GOODSITEM.SupplementaryInformation + + If GOODSITEM.CustomsValue IsNot Nothing Then + POS.ezaWP_OrtVerbringens = GOODSITEM.CustomsValue.DestinationPlace + POS.ezaWP_AbflughafenIATACode = GOODSITEM.CustomsValue.DepartureAirport + If GOODSITEM.CustomsValue.NetPrice IsNot Nothing Then + ' POS.ezaWP_KursBetragVereinbart = GOODSITEM.CustomsValue.NetPrice.CurrencyCode + POS.ezaWP_KursVereinbartKz = GOODSITEM.CustomsValue.NetPrice.CurrencyRateAgreedFlag + POS.ezaWP_KursBetragVereinbart = GOODSITEM.CustomsValue.NetPrice.Value + 'POS.ezaWP_KursDatum= GOODSITEM.CustomsValue.NetPrice.CurrencyRate + 'POS.ezaWP_KursDatum = GOODSITEM.CustomsValue.NetPrice. + End If + + + If GOODSITEM.ForeignTradeStatistics IsNot Nothing Then + POS.ezaWP_Rohmasse = GOODSITEM.ForeignTradeStatistics.GrossMassMeasure + If GOODSITEM.ForeignTradeStatistics.Amount IsNot Nothing Then + POS.ezaWP_AHStatMengeQualifier = GOODSITEM.ForeignTradeStatistics.Amount.Qualifier + POS.ezaWP_AHStatMengeMasseinheit = GOODSITEM.ForeignTradeStatistics.Amount.MeasurementUnit + POS.ezaWP_AHStatMenge = GOODSITEM.ForeignTradeStatistics.Amount.Quantity + POS.ezaWP_AHStatWert = GOODSITEM.ForeignTradeStatistics.Quantity + End If + End If + + POS.ezaWP_UrsprungslandCode = GOODSITEM.OriginCountry + POS.ezaWP_Eigenmasse = GOODSITEM.NetMassMeasure + + ' POS.ezaWP_BeguenstigungBenatragtCode = Bedingun. + POS.ezaWP_BedingungCode = GOODSITEM.Condition + 'POS.ezaWP_EUCode = GOODSITEM.EUCode + + 'If GOODSITEM.Assessment IsNot Nothing Then + + ' POS.ezaWP_Zollwert = GOODSITEM.Assessment.Amount. + ' POS.ezaWP_KostenEUSt = GOODSITEM.Assessment.TaxCosts + ' POS.ezaWP_VeredelungWertsteigerung = GOODSITEM.Assessment.OutwardProcessingFee + 'End If + + + ''Packstücke + If GOODSITEM.Package IsNot Nothing Then + POS.ezaWP_PackstueckArt = GOODSITEM.Package.Kind + POS.ezaWP_PackstueckZeichen = GOODSITEM.Package.MarksNumbers + POS.ezaWP_PackstueckAnzahl = GOODSITEM.Package.Quantity + End If + + ''Packstücke + 'If GOODSITEM.Package IsNot Nothing AndAlso GOODSITEM.Package.Count > 0 Then + ' For Each PCK In GOODSITEM.Package + ' Dim AUFSCHUB As New DAKOSY_Worker.cDakosy_EZA_Aufschub + ' If PCK.DutyDefermentApplicant IsNot Nothing AndAlso PCK.DutyDefermentApplicant.Identification IsNot Nothing Then + ' AUFSCHUB.ezaAfb_AufschubnehmerEORI = PCK.DutyDefermentApplicant.Identification.ReferenceNumber + ' End If + ' AUFSCHUB.ezaAfb_AufschuBIN = PCK.AuthorisationNumber + ' AUFSCHUB.ezaAfb_KontoNr = PCK.AccountNumber + ' AUFSCHUB.ezaAfb_Aufschubart = PCK.Type + ' AUFSCHUB.ezaAfb_ArtAufschubantrag = PCK.ApplicationType + ' EZA.eza_AUFSCHUB.Add(AUFSCHUB) + ' Next + + 'End If + + + 'Preisart + '- + + POS.ezaWP_Artikelpreis = GOODSITEM.InvoiceAmount + 'Zusatzcode + If GOODSITEM.SupplementaryCodes IsNot Nothing AndAlso GOODSITEM.SupplementaryCodes.Count > 0 Then + Dim cnt = 0 + For Each s In GOODSITEM.SupplementaryCodes + If cnt = 0 Then POS.ezaWP_WarennummerZusatzCode1 = s.Code + If cnt = 1 Then POS.ezaWP_WarennummerZusatzCode2 = s.Code + If cnt = 2 Then POS.ezaWP_WarennummerZusatzCode3 = s.Code + If cnt = 3 Then POS.ezaWP_WarennummerZusatzCode4 = s.Code + If cnt = 4 Then POS.ezaWP_WarennummerZusatzCode5 = s.Code + If cnt = 5 Then POS.ezaWP_WarennummerZusatzCode6 = s.Code + If cnt = 6 Then POS.ezaWP_WarennummerZusatzCode7 = s.Code + If cnt = 7 Then POS.ezaWP_WarennummerZusatzCode8 = s.Code + If cnt = 8 Then POS.ezaWP_WarennummerZusatzCode9 = s.Code + If cnt = 9 Then POS.ezaWP_WarennummerZusatzCode10 = s.Code + cnt += 1 + Next + End If + + 'Abgabenminderung + '- + + 'Sonderfalldaten + If GOODSITEM.SpecialCase IsNot Nothing AndAlso GOODSITEM.SpecialCase.Count > 0 Then + For Each s In GOODSITEM.SpecialCase + Dim SA As New DAKOSY_Worker.cDakosy_EZA_WarenpositionSonderfalldaten + SA.ezaWpSfd_SonderabgabenGruppeCode = s.Group + SA.ezaWpSfd_AnwendungArt = s.ApplicationType + SA.ezaWpSfd_SatzBetragFaktor = s.RateOrAmountOrFactor + POS.ezaWP_SONDERFALLDATEN.Add(SA) + Next + End If + + + + 'Verbrauchsteuer + If GOODSITEM.ExciseDuty IsNot Nothing AndAlso GOODSITEM.ExciseDuty.Count > 0 Then + For Each s In GOODSITEM.ExciseDuty + Dim VS As New DAKOSY_Worker.cDakosy_EZA_WarenpositionVerbrauchssteuer + VS.ezaWpVs_VerbrauchsteuerCode = s.Code + VS.ezaWpVs_VerbrauchssteuerWertbasis = s.Value + 'VS.ezaWpVs_VerbrauchssteuerMenge = s.DegreePercentage + If s.Amount IsNot Nothing Then + VS.ezaWpVs_VerbrauchssteuerMasseinheitCode = s.Amount.Quantity + VS.ezaWpVs_VerbrauchssteuerMasseinheitQualifier = s.Amount.Qualifier + VS.ezaWpVs_VerbrauchssteuerMasseinheitCode = s.Amount.MeasurementUnit + End If + POS.ezaWP_VERBRAUCHSSTEUER.Add(VS) + Next + End If + + If GOODSITEM.PreferentialTreatment IsNot Nothing Then + POS.ezaWP_BeguenstigungBenatragtCode = GOODSITEM.PreferentialTreatment.RequestedPreferentialTreatment + If GOODSITEM.PreferentialTreatment.Declaration IsNot Nothing AndAlso GOODSITEM.PreferentialTreatment.Declaration.PreferentialTreatmentQuantity IsNot Nothing Then + POS.ezaWP_BeguenstigungsMengeMasseinheitCode = GOODSITEM.PreferentialTreatment.Declaration.PreferentialTreatmentQuantity.MeasurementUnit + POS.ezaWP_BeguenstigungsMengeMenge = GOODSITEM.PreferentialTreatment.Declaration.PreferentialTreatmentQuantity.Quantity + POS.ezaWP_BeguenstigungsMengeQualifier = GOODSITEM.PreferentialTreatment.Declaration.PreferentialTreatmentQuantity.Qualifier + End If + End If + + + 'Unterlagen + If GOODSITEM.Document IsNot Nothing AndAlso GOODSITEM.Document.Count > 0 Then + For Each s In GOODSITEM.Document + Dim UL As New DAKOSY_Worker.cDakosy_EZA_WarenpositionVorgelegteUnterlagen + UL.ezaWpUl_Bereich = s.Division + UL.ezaWpUl_VorlageKz = s.AtHandFlag + If s.WriteOff IsNot Nothing Then + UL.ezaWpUl_AbschreibungsMengeMasseinheitQualifier = s.WriteOff.Qualifier + UL.ezaWpUl_AbschreibungsMengeMasseinheit = s.WriteOff.MeasurementUnit + UL.ezaWpUl_AbschreibungsMenge = s.WriteOff.Quantity + + End If + UL.ezaWpUl_Art = s.Type + UL.ezaWpUl_Nummer = s.ReferenceNumber + UL.ezaWpUl_DatumAusstellung = CDate(s.IssuingDate).ToShortDateString + POS.ezaWP_UNTERLAGEN.Add(UL) + Next + End If + End If + EZA.eza_WARENPOS.Add(POS) + + Next + + End If + + + If If(EZA.eza_Status, 0) <= 5 Then EZA.eza_Status = DAKOSY_Worker.cDY_Statusliste.S_05 + If If(EZA.eza_Status_KEWILL_Equivalent, 0) <= 5 Then EZA.eza_Status_KEWILL_Equivalent = DAKOSY_Worker.cDY_Statusliste.S_05 + + + + If EZA.SAVE_ALL() Then + If If(EZA.eza_Status, 0) <= 5 Then DAKOSY_Worker.cDakosy_Statusmeldungen.InsertStatusMeldung(DY_TMP, DAKOSY_Worker.cDY_Statusliste.S_05) + Else + readEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDE = "" + End If + + + Try + System.IO.File.Delete(p) + Catch ex As Exception + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace & vbNewLine & "Datei: " & Dateiname, System.Reflection.MethodInfo.GetCurrentMethod.Name) + End Try + + addDGVEinarbeitung("EZA: FreierVerkehrAktVeredelUmwandlung", readEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDE) + + End Using + + End If + + Catch ex As Exception + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace & vbNewLine & "Datei: " & Dateiname, System.Reflection.MethodInfo.GetCurrentMethod.Name) + readEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDE = "" + End Try + End Function + Function readEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDF(doc As XmlDocument) As String Try readEZA_FreierVerkehrAktVeredelUmwandlungXML_FCFCDF = "" diff --git a/initATLASAufschubkonten/frmStartOptions.vb b/initATLASAufschubkonten/frmStartOptions.vb index 0f7908f..d4b1670 100644 --- a/initATLASAufschubkonten/frmStartOptions.vb +++ b/initATLASAufschubkonten/frmStartOptions.vb @@ -2242,7 +2242,7 @@ Public Class frmStartOptions Dim firmatmp = VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA Try VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = Mail_FIMRA - Dim dateBack = If(TageZurueck <> "", CDate(Now.ToString("01.MM.yyyy")).AddDays(TageZurueck * -1), CDate(Now.ToString("01.MM.yyyy")).AddMonths(-1)) + Dim dateBack = If(TageZurueck <> "", CDate(Now.AddDays(TageZurueck * -1)), CDate(Now.ToString("01.MM.yyyy")).AddMonths(-1)) Dim dt = VERAG_PROG_ALLGEMEIN.cUIDPruefung.doUIDPruefungALL(dateBack, True, False, maxAnz, False) If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then Dim PDF = VERAG_PROG_ALLGEMEIN.cProgramFunctions.genExcelFromDT_NEW(dt,,,,, False)