diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/AES/AusfuhrAnmeldung_004.Designer.vb b/DAKOSY_Worker/DAKOSY/ATLAS/AES/AusfuhrAnmeldung_004.Designer.vb
new file mode 100644
index 0000000..bf0e6d3
--- /dev/null
+++ b/DAKOSY_Worker/DAKOSY/ATLAS/AES/AusfuhrAnmeldung_004.Designer.vb
@@ -0,0 +1,10505 @@
+'' ------------------------------------------------------------------------------
+''
+'' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com
+'' {"TargetFramework":"Net47","NameSpace":"AusfuhrAnmeldung_004","Language":"VisualBasic","ExcludeImportedTypes":true,"ExpandNestedAttributeGroup":true,"GenerateUnusedComplexType":true,"GenerateUnusedSimpleType":true,"Properties":{},"XmlAttribute":{"Enabled":true},"ClassParams":{},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{"Formating":true},"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 AusfuhrAnmeldung_004
+
+
+ Partial Public Class AusfuhrAnmeldungEGTyp
+ Inherits DatenaustauschExportTyp
+
+#Region "Private fields"
+ Private _einzelAnmeldung As EinzelAusfuhrAnmeldungTyp
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._einzelAnmeldung = New EinzelAusfuhrAnmeldungTyp()
+ End Sub
+
+
+ Public Property EinzelAnmeldung() As EinzelAusfuhrAnmeldungTyp
+ Get
+ Return Me._einzelAnmeldung
+ End Get
+ Set
+ Me._einzelAnmeldung = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AusfuhrAnmeldungEGTyp))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize AusfuhrAnmeldungEGTyp 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 AusfuhrAnmeldungEGTyp object
+ '''
+ ''' string to deserialize
+ ''' Output AusfuhrAnmeldungEGTyp 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 AusfuhrAnmeldungEGTyp, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, AusfuhrAnmeldungEGTyp)
+ 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 AusfuhrAnmeldungEGTyp) 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 AusfuhrAnmeldungEGTyp
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AusfuhrAnmeldungEGTyp)
+ 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 AusfuhrAnmeldungEGTyp
+ Return CType(SerializerXml.Deserialize(s), AusfuhrAnmeldungEGTyp)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current AusfuhrAnmeldungEGTyp 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 AusfuhrAnmeldungEGTyp object
+ '''
+ ''' File to load and deserialize
+ ''' Output AusfuhrAnmeldungEGTyp 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 AusfuhrAnmeldungEGTyp, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, AusfuhrAnmeldungEGTyp)
+ 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 AusfuhrAnmeldungEGTyp) 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 AusfuhrAnmeldungEGTyp
+ 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 EinzelAusfuhrAnmeldungTyp
+
+#Region "Private fields"
+ Private _objektIdentifizierung As ObjektIdentifizierungEGTyp
+
+ Private _exportOperation As ExportOperationEGType
+
+ Private _goodsItem As List(Of GoodsItemEGType)
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._goodsItem = New List(Of GoodsItemEGType)()
+ Me._exportOperation = New ExportOperationEGType()
+ Me._objektIdentifizierung = New ObjektIdentifizierungEGTyp()
+ End Sub
+
+
+ Public Property ObjektIdentifizierung() As ObjektIdentifizierungEGTyp
+ Get
+ Return Me._objektIdentifizierung
+ End Get
+ Set
+ Me._objektIdentifizierung = Value
+ End Set
+ End Property
+
+
+ Public Property ExportOperation() As ExportOperationEGType
+ Get
+ Return Me._exportOperation
+ End Get
+ Set
+ Me._exportOperation = Value
+ End Set
+ End Property
+
+
+ Public Property GoodsItem() As List(Of GoodsItemEGType)
+ 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(EinzelAusfuhrAnmeldungTyp))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize EinzelAusfuhrAnmeldungTyp 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 EinzelAusfuhrAnmeldungTyp object
+ '''
+ ''' string to deserialize
+ ''' Output EinzelAusfuhrAnmeldungTyp 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 EinzelAusfuhrAnmeldungTyp, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, EinzelAusfuhrAnmeldungTyp)
+ 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 EinzelAusfuhrAnmeldungTyp) 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 EinzelAusfuhrAnmeldungTyp
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), EinzelAusfuhrAnmeldungTyp)
+ 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 EinzelAusfuhrAnmeldungTyp
+ Return CType(SerializerXml.Deserialize(s), EinzelAusfuhrAnmeldungTyp)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current EinzelAusfuhrAnmeldungTyp 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 EinzelAusfuhrAnmeldungTyp object
+ '''
+ ''' File to load and deserialize
+ ''' Output EinzelAusfuhrAnmeldungTyp 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 EinzelAusfuhrAnmeldungTyp, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, EinzelAusfuhrAnmeldungTyp)
+ 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 EinzelAusfuhrAnmeldungTyp) 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 EinzelAusfuhrAnmeldungTyp
+ 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 ObjektIdentifizierungEGTyp
+
+#Region "Private fields"
+ Private _objektName As String
+
+ Private _objektAliasname As String
+
+ Private _bezugsnummerVorblendung As String
+
+ Private _kopieVon As String
+
+ Private _objektAktion As List(Of String)
+
+ Private _compliancePruefung As String
+
+ Private _bearbeiter As String
+
+ Private _absenderSystemName As String
+
+ Private _shipmentReferenz As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._objektAktion = New List(Of String)()
+ End Sub
+
+
+ Public Property ObjektName() As String
+ Get
+ Return Me._objektName
+ End Get
+ Set
+ Me._objektName = Value
+ End Set
+ End Property
+
+
+ Public Property ObjektAliasname() As String
+ Get
+ Return Me._objektAliasname
+ End Get
+ Set
+ Me._objektAliasname = Value
+ End Set
+ End Property
+
+
+ Public Property BezugsnummerVorblendung() As String
+ Get
+ Return Me._bezugsnummerVorblendung
+ End Get
+ Set
+ Me._bezugsnummerVorblendung = Value
+ End Set
+ End Property
+
+
+ Public Property KopieVon() As String
+ Get
+ Return Me._kopieVon
+ End Get
+ Set
+ Me._kopieVon = Value
+ End Set
+ End Property
+
+
+ Public Property ObjektAktion() As List(Of String)
+ Get
+ Return Me._objektAktion
+ End Get
+ Set
+ Me._objektAktion = Value
+ End Set
+ End Property
+
+
+ Public Property CompliancePruefung() As String
+ Get
+ Return Me._compliancePruefung
+ End Get
+ Set
+ Me._compliancePruefung = Value
+ End Set
+ End Property
+
+
+ Public Property Bearbeiter() As String
+ Get
+ Return Me._bearbeiter
+ End Get
+ Set
+ Me._bearbeiter = Value
+ End Set
+ End Property
+
+
+ Public Property AbsenderSystemName() As String
+ Get
+ Return Me._absenderSystemName
+ End Get
+ Set
+ Me._absenderSystemName = Value
+ End Set
+ End Property
+
+
+ Public Property ShipmentReferenz() As String
+ Get
+ Return Me._shipmentReferenz
+ End Get
+ Set
+ Me._shipmentReferenz = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ObjektIdentifizierungEGTyp))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize ObjektIdentifizierungEGTyp 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 ObjektIdentifizierungEGTyp object
+ '''
+ ''' string to deserialize
+ ''' Output ObjektIdentifizierungEGTyp 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 ObjektIdentifizierungEGTyp, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, ObjektIdentifizierungEGTyp)
+ 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 ObjektIdentifizierungEGTyp) 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 ObjektIdentifizierungEGTyp
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ObjektIdentifizierungEGTyp)
+ 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 ObjektIdentifizierungEGTyp
+ Return CType(SerializerXml.Deserialize(s), ObjektIdentifizierungEGTyp)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current ObjektIdentifizierungEGTyp 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 ObjektIdentifizierungEGTyp object
+ '''
+ ''' File to load and deserialize
+ ''' Output ObjektIdentifizierungEGTyp 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 ObjektIdentifizierungEGTyp, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, ObjektIdentifizierungEGTyp)
+ 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 ObjektIdentifizierungEGTyp) 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 ObjektIdentifizierungEGTyp
+ 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 InwardProcessingGoodsReferenceEGType
+
+#Region "Private fields"
+ Private _goodsItemNumber As String
+
+ Private _mRN As String
+
+ Private _registrationNumber As String
+
+ Private _accessViaATLAS As String
+
+ Private _goodsRelatedData As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property GoodsItemNumber() As String
+ Get
+ Return Me._goodsItemNumber
+ End Get
+ Set
+ Me._goodsItemNumber = Value
+ End Set
+ End Property
+
+
+ Public Property MRN() As String
+ Get
+ Return Me._mRN
+ End Get
+ Set
+ Me._mRN = Value
+ End Set
+ End Property
+
+
+ Public Property RegistrationNumber() As String
+ Get
+ Return Me._registrationNumber
+ End Get
+ Set
+ Me._registrationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property AccessViaATLAS() As String
+ Get
+ Return Me._accessViaATLAS
+ End Get
+ Set
+ Me._accessViaATLAS = Value
+ End Set
+ End Property
+
+
+ Public Property GoodsRelatedData() As String
+ Get
+ Return Me._goodsRelatedData
+ End Get
+ Set
+ Me._goodsRelatedData = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(InwardProcessingGoodsReferenceEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize InwardProcessingGoodsReferenceEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 InwardProcessingGoodsReferenceEGType object
+ '''
+ ''' string to deserialize
+ ''' Output InwardProcessingGoodsReferenceEGType 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 InwardProcessingGoodsReferenceEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, InwardProcessingGoodsReferenceEGType)
+ 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 InwardProcessingGoodsReferenceEGType) 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 InwardProcessingGoodsReferenceEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), InwardProcessingGoodsReferenceEGType)
+ 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 InwardProcessingGoodsReferenceEGType
+ Return CType(SerializerXml.Deserialize(s), InwardProcessingGoodsReferenceEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current InwardProcessingGoodsReferenceEGType 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 InwardProcessingGoodsReferenceEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output InwardProcessingGoodsReferenceEGType 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 InwardProcessingGoodsReferenceEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, InwardProcessingGoodsReferenceEGType)
+ 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 InwardProcessingGoodsReferenceEGType) 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 InwardProcessingGoodsReferenceEGType
+ 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 InwardProcessingEGType
+
+#Region "Private fields"
+ Private _simplyGrantedAuthorisation As String
+
+ Private _customsOfficeOfSupervision As String
+
+ Private _typeOfAuthorisation As String
+
+ Private _referenceNumber As String
+
+ Private _goodsReference As List(Of InwardProcessingGoodsReferenceEGType)
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._goodsReference = New List(Of InwardProcessingGoodsReferenceEGType)()
+ End Sub
+
+
+ Public Property SimplyGrantedAuthorisation() As String
+ Get
+ Return Me._simplyGrantedAuthorisation
+ End Get
+ Set
+ Me._simplyGrantedAuthorisation = Value
+ End Set
+ End Property
+
+
+ Public Property CustomsOfficeOfSupervision() As String
+ Get
+ Return Me._customsOfficeOfSupervision
+ End Get
+ Set
+ Me._customsOfficeOfSupervision = Value
+ End Set
+ End Property
+
+
+ Public Property TypeOfAuthorisation() As String
+ Get
+ Return Me._typeOfAuthorisation
+ End Get
+ Set
+ Me._typeOfAuthorisation = 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 GoodsReference() As List(Of InwardProcessingGoodsReferenceEGType)
+ Get
+ Return Me._goodsReference
+ End Get
+ Set
+ Me._goodsReference = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(InwardProcessingEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize InwardProcessingEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 InwardProcessingEGType object
+ '''
+ ''' string to deserialize
+ ''' Output InwardProcessingEGType 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 InwardProcessingEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, InwardProcessingEGType)
+ 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 InwardProcessingEGType) 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 InwardProcessingEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), InwardProcessingEGType)
+ 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 InwardProcessingEGType
+ Return CType(SerializerXml.Deserialize(s), InwardProcessingEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current InwardProcessingEGType 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 InwardProcessingEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output InwardProcessingEGType 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 InwardProcessingEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, InwardProcessingEGType)
+ 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 InwardProcessingEGType) 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 InwardProcessingEGType
+ 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 GoodsReductionAfterTreatmentEGType
+
+#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(GoodsReductionAfterTreatmentEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize GoodsReductionAfterTreatmentEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 GoodsReductionAfterTreatmentEGType object
+ '''
+ ''' string to deserialize
+ ''' Output GoodsReductionAfterTreatmentEGType 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 GoodsReductionAfterTreatmentEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, GoodsReductionAfterTreatmentEGType)
+ 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 GoodsReductionAfterTreatmentEGType) 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 GoodsReductionAfterTreatmentEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), GoodsReductionAfterTreatmentEGType)
+ 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 GoodsReductionAfterTreatmentEGType
+ Return CType(SerializerXml.Deserialize(s), GoodsReductionAfterTreatmentEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current GoodsReductionAfterTreatmentEGType 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 GoodsReductionAfterTreatmentEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output GoodsReductionAfterTreatmentEGType 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 GoodsReductionAfterTreatmentEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, GoodsReductionAfterTreatmentEGType)
+ 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 GoodsReductionAfterTreatmentEGType) 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 GoodsReductionAfterTreatmentEGType
+ 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 GoodsReductionEGType
+
+#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(GoodsReductionEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize GoodsReductionEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 GoodsReductionEGType object
+ '''
+ ''' string to deserialize
+ ''' Output GoodsReductionEGType 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 GoodsReductionEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, GoodsReductionEGType)
+ 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 GoodsReductionEGType) 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 GoodsReductionEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), GoodsReductionEGType)
+ 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 GoodsReductionEGType
+ Return CType(SerializerXml.Deserialize(s), GoodsReductionEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current GoodsReductionEGType 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 GoodsReductionEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output GoodsReductionEGType 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 GoodsReductionEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, GoodsReductionEGType)
+ 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 GoodsReductionEGType) 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 GoodsReductionEGType
+ 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 CustomsWarehousingGoodsReferenceEGType
+
+#Region "Private fields"
+ Private _goodsItemNumber As String
+
+ Private _mRN As String
+
+ Private _registrationNumber As String
+
+ Private _articleCode As String
+
+ Private _owner As String
+
+ Private _chargeNumber As String
+
+ Private _countryOfOrigin As String
+
+ Private _netMass As String
+
+ Private _statisticalValue As String
+
+ Private _quantity As String
+
+ Private _commodityCode As String
+
+ Private _usualTreatment As String
+
+ Private _accessViaATLAS As String
+
+ Private _complementOfInformation As String
+
+ Private _goodsReduction As GoodsReductionEGType
+
+ Private _goodsReductionAfterTreatment As GoodsReductionAfterTreatmentEGType
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._goodsReductionAfterTreatment = New GoodsReductionAfterTreatmentEGType()
+ Me._goodsReduction = New GoodsReductionEGType()
+ End Sub
+
+
+ Public Property GoodsItemNumber() As String
+ Get
+ Return Me._goodsItemNumber
+ End Get
+ Set
+ Me._goodsItemNumber = Value
+ End Set
+ End Property
+
+
+ Public Property MRN() As String
+ Get
+ Return Me._mRN
+ End Get
+ Set
+ Me._mRN = Value
+ End Set
+ End Property
+
+
+ Public Property RegistrationNumber() As String
+ Get
+ Return Me._registrationNumber
+ End Get
+ Set
+ Me._registrationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property ArticleCode() As String
+ Get
+ Return Me._articleCode
+ End Get
+ Set
+ Me._articleCode = Value
+ End Set
+ End Property
+
+
+ Public Property Owner() As String
+ Get
+ Return Me._owner
+ End Get
+ Set
+ Me._owner = Value
+ End Set
+ End Property
+
+
+ Public Property ChargeNumber() As String
+ Get
+ Return Me._chargeNumber
+ End Get
+ Set
+ Me._chargeNumber = Value
+ End Set
+ End Property
+
+
+ Public Property CountryOfOrigin() As String
+ Get
+ Return Me._countryOfOrigin
+ End Get
+ Set
+ Me._countryOfOrigin = Value
+ End Set
+ End Property
+
+
+ Public Property NetMass() As String
+ Get
+ Return Me._netMass
+ End Get
+ Set
+ Me._netMass = Value
+ End Set
+ End Property
+
+
+ Public Property StatisticalValue() As String
+ Get
+ Return Me._statisticalValue
+ End Get
+ Set
+ Me._statisticalValue = 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 CommodityCode() As String
+ Get
+ Return Me._commodityCode
+ End Get
+ Set
+ Me._commodityCode = Value
+ End Set
+ End Property
+
+
+ Public Property UsualTreatment() As String
+ Get
+ Return Me._usualTreatment
+ End Get
+ Set
+ Me._usualTreatment = Value
+ End Set
+ End Property
+
+
+ Public Property AccessViaATLAS() As String
+ Get
+ Return Me._accessViaATLAS
+ End Get
+ Set
+ Me._accessViaATLAS = Value
+ End Set
+ End Property
+
+
+ Public Property ComplementOfInformation() As String
+ Get
+ Return Me._complementOfInformation
+ End Get
+ Set
+ Me._complementOfInformation = Value
+ End Set
+ End Property
+
+
+ Public Property GoodsReduction() As GoodsReductionEGType
+ Get
+ Return Me._goodsReduction
+ End Get
+ Set
+ Me._goodsReduction = Value
+ End Set
+ End Property
+
+
+ Public Property GoodsReductionAfterTreatment() As GoodsReductionAfterTreatmentEGType
+ Get
+ Return Me._goodsReductionAfterTreatment
+ End Get
+ Set
+ Me._goodsReductionAfterTreatment = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(CustomsWarehousingGoodsReferenceEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize CustomsWarehousingGoodsReferenceEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 CustomsWarehousingGoodsReferenceEGType object
+ '''
+ ''' string to deserialize
+ ''' Output CustomsWarehousingGoodsReferenceEGType 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 CustomsWarehousingGoodsReferenceEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, CustomsWarehousingGoodsReferenceEGType)
+ 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 CustomsWarehousingGoodsReferenceEGType) 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 CustomsWarehousingGoodsReferenceEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CustomsWarehousingGoodsReferenceEGType)
+ 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 CustomsWarehousingGoodsReferenceEGType
+ Return CType(SerializerXml.Deserialize(s), CustomsWarehousingGoodsReferenceEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current CustomsWarehousingGoodsReferenceEGType 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 CustomsWarehousingGoodsReferenceEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output CustomsWarehousingGoodsReferenceEGType 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 CustomsWarehousingGoodsReferenceEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, CustomsWarehousingGoodsReferenceEGType)
+ 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 CustomsWarehousingGoodsReferenceEGType) 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 CustomsWarehousingGoodsReferenceEGType
+ 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 CustomsWarehousingEGType
+
+#Region "Private fields"
+ Private _typeOfAuthorisation As String
+
+ Private _referenceNumber As String
+
+ Private _lRN As String
+
+ Private _goodsReference As List(Of CustomsWarehousingGoodsReferenceEGType)
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._goodsReference = New List(Of CustomsWarehousingGoodsReferenceEGType)()
+ End Sub
+
+
+ Public Property TypeOfAuthorisation() As String
+ Get
+ Return Me._typeOfAuthorisation
+ End Get
+ Set
+ Me._typeOfAuthorisation = 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 LRN() As String
+ Get
+ Return Me._lRN
+ End Get
+ Set
+ Me._lRN = Value
+ End Set
+ End Property
+
+
+ Public Property GoodsReference() As List(Of CustomsWarehousingGoodsReferenceEGType)
+ Get
+ Return Me._goodsReference
+ End Get
+ Set
+ Me._goodsReference = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(CustomsWarehousingEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize CustomsWarehousingEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 CustomsWarehousingEGType object
+ '''
+ ''' string to deserialize
+ ''' Output CustomsWarehousingEGType 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 CustomsWarehousingEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, CustomsWarehousingEGType)
+ 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 CustomsWarehousingEGType) 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 CustomsWarehousingEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CustomsWarehousingEGType)
+ 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 CustomsWarehousingEGType
+ Return CType(SerializerXml.Deserialize(s), CustomsWarehousingEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current CustomsWarehousingEGType 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 CustomsWarehousingEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output CustomsWarehousingEGType 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 CustomsWarehousingEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, CustomsWarehousingEGType)
+ 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 CustomsWarehousingEGType) 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 CustomsWarehousingEGType
+ 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 ProcedureTransferenceEGType
+
+#Region "Private fields"
+ Private _customsWarehousing As CustomsWarehousingEGType
+
+ Private _inwardProcessing As InwardProcessingEGType
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._inwardProcessing = New InwardProcessingEGType()
+ Me._customsWarehousing = New CustomsWarehousingEGType()
+ End Sub
+
+
+ Public Property CustomsWarehousing() As CustomsWarehousingEGType
+ Get
+ Return Me._customsWarehousing
+ End Get
+ Set
+ Me._customsWarehousing = Value
+ End Set
+ End Property
+
+
+ Public Property InwardProcessing() As InwardProcessingEGType
+ Get
+ Return Me._inwardProcessing
+ End Get
+ Set
+ Me._inwardProcessing = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ProcedureTransferenceEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize ProcedureTransferenceEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 ProcedureTransferenceEGType object
+ '''
+ ''' string to deserialize
+ ''' Output ProcedureTransferenceEGType 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 ProcedureTransferenceEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, ProcedureTransferenceEGType)
+ 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 ProcedureTransferenceEGType) 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 ProcedureTransferenceEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ProcedureTransferenceEGType)
+ 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 ProcedureTransferenceEGType
+ Return CType(SerializerXml.Deserialize(s), ProcedureTransferenceEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current ProcedureTransferenceEGType 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 ProcedureTransferenceEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output ProcedureTransferenceEGType 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 ProcedureTransferenceEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, ProcedureTransferenceEGType)
+ 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 ProcedureTransferenceEGType) 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 ProcedureTransferenceEGType
+ 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 SupportingDocumentGoodsItemEGType
+
+#Region "Private fields"
+ Private _type As String
+
+ Private _qualifier As String
+
+ Private _referenceNumber As String
+
+ Private _documentLineItemNumber As String
+
+ Private _issuingAuthorityName As String
+
+ Private _complementOfInformation As String
+
+ Private _detail As String
+
+ Private _issuingDate As Date
+
+ Private _validityDate As Date
+
+ Private _amount As String
+
+ Private _currency As String
+
+ Private _quantity As String
+
+ Private _measurementUnitAndQualifier As String
+
+ Private _complementaryUnit 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 Qualifier() As String
+ Get
+ Return Me._qualifier
+ End Get
+ Set
+ Me._qualifier = Value
+ End Set
+ End Property
+
+
+ Public Property ReferenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property DocumentLineItemNumber() As String
+ Get
+ Return Me._documentLineItemNumber
+ End Get
+ Set
+ Me._documentLineItemNumber = Value
+ End Set
+ End Property
+
+
+ Public Property IssuingAuthorityName() As String
+ Get
+ Return Me._issuingAuthorityName
+ End Get
+ Set
+ Me._issuingAuthorityName = Value
+ End Set
+ End Property
+
+
+ Public Property ComplementOfInformation() As String
+ Get
+ Return Me._complementOfInformation
+ End Get
+ Set
+ Me._complementOfInformation = Value
+ End Set
+ End Property
+
+
+ Public Property Detail() As String
+ Get
+ Return Me._detail
+ End Get
+ Set
+ Me._detail = 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 ValidityDate() As Date
+ Get
+ Return Me._validityDate
+ End Get
+ Set
+ Me._validityDate = Value
+ End Set
+ End Property
+
+
+ Public Property Amount() As String
+ Get
+ Return Me._amount
+ End Get
+ Set
+ Me._amount = Value
+ End Set
+ End Property
+
+
+ Public Property Currency() As String
+ Get
+ Return Me._currency
+ End Get
+ Set
+ Me._currency = 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 MeasurementUnitAndQualifier() As String
+ Get
+ Return Me._measurementUnitAndQualifier
+ End Get
+ Set
+ Me._measurementUnitAndQualifier = Value
+ End Set
+ End Property
+
+
+ Public Property ComplementaryUnit() As String
+ Get
+ Return Me._complementaryUnit
+ End Get
+ Set
+ Me._complementaryUnit = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(SupportingDocumentGoodsItemEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize SupportingDocumentGoodsItemEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 SupportingDocumentGoodsItemEGType object
+ '''
+ ''' string to deserialize
+ ''' Output SupportingDocumentGoodsItemEGType 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 SupportingDocumentGoodsItemEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, SupportingDocumentGoodsItemEGType)
+ 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 SupportingDocumentGoodsItemEGType) 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 SupportingDocumentGoodsItemEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), SupportingDocumentGoodsItemEGType)
+ 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 SupportingDocumentGoodsItemEGType
+ Return CType(SerializerXml.Deserialize(s), SupportingDocumentGoodsItemEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current SupportingDocumentGoodsItemEGType 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 SupportingDocumentGoodsItemEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output SupportingDocumentGoodsItemEGType 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 SupportingDocumentGoodsItemEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, SupportingDocumentGoodsItemEGType)
+ 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 SupportingDocumentGoodsItemEGType) 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 SupportingDocumentGoodsItemEGType
+ 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 OutwardProcessingGoodsItemEGType
+
+#Region "Private fields"
+ Private _replacement As String
+
+ Private _reimportDate As Date
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property Replacement() As String
+ Get
+ Return Me._replacement
+ End Get
+ Set
+ Me._replacement = Value
+ End Set
+ End Property
+
+
+ Public Property ReimportDate() As Date
+ Get
+ Return Me._reimportDate
+ End Get
+ Set
+ Me._reimportDate = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(OutwardProcessingGoodsItemEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize OutwardProcessingGoodsItemEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 OutwardProcessingGoodsItemEGType object
+ '''
+ ''' string to deserialize
+ ''' Output OutwardProcessingGoodsItemEGType 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 OutwardProcessingGoodsItemEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, OutwardProcessingGoodsItemEGType)
+ 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 OutwardProcessingGoodsItemEGType) 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 OutwardProcessingGoodsItemEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), OutwardProcessingGoodsItemEGType)
+ 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 OutwardProcessingGoodsItemEGType
+ Return CType(SerializerXml.Deserialize(s), OutwardProcessingGoodsItemEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current OutwardProcessingGoodsItemEGType 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 OutwardProcessingGoodsItemEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output OutwardProcessingGoodsItemEGType 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 OutwardProcessingGoodsItemEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, OutwardProcessingGoodsItemEGType)
+ 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 OutwardProcessingGoodsItemEGType) 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 OutwardProcessingGoodsItemEGType
+ 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 PackagingEGType
+
+#Region "Private fields"
+ Private _numberOfPackages As String
+
+ Private _typeOfPackages As String
+
+ Private _shippingMarks As String
+
+ Private _packageReference As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property NumberOfPackages() As String
+ Get
+ Return Me._numberOfPackages
+ End Get
+ Set
+ Me._numberOfPackages = Value
+ End Set
+ End Property
+
+
+ Public Property TypeOfPackages() As String
+ Get
+ Return Me._typeOfPackages
+ End Get
+ Set
+ Me._typeOfPackages = Value
+ End Set
+ End Property
+
+
+ Public Property ShippingMarks() As String
+ Get
+ Return Me._shippingMarks
+ End Get
+ Set
+ Me._shippingMarks = Value
+ End Set
+ End Property
+
+
+ Public Property PackageReference() As String
+ Get
+ Return Me._packageReference
+ End Get
+ Set
+ Me._packageReference = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PackagingEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize PackagingEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 PackagingEGType object
+ '''
+ ''' string to deserialize
+ ''' Output PackagingEGType 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 PackagingEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, PackagingEGType)
+ 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 PackagingEGType) 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 PackagingEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PackagingEGType)
+ 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 PackagingEGType
+ Return CType(SerializerXml.Deserialize(s), PackagingEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current PackagingEGType 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 PackagingEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output PackagingEGType 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 PackagingEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, PackagingEGType)
+ 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 PackagingEGType) 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 PackagingEGType
+ 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 PreviousDocumentGoodsItemEGType
+
+#Region "Private fields"
+ Private _type As String
+
+ Private _qualifier As String
+
+ Private _referenceNumber As String
+
+ Private _goodsItemNumber As String
+
+ Private _measurementUnitAndQualifier As String
+
+ Private _quantity As String
+
+ Private _complementOfInformation 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 Qualifier() As String
+ Get
+ Return Me._qualifier
+ End Get
+ Set
+ Me._qualifier = 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 GoodsItemNumber() As String
+ Get
+ Return Me._goodsItemNumber
+ End Get
+ Set
+ Me._goodsItemNumber = Value
+ End Set
+ End Property
+
+
+ Public Property MeasurementUnitAndQualifier() As String
+ Get
+ Return Me._measurementUnitAndQualifier
+ End Get
+ Set
+ Me._measurementUnitAndQualifier = 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 ComplementOfInformation() As String
+ Get
+ Return Me._complementOfInformation
+ End Get
+ Set
+ Me._complementOfInformation = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PreviousDocumentGoodsItemEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize PreviousDocumentGoodsItemEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 PreviousDocumentGoodsItemEGType object
+ '''
+ ''' string to deserialize
+ ''' Output PreviousDocumentGoodsItemEGType 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 PreviousDocumentGoodsItemEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, PreviousDocumentGoodsItemEGType)
+ 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 PreviousDocumentGoodsItemEGType) 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 PreviousDocumentGoodsItemEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PreviousDocumentGoodsItemEGType)
+ 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 PreviousDocumentGoodsItemEGType
+ Return CType(SerializerXml.Deserialize(s), PreviousDocumentGoodsItemEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current PreviousDocumentGoodsItemEGType 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 PreviousDocumentGoodsItemEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output PreviousDocumentGoodsItemEGType 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 PreviousDocumentGoodsItemEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, PreviousDocumentGoodsItemEGType)
+ 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 PreviousDocumentGoodsItemEGType) 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 PreviousDocumentGoodsItemEGType
+ 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 GoodsItemEGType
+
+#Region "Private fields"
+ Private _declarationGoodsItemNumber As String
+
+ Private _articleNumber As String
+
+ Private _commodityCode As String
+
+ Private _taricAdditionalCode As List(Of String)
+
+ Private _descriptionOfGoods As String
+
+ Private _cusCode As String
+
+ Private _registrationNumberExternal As String
+
+ Private _additionalInformation As List(Of AdditionalInformationEGType)
+
+ Private _referenceNumberUCR As String
+
+ Private _authorisation As List(Of AuthorisationGoodsItemEGType)
+
+ Private _additionalSupplyChainActor As List(Of AdditionalSupplyChainActorEGType)
+
+ Private _regionOfDispatch As String
+
+ Private _countryOfOrigin As String
+
+ Private _netMass As String
+
+ Private _grossMass As String
+
+ Private _uNNumber As List(Of String)
+
+ Private _transportCharges As String
+
+ Private _countryOfExport As String
+
+ Private _requestedProcedure As String
+
+ Private _previousProcedure As String
+
+ Private _additionalProcedure As String
+
+ Private _supplementaryUnits As String
+
+ Private _statisticalValue As String
+
+ Private _currencyStatisticalValue As String
+
+ Private _previousDocument As List(Of PreviousDocumentGoodsItemEGType)
+
+ Private _packaging As List(Of PackagingEGType)
+
+ Private _outwardProcessing As OutwardProcessingGoodsItemEGType
+
+ Private _supportingDocument As List(Of SupportingDocumentGoodsItemEGType)
+
+ Private _additionalReference As List(Of AdditionalReferenceGoodsItemEGType)
+
+ Private _consignee As AddressEGType
+
+ Private _consignor As AddressEGType
+
+ Private _procedureTransference As ProcedureTransferenceEGType
+
+ Private _natureOfTransaction As String
+
+ Private _applicationInternalData As ApplicationInternalDataType
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._applicationInternalData = New ApplicationInternalDataType()
+ Me._procedureTransference = New ProcedureTransferenceEGType()
+ Me._consignor = New AddressEGType()
+ Me._consignee = New AddressEGType()
+ Me._additionalReference = New List(Of AdditionalReferenceGoodsItemEGType)()
+ Me._supportingDocument = New List(Of SupportingDocumentGoodsItemEGType)()
+ Me._outwardProcessing = New OutwardProcessingGoodsItemEGType()
+ Me._packaging = New List(Of PackagingEGType)()
+ Me._previousDocument = New List(Of PreviousDocumentGoodsItemEGType)()
+ Me._uNNumber = New List(Of String)()
+ Me._additionalSupplyChainActor = New List(Of AdditionalSupplyChainActorEGType)()
+ Me._authorisation = New List(Of AuthorisationGoodsItemEGType)()
+ Me._additionalInformation = New List(Of AdditionalInformationEGType)()
+ Me._taricAdditionalCode = New List(Of String)()
+ End Sub
+
+
+ Public Property DeclarationGoodsItemNumber() As String
+ Get
+ Return Me._declarationGoodsItemNumber
+ End Get
+ Set
+ Me._declarationGoodsItemNumber = Value
+ End Set
+ End Property
+
+
+ Public Property ArticleNumber() As String
+ Get
+ Return Me._articleNumber
+ End Get
+ Set
+ Me._articleNumber = 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 TaricAdditionalCode() As List(Of String)
+ Get
+ Return Me._taricAdditionalCode
+ End Get
+ Set
+ Me._taricAdditionalCode = Value
+ End Set
+ End Property
+
+
+ Public Property DescriptionOfGoods() As String
+ Get
+ Return Me._descriptionOfGoods
+ End Get
+ Set
+ Me._descriptionOfGoods = Value
+ End Set
+ End Property
+
+
+ Public Property CusCode() As String
+ Get
+ Return Me._cusCode
+ End Get
+ Set
+ Me._cusCode = Value
+ End Set
+ End Property
+
+
+ Public Property RegistrationNumberExternal() As String
+ Get
+ Return Me._registrationNumberExternal
+ End Get
+ Set
+ Me._registrationNumberExternal = Value
+ End Set
+ End Property
+
+
+ Public Property AdditionalInformation() As List(Of AdditionalInformationEGType)
+ Get
+ Return Me._additionalInformation
+ End Get
+ Set
+ Me._additionalInformation = Value
+ End Set
+ End Property
+
+
+ Public Property ReferenceNumberUCR() As String
+ Get
+ Return Me._referenceNumberUCR
+ End Get
+ Set
+ Me._referenceNumberUCR = Value
+ End Set
+ End Property
+
+
+ Public Property Authorisation() As List(Of AuthorisationGoodsItemEGType)
+ Get
+ Return Me._authorisation
+ End Get
+ Set
+ Me._authorisation = Value
+ End Set
+ End Property
+
+
+ Public Property AdditionalSupplyChainActor() As List(Of AdditionalSupplyChainActorEGType)
+ Get
+ Return Me._additionalSupplyChainActor
+ End Get
+ Set
+ Me._additionalSupplyChainActor = Value
+ End Set
+ End Property
+
+
+ Public Property RegionOfDispatch() As String
+ Get
+ Return Me._regionOfDispatch
+ End Get
+ Set
+ Me._regionOfDispatch = Value
+ End Set
+ End Property
+
+
+ Public Property CountryOfOrigin() As String
+ Get
+ Return Me._countryOfOrigin
+ End Get
+ Set
+ Me._countryOfOrigin = Value
+ End Set
+ End Property
+
+
+ Public Property NetMass() As String
+ Get
+ Return Me._netMass
+ End Get
+ Set
+ Me._netMass = Value
+ End Set
+ End Property
+
+
+ Public Property GrossMass() As String
+ Get
+ Return Me._grossMass
+ End Get
+ Set
+ Me._grossMass = Value
+ End Set
+ End Property
+
+
+ Public Property UNNumber() As List(Of String)
+ Get
+ Return Me._uNNumber
+ End Get
+ Set
+ Me._uNNumber = Value
+ End Set
+ End Property
+
+
+ Public Property TransportCharges() As String
+ Get
+ Return Me._transportCharges
+ End Get
+ Set
+ Me._transportCharges = Value
+ End Set
+ End Property
+
+
+ Public Property CountryOfExport() As String
+ Get
+ Return Me._countryOfExport
+ End Get
+ Set
+ Me._countryOfExport = Value
+ End Set
+ End Property
+
+
+ Public Property RequestedProcedure() As String
+ Get
+ Return Me._requestedProcedure
+ End Get
+ Set
+ Me._requestedProcedure = Value
+ End Set
+ End Property
+
+
+ Public Property PreviousProcedure() As String
+ Get
+ Return Me._previousProcedure
+ End Get
+ Set
+ Me._previousProcedure = Value
+ End Set
+ End Property
+
+
+ Public Property AdditionalProcedure() As String
+ Get
+ Return Me._additionalProcedure
+ End Get
+ Set
+ Me._additionalProcedure = Value
+ End Set
+ End Property
+
+
+ Public Property SupplementaryUnits() As String
+ Get
+ Return Me._supplementaryUnits
+ End Get
+ Set
+ Me._supplementaryUnits = Value
+ End Set
+ End Property
+
+
+ Public Property StatisticalValue() As String
+ Get
+ Return Me._statisticalValue
+ End Get
+ Set
+ Me._statisticalValue = Value
+ End Set
+ End Property
+
+
+ Public Property CurrencyStatisticalValue() As String
+ Get
+ Return Me._currencyStatisticalValue
+ End Get
+ Set
+ Me._currencyStatisticalValue = Value
+ End Set
+ End Property
+
+
+ Public Property PreviousDocument() As List(Of PreviousDocumentGoodsItemEGType)
+ Get
+ Return Me._previousDocument
+ End Get
+ Set
+ Me._previousDocument = Value
+ End Set
+ End Property
+
+
+ Public Property Packaging() As List(Of PackagingEGType)
+ Get
+ Return Me._packaging
+ End Get
+ Set
+ Me._packaging = Value
+ End Set
+ End Property
+
+
+ Public Property OutwardProcessing() As OutwardProcessingGoodsItemEGType
+ Get
+ Return Me._outwardProcessing
+ End Get
+ Set
+ Me._outwardProcessing = Value
+ End Set
+ End Property
+
+
+ Public Property SupportingDocument() As List(Of SupportingDocumentGoodsItemEGType)
+ Get
+ Return Me._supportingDocument
+ End Get
+ Set
+ Me._supportingDocument = Value
+ End Set
+ End Property
+
+
+ Public Property AdditionalReference() As List(Of AdditionalReferenceGoodsItemEGType)
+ Get
+ Return Me._additionalReference
+ End Get
+ Set
+ Me._additionalReference = Value
+ End Set
+ End Property
+
+
+ Public Property Consignee() As AddressEGType
+ Get
+ Return Me._consignee
+ End Get
+ Set
+ Me._consignee = Value
+ End Set
+ End Property
+
+
+ Public Property Consignor() As AddressEGType
+ Get
+ Return Me._consignor
+ End Get
+ Set
+ Me._consignor = Value
+ End Set
+ End Property
+
+
+ Public Property ProcedureTransference() As ProcedureTransferenceEGType
+ Get
+ Return Me._procedureTransference
+ End Get
+ Set
+ Me._procedureTransference = Value
+ End Set
+ End Property
+
+
+ Public Property NatureOfTransaction() As String
+ Get
+ Return Me._natureOfTransaction
+ End Get
+ Set
+ Me._natureOfTransaction = Value
+ End Set
+ End Property
+
+
+ Public Property ApplicationInternalData() As ApplicationInternalDataType
+ Get
+ Return Me._applicationInternalData
+ End Get
+ Set
+ Me._applicationInternalData = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(GoodsItemEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize GoodsItemEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 GoodsItemEGType object
+ '''
+ ''' string to deserialize
+ ''' Output GoodsItemEGType 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 GoodsItemEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, GoodsItemEGType)
+ 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 GoodsItemEGType) 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 GoodsItemEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), GoodsItemEGType)
+ 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 GoodsItemEGType
+ Return CType(SerializerXml.Deserialize(s), GoodsItemEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current GoodsItemEGType 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 GoodsItemEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output GoodsItemEGType 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 GoodsItemEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, GoodsItemEGType)
+ 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 GoodsItemEGType) 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 GoodsItemEGType
+ 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 AdditionalInformationEGType
+
+#Region "Private fields"
+ Private _code As String
+
+ Private _text 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 Text() As String
+ Get
+ Return Me._text
+ End Get
+ Set
+ Me._text = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdditionalInformationEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize AdditionalInformationEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 AdditionalInformationEGType object
+ '''
+ ''' string to deserialize
+ ''' Output AdditionalInformationEGType 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 AdditionalInformationEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, AdditionalInformationEGType)
+ 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 AdditionalInformationEGType) 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 AdditionalInformationEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalInformationEGType)
+ 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 AdditionalInformationEGType
+ Return CType(SerializerXml.Deserialize(s), AdditionalInformationEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current AdditionalInformationEGType 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 AdditionalInformationEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output AdditionalInformationEGType 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 AdditionalInformationEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, AdditionalInformationEGType)
+ 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 AdditionalInformationEGType) 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 AdditionalInformationEGType
+ 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 AuthorisationGoodsItemEGType
+ Inherits AuthorisationEGType
+
+#Region "Private fields"
+ Private _holderOfAuthorisation As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property HolderOfAuthorisation() As String
+ Get
+ Return Me._holderOfAuthorisation
+ End Get
+ Set
+ Me._holderOfAuthorisation = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AuthorisationGoodsItemEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize AuthorisationGoodsItemEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 AuthorisationGoodsItemEGType object
+ '''
+ ''' string to deserialize
+ ''' Output AuthorisationGoodsItemEGType 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 AuthorisationGoodsItemEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, AuthorisationGoodsItemEGType)
+ 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 AuthorisationGoodsItemEGType) 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 AuthorisationGoodsItemEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AuthorisationGoodsItemEGType)
+ 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 AuthorisationGoodsItemEGType
+ Return CType(SerializerXml.Deserialize(s), AuthorisationGoodsItemEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current AuthorisationGoodsItemEGType 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 AuthorisationGoodsItemEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output AuthorisationGoodsItemEGType 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 AuthorisationGoodsItemEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, AuthorisationGoodsItemEGType)
+ 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 AuthorisationGoodsItemEGType) 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 AuthorisationGoodsItemEGType
+ 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 AuthorisationEGType
+
+#Region "Private fields"
+ Private _type As String
+
+ Private _referenceNumber 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 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(AuthorisationEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize AuthorisationEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 AuthorisationEGType object
+ '''
+ ''' string to deserialize
+ ''' Output AuthorisationEGType 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 AuthorisationEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, AuthorisationEGType)
+ 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 AuthorisationEGType) 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 AuthorisationEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AuthorisationEGType)
+ 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 AuthorisationEGType
+ Return CType(SerializerXml.Deserialize(s), AuthorisationEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current AuthorisationEGType 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 AuthorisationEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output AuthorisationEGType 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 AuthorisationEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, AuthorisationEGType)
+ 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 AuthorisationEGType) 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 AuthorisationEGType
+ 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 AdditionalSupplyChainActorEGType
+
+#Region "Private fields"
+ Private _role As String
+
+ Private _identificationNumber As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property Role() As String
+ Get
+ Return Me._role
+ End Get
+ Set
+ Me._role = Value
+ End Set
+ End Property
+
+
+ Public Property IdentificationNumber() As String
+ Get
+ Return Me._identificationNumber
+ End Get
+ Set
+ Me._identificationNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdditionalSupplyChainActorEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize AdditionalSupplyChainActorEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 AdditionalSupplyChainActorEGType object
+ '''
+ ''' string to deserialize
+ ''' Output AdditionalSupplyChainActorEGType 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 AdditionalSupplyChainActorEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, AdditionalSupplyChainActorEGType)
+ 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 AdditionalSupplyChainActorEGType) 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 AdditionalSupplyChainActorEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalSupplyChainActorEGType)
+ 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 AdditionalSupplyChainActorEGType
+ Return CType(SerializerXml.Deserialize(s), AdditionalSupplyChainActorEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current AdditionalSupplyChainActorEGType 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 AdditionalSupplyChainActorEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output AdditionalSupplyChainActorEGType 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 AdditionalSupplyChainActorEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, AdditionalSupplyChainActorEGType)
+ 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 AdditionalSupplyChainActorEGType) 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 AdditionalSupplyChainActorEGType
+ 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 AdditionalReferenceGoodsItemEGType
+ Inherits AdditionalReferenceEGType
+
+#Region "Private fields"
+ Private _detail As String
+
+ Private _currency As String
+
+ Private _amount As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property Detail() As String
+ Get
+ Return Me._detail
+ End Get
+ Set
+ Me._detail = Value
+ End Set
+ End Property
+
+
+ Public Property Currency() As String
+ Get
+ Return Me._currency
+ End Get
+ Set
+ Me._currency = Value
+ End Set
+ End Property
+
+
+ Public Property Amount() As String
+ 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(AdditionalReferenceGoodsItemEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize AdditionalReferenceGoodsItemEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 AdditionalReferenceGoodsItemEGType object
+ '''
+ ''' string to deserialize
+ ''' Output AdditionalReferenceGoodsItemEGType 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 AdditionalReferenceGoodsItemEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, AdditionalReferenceGoodsItemEGType)
+ 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 AdditionalReferenceGoodsItemEGType) 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 AdditionalReferenceGoodsItemEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalReferenceGoodsItemEGType)
+ 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 AdditionalReferenceGoodsItemEGType
+ Return CType(SerializerXml.Deserialize(s), AdditionalReferenceGoodsItemEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current AdditionalReferenceGoodsItemEGType 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 AdditionalReferenceGoodsItemEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output AdditionalReferenceGoodsItemEGType 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 AdditionalReferenceGoodsItemEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, AdditionalReferenceGoodsItemEGType)
+ 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 AdditionalReferenceGoodsItemEGType) 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 AdditionalReferenceGoodsItemEGType
+ 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 AdditionalReferenceEGType
+
+#Region "Private fields"
+ Private _type As String
+
+ Private _qualifier As String
+
+ Private _referenceNumber 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 Qualifier() As String
+ Get
+ Return Me._qualifier
+ End Get
+ Set
+ Me._qualifier = Value
+ End Set
+ End Property
+
+
+ Public Property ReferenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdditionalReferenceEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize AdditionalReferenceEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 AdditionalReferenceEGType object
+ '''
+ ''' string to deserialize
+ ''' Output AdditionalReferenceEGType 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 AdditionalReferenceEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, AdditionalReferenceEGType)
+ 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 AdditionalReferenceEGType) 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 AdditionalReferenceEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalReferenceEGType)
+ 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 AdditionalReferenceEGType
+ Return CType(SerializerXml.Deserialize(s), AdditionalReferenceEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current AdditionalReferenceEGType 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 AdditionalReferenceEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output AdditionalReferenceEGType 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 AdditionalReferenceEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, AdditionalReferenceEGType)
+ 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 AdditionalReferenceEGType) 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 AdditionalReferenceEGType
+ 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 AddressEGType
+
+#Region "Private fields"
+ Private _addressCode As String
+
+ Private _identificationNumber As String
+
+ Private _subsidiaryNumber As String
+
+ Private _name As String
+
+ Private _streetAndNumber As String
+
+ Private _city As String
+
+ Private _postcode As String
+
+ Private _country As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property AddressCode() As String
+ Get
+ Return Me._addressCode
+ End Get
+ Set
+ Me._addressCode = Value
+ End Set
+ End Property
+
+
+ Public Property IdentificationNumber() As String
+ Get
+ Return Me._identificationNumber
+ End Get
+ Set
+ Me._identificationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property SubsidiaryNumber() As String
+ Get
+ Return Me._subsidiaryNumber
+ End Get
+ Set
+ Me._subsidiaryNumber = 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 StreetAndNumber() As String
+ Get
+ Return Me._streetAndNumber
+ End Get
+ Set
+ Me._streetAndNumber = 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 Postcode() As String
+ Get
+ Return Me._postcode
+ End Get
+ Set
+ Me._postcode = Value
+ End Set
+ End Property
+
+
+ Public Property Country() As String
+ Get
+ Return Me._country
+ End Get
+ Set
+ Me._country = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AddressEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize AddressEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 AddressEGType object
+ '''
+ ''' string to deserialize
+ ''' Output AddressEGType 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 AddressEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, AddressEGType)
+ 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 AddressEGType) 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 AddressEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AddressEGType)
+ 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 AddressEGType
+ Return CType(SerializerXml.Deserialize(s), AddressEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current AddressEGType 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 AddressEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output AddressEGType 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 AddressEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, AddressEGType)
+ 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 AddressEGType) 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 AddressEGType
+ 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 DeclarantEGType
+ Inherits AddressEGType
+
+#Region "Private fields"
+ Private _contactPerson As ContactPersonEGType
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._contactPerson = New ContactPersonEGType()
+ End Sub
+
+
+ Public Property ContactPerson() As ContactPersonEGType
+ Get
+ Return Me._contactPerson
+ End Get
+ Set
+ Me._contactPerson = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DeclarantEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DeclarantEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 DeclarantEGType object
+ '''
+ ''' string to deserialize
+ ''' Output DeclarantEGType 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 DeclarantEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DeclarantEGType)
+ 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 DeclarantEGType) 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 DeclarantEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DeclarantEGType)
+ 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 DeclarantEGType
+ Return CType(SerializerXml.Deserialize(s), DeclarantEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DeclarantEGType 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 DeclarantEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output DeclarantEGType 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 DeclarantEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DeclarantEGType)
+ 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 DeclarantEGType) 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 DeclarantEGType
+ 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 ContactPersonEGType
+
+#Region "Private fields"
+ Private _name As String
+
+ Private _phoneNumber As String
+
+ Private _eMailAddress As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property Name() As String
+ Get
+ Return Me._name
+ End Get
+ Set
+ Me._name = Value
+ End Set
+ End Property
+
+
+ Public Property PhoneNumber() As String
+ Get
+ Return Me._phoneNumber
+ End Get
+ Set
+ Me._phoneNumber = Value
+ End Set
+ End Property
+
+
+ Public Property EMailAddress() As String
+ Get
+ Return Me._eMailAddress
+ End Get
+ Set
+ Me._eMailAddress = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ContactPersonEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize ContactPersonEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 ContactPersonEGType object
+ '''
+ ''' string to deserialize
+ ''' Output ContactPersonEGType 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 ContactPersonEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, ContactPersonEGType)
+ 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 ContactPersonEGType) 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 ContactPersonEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ContactPersonEGType)
+ 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 ContactPersonEGType
+ Return CType(SerializerXml.Deserialize(s), ContactPersonEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current ContactPersonEGType 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 ContactPersonEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output ContactPersonEGType 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 ContactPersonEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, ContactPersonEGType)
+ 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 ContactPersonEGType) 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 ContactPersonEGType
+ 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 ApplicationInternalDataType
+
+#Region "Private fields"
+ Private _additionalDetails As List(Of ApplicationInternalDataAdditionalDetailsDataType)
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._additionalDetails = New List(Of ApplicationInternalDataAdditionalDetailsDataType)()
+ End Sub
+
+
+ Public Property AdditionalDetails() As List(Of ApplicationInternalDataAdditionalDetailsDataType)
+ Get
+ Return Me._additionalDetails
+ End Get
+ Set
+ Me._additionalDetails = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ApplicationInternalDataType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize ApplicationInternalDataType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 ApplicationInternalDataType object
+ '''
+ ''' string to deserialize
+ ''' Output ApplicationInternalDataType 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 ApplicationInternalDataType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, ApplicationInternalDataType)
+ 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 ApplicationInternalDataType) 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 ApplicationInternalDataType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ApplicationInternalDataType)
+ 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 ApplicationInternalDataType
+ Return CType(SerializerXml.Deserialize(s), ApplicationInternalDataType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current ApplicationInternalDataType 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 ApplicationInternalDataType object
+ '''
+ ''' File to load and deserialize
+ ''' Output ApplicationInternalDataType 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 ApplicationInternalDataType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, ApplicationInternalDataType)
+ 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 ApplicationInternalDataType) 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 ApplicationInternalDataType
+ 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 ApplicationInternalDataAdditionalDetailsDataType
+
+#Region "Private fields"
+ Private _key As String
+
+ Private _value As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property Key() As String
+ Get
+ Return Me._key
+ End Get
+ Set
+ Me._key = Value
+ End Set
+ End Property
+
+
+ Public Property Value() As String
+ Get
+ Return Me._value
+ End Get
+ Set
+ Me._value = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ApplicationInternalDataAdditionalDetailsDataType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize ApplicationInternalDataAdditionalDetailsDataType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 ApplicationInternalDataAdditionalDetailsDataType object
+ '''
+ ''' string to deserialize
+ ''' Output ApplicationInternalDataAdditionalDetailsDataType 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 ApplicationInternalDataAdditionalDetailsDataType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsDataType)
+ 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 ApplicationInternalDataAdditionalDetailsDataType) 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 ApplicationInternalDataAdditionalDetailsDataType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ApplicationInternalDataAdditionalDetailsDataType)
+ 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 ApplicationInternalDataAdditionalDetailsDataType
+ Return CType(SerializerXml.Deserialize(s), ApplicationInternalDataAdditionalDetailsDataType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current ApplicationInternalDataAdditionalDetailsDataType 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 ApplicationInternalDataAdditionalDetailsDataType object
+ '''
+ ''' File to load and deserialize
+ ''' Output ApplicationInternalDataAdditionalDetailsDataType 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 ApplicationInternalDataAdditionalDetailsDataType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsDataType)
+ 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 ApplicationInternalDataAdditionalDetailsDataType) 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 ApplicationInternalDataAdditionalDetailsDataType
+ 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 SupportingDocumentEGType
+
+#Region "Private fields"
+ Private _type As String
+
+ Private _qualifier As String
+
+ Private _referenceNumber As String
+
+ Private _documentLineItemNumber As String
+
+ Private _issuingAuthorityName As String
+
+ Private _issuingDate As Date
+
+ Private _validityDate As Date
+
+ 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 Qualifier() As String
+ Get
+ Return Me._qualifier
+ End Get
+ Set
+ Me._qualifier = Value
+ End Set
+ End Property
+
+
+ Public Property ReferenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property DocumentLineItemNumber() As String
+ Get
+ Return Me._documentLineItemNumber
+ End Get
+ Set
+ Me._documentLineItemNumber = Value
+ End Set
+ End Property
+
+
+ Public Property IssuingAuthorityName() As String
+ Get
+ Return Me._issuingAuthorityName
+ End Get
+ Set
+ Me._issuingAuthorityName = 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 ValidityDate() As Date
+ Get
+ Return Me._validityDate
+ End Get
+ Set
+ Me._validityDate = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(SupportingDocumentEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize SupportingDocumentEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 SupportingDocumentEGType object
+ '''
+ ''' string to deserialize
+ ''' Output SupportingDocumentEGType 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 SupportingDocumentEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, SupportingDocumentEGType)
+ 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 SupportingDocumentEGType) 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 SupportingDocumentEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), SupportingDocumentEGType)
+ 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 SupportingDocumentEGType
+ Return CType(SerializerXml.Deserialize(s), SupportingDocumentEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current SupportingDocumentEGType 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 SupportingDocumentEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output SupportingDocumentEGType 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 SupportingDocumentEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, SupportingDocumentEGType)
+ 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 SupportingDocumentEGType) 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 SupportingDocumentEGType
+ 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 PreviousDocumentEGType
+
+#Region "Private fields"
+ Private _type As String
+
+ Private _qualifier As String
+
+ Private _referenceNumber 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 Qualifier() As String
+ Get
+ Return Me._qualifier
+ End Get
+ Set
+ Me._qualifier = Value
+ End Set
+ End Property
+
+
+ Public Property ReferenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PreviousDocumentEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize PreviousDocumentEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 PreviousDocumentEGType object
+ '''
+ ''' string to deserialize
+ ''' Output PreviousDocumentEGType 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 PreviousDocumentEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, PreviousDocumentEGType)
+ 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 PreviousDocumentEGType) 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 PreviousDocumentEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PreviousDocumentEGType)
+ 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 PreviousDocumentEGType
+ Return CType(SerializerXml.Deserialize(s), PreviousDocumentEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current PreviousDocumentEGType 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 PreviousDocumentEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output PreviousDocumentEGType 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 PreviousDocumentEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, PreviousDocumentEGType)
+ 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 PreviousDocumentEGType) 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 PreviousDocumentEGType
+ 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 TransportDocumentEGType
+
+#Region "Private fields"
+ Private _type As String
+
+ Private _qualifier As String
+
+ Private _referenceNumber 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 Qualifier() As String
+ Get
+ Return Me._qualifier
+ End Get
+ Set
+ Me._qualifier = Value
+ End Set
+ End Property
+
+
+ Public Property ReferenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransportDocumentEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize TransportDocumentEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 TransportDocumentEGType object
+ '''
+ ''' string to deserialize
+ ''' Output TransportDocumentEGType 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 TransportDocumentEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, TransportDocumentEGType)
+ 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 TransportDocumentEGType) 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 TransportDocumentEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransportDocumentEGType)
+ 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 TransportDocumentEGType
+ Return CType(SerializerXml.Deserialize(s), TransportDocumentEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current TransportDocumentEGType 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 TransportDocumentEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output TransportDocumentEGType 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 TransportDocumentEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, TransportDocumentEGType)
+ 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 TransportDocumentEGType) 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 TransportDocumentEGType
+ 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 DeliveryTermsEGType
+
+#Region "Private fields"
+ Private _incotermCode As String
+
+ Private _uNLocode As String
+
+ Private _text As String
+
+ Private _location As String
+
+ Private _country As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property IncotermCode() As String
+ Get
+ Return Me._incotermCode
+ End Get
+ Set
+ Me._incotermCode = Value
+ End Set
+ End Property
+
+
+ Public Property UNLocode() As String
+ Get
+ Return Me._uNLocode
+ End Get
+ Set
+ Me._uNLocode = Value
+ End Set
+ End Property
+
+
+ Public Property Text() As String
+ Get
+ Return Me._text
+ End Get
+ Set
+ Me._text = Value
+ End Set
+ End Property
+
+
+ Public Property Location() As String
+ Get
+ Return Me._location
+ End Get
+ Set
+ Me._location = Value
+ End Set
+ End Property
+
+
+ Public Property Country() As String
+ Get
+ Return Me._country
+ End Get
+ Set
+ Me._country = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DeliveryTermsEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DeliveryTermsEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 DeliveryTermsEGType object
+ '''
+ ''' string to deserialize
+ ''' Output DeliveryTermsEGType 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 DeliveryTermsEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DeliveryTermsEGType)
+ 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 DeliveryTermsEGType) 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 DeliveryTermsEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DeliveryTermsEGType)
+ 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 DeliveryTermsEGType
+ Return CType(SerializerXml.Deserialize(s), DeliveryTermsEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DeliveryTermsEGType 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 DeliveryTermsEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output DeliveryTermsEGType 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 DeliveryTermsEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DeliveryTermsEGType)
+ 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 DeliveryTermsEGType) 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 DeliveryTermsEGType
+ 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 ProductEGType
+
+#Region "Private fields"
+ Private _commodityCode As String
+
+ Private _descriptionOfGoods 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
+
+
+ Public Property DescriptionOfGoods() As String
+ Get
+ Return Me._descriptionOfGoods
+ End Get
+ Set
+ Me._descriptionOfGoods = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ProductEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize ProductEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 ProductEGType object
+ '''
+ ''' string to deserialize
+ ''' Output ProductEGType 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 ProductEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, ProductEGType)
+ 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 ProductEGType) 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 ProductEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ProductEGType)
+ 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 ProductEGType
+ Return CType(SerializerXml.Deserialize(s), ProductEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current ProductEGType 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 ProductEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output ProductEGType 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 ProductEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, ProductEGType)
+ 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 ProductEGType) 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 ProductEGType
+ 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 IdentificationMeansEGType
+
+#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(IdentificationMeansEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize IdentificationMeansEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 IdentificationMeansEGType object
+ '''
+ ''' string to deserialize
+ ''' Output IdentificationMeansEGType 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 IdentificationMeansEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, IdentificationMeansEGType)
+ 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 IdentificationMeansEGType) 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 IdentificationMeansEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), IdentificationMeansEGType)
+ 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 IdentificationMeansEGType
+ Return CType(SerializerXml.Deserialize(s), IdentificationMeansEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current IdentificationMeansEGType 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 IdentificationMeansEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output IdentificationMeansEGType 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 IdentificationMeansEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, IdentificationMeansEGType)
+ 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 IdentificationMeansEGType) 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 IdentificationMeansEGType
+ 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 OutwardProcessingEGType
+
+#Region "Private fields"
+ Private _countryOfReimport As List(Of String)
+
+ Private _identificationMeans As List(Of IdentificationMeansEGType)
+
+ Private _product As List(Of ProductEGType)
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._product = New List(Of ProductEGType)()
+ Me._identificationMeans = New List(Of IdentificationMeansEGType)()
+ Me._countryOfReimport = New List(Of String)()
+ End Sub
+
+
+ Public Property CountryOfReimport() As List(Of String)
+ Get
+ Return Me._countryOfReimport
+ End Get
+ Set
+ Me._countryOfReimport = Value
+ End Set
+ End Property
+
+
+ Public Property IdentificationMeans() As List(Of IdentificationMeansEGType)
+ Get
+ Return Me._identificationMeans
+ End Get
+ Set
+ Me._identificationMeans = Value
+ End Set
+ End Property
+
+
+ Public Property Product() As List(Of ProductEGType)
+ Get
+ Return Me._product
+ End Get
+ Set
+ Me._product = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(OutwardProcessingEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize OutwardProcessingEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 OutwardProcessingEGType object
+ '''
+ ''' string to deserialize
+ ''' Output OutwardProcessingEGType 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 OutwardProcessingEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, OutwardProcessingEGType)
+ 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 OutwardProcessingEGType) 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 OutwardProcessingEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), OutwardProcessingEGType)
+ 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 OutwardProcessingEGType
+ Return CType(SerializerXml.Deserialize(s), OutwardProcessingEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current OutwardProcessingEGType 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 OutwardProcessingEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output OutwardProcessingEGType 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 OutwardProcessingEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, OutwardProcessingEGType)
+ 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 OutwardProcessingEGType) 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 OutwardProcessingEGType
+ 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 CarrierEGType
+
+#Region "Private fields"
+ Private _addressCode As String
+
+ Private _identificationNumber As String
+
+ Private _subsidiaryNumber As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property AddressCode() As String
+ Get
+ Return Me._addressCode
+ End Get
+ Set
+ Me._addressCode = Value
+ End Set
+ End Property
+
+
+ Public Property IdentificationNumber() As String
+ Get
+ Return Me._identificationNumber
+ End Get
+ Set
+ Me._identificationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property 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(CarrierEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize CarrierEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 CarrierEGType object
+ '''
+ ''' string to deserialize
+ ''' Output CarrierEGType 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 CarrierEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, CarrierEGType)
+ 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 CarrierEGType) 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 CarrierEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CarrierEGType)
+ 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 CarrierEGType
+ Return CType(SerializerXml.Deserialize(s), CarrierEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current CarrierEGType 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 CarrierEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output CarrierEGType 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 CarrierEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, CarrierEGType)
+ 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 CarrierEGType) 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 CarrierEGType
+ 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 RepresentativeEGType
+
+#Region "Private fields"
+ Private _addressCode As String
+
+ Private _identificationNumber As String
+
+ Private _subsidiaryNumber As String
+
+ Private _contactPerson As ContactPersonEGType
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._contactPerson = New ContactPersonEGType()
+ End Sub
+
+
+ Public Property AddressCode() As String
+ Get
+ Return Me._addressCode
+ End Get
+ Set
+ Me._addressCode = Value
+ End Set
+ End Property
+
+
+ Public Property IdentificationNumber() As String
+ Get
+ Return Me._identificationNumber
+ End Get
+ Set
+ Me._identificationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property SubsidiaryNumber() As String
+ Get
+ Return Me._subsidiaryNumber
+ End Get
+ Set
+ Me._subsidiaryNumber = Value
+ End Set
+ End Property
+
+
+ Public Property ContactPerson() As ContactPersonEGType
+ Get
+ Return Me._contactPerson
+ End Get
+ Set
+ Me._contactPerson = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(RepresentativeEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize RepresentativeEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 RepresentativeEGType object
+ '''
+ ''' string to deserialize
+ ''' Output RepresentativeEGType 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 RepresentativeEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, RepresentativeEGType)
+ 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 RepresentativeEGType) 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 RepresentativeEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), RepresentativeEGType)
+ 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 RepresentativeEGType
+ Return CType(SerializerXml.Deserialize(s), RepresentativeEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current RepresentativeEGType 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 RepresentativeEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output RepresentativeEGType 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 RepresentativeEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, RepresentativeEGType)
+ 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 RepresentativeEGType) 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 RepresentativeEGType
+ 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 TransportEquipmentEGType
+
+#Region "Private fields"
+ Private _numberOfSeals As String
+
+ Private _seal As List(Of String)
+
+ Private _containerIdentificationNumber As String
+
+ Private _goodsReference As List(Of String)
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._goodsReference = New List(Of String)()
+ Me._seal = New List(Of String)()
+ End Sub
+
+
+ Public Property NumberOfSeals() As String
+ Get
+ Return Me._numberOfSeals
+ End Get
+ Set
+ Me._numberOfSeals = Value
+ End Set
+ End Property
+
+
+ Public Property Seal() As List(Of String)
+ Get
+ Return Me._seal
+ End Get
+ Set
+ Me._seal = Value
+ End Set
+ End Property
+
+
+ Public Property ContainerIdentificationNumber() As String
+ Get
+ Return Me._containerIdentificationNumber
+ End Get
+ Set
+ Me._containerIdentificationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property GoodsReference() As List(Of String)
+ Get
+ Return Me._goodsReference
+ End Get
+ Set
+ Me._goodsReference = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransportEquipmentEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize TransportEquipmentEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 TransportEquipmentEGType object
+ '''
+ ''' string to deserialize
+ ''' Output TransportEquipmentEGType 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 TransportEquipmentEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, TransportEquipmentEGType)
+ 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 TransportEquipmentEGType) 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 TransportEquipmentEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransportEquipmentEGType)
+ 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 TransportEquipmentEGType
+ Return CType(SerializerXml.Deserialize(s), TransportEquipmentEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current TransportEquipmentEGType 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 TransportEquipmentEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output TransportEquipmentEGType 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 TransportEquipmentEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, TransportEquipmentEGType)
+ 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 TransportEquipmentEGType) 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 TransportEquipmentEGType
+ 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 LocationOfGoodsAddressEGType
+
+#Region "Private fields"
+ Private _streetAndNumber As String
+
+ Private _postcode As String
+
+ Private _city As String
+
+ Private _country As String
+
+ Private _complementOfInformation As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property StreetAndNumber() As String
+ Get
+ Return Me._streetAndNumber
+ End Get
+ Set
+ Me._streetAndNumber = Value
+ End Set
+ End Property
+
+
+ Public Property Postcode() As String
+ Get
+ Return Me._postcode
+ End Get
+ Set
+ Me._postcode = Value
+ End Set
+ End Property
+
+
+ Public Property City() As String
+ Get
+ Return Me._city
+ End Get
+ Set
+ Me._city = Value
+ End Set
+ End Property
+
+
+ Public Property Country() As String
+ Get
+ Return Me._country
+ End Get
+ Set
+ Me._country = Value
+ End Set
+ End Property
+
+
+ Public Property ComplementOfInformation() As String
+ Get
+ Return Me._complementOfInformation
+ End Get
+ Set
+ Me._complementOfInformation = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(LocationOfGoodsAddressEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize LocationOfGoodsAddressEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 LocationOfGoodsAddressEGType object
+ '''
+ ''' string to deserialize
+ ''' Output LocationOfGoodsAddressEGType 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 LocationOfGoodsAddressEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, LocationOfGoodsAddressEGType)
+ 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 LocationOfGoodsAddressEGType) 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 LocationOfGoodsAddressEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), LocationOfGoodsAddressEGType)
+ 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 LocationOfGoodsAddressEGType
+ Return CType(SerializerXml.Deserialize(s), LocationOfGoodsAddressEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current LocationOfGoodsAddressEGType 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 LocationOfGoodsAddressEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output LocationOfGoodsAddressEGType 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 LocationOfGoodsAddressEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, LocationOfGoodsAddressEGType)
+ 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 LocationOfGoodsAddressEGType) 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 LocationOfGoodsAddressEGType
+ 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 LocationOfGoodsEGType
+
+#Region "Private fields"
+ Private _typeOfLocation As String
+
+ Private _qualifierOfIdentification As String
+
+ Private _additionalIdentifier As String
+
+ Private _authorisationNumber As String
+
+ Private _uNLocode As String
+
+ Private _latitude As String
+
+ Private _longitude As String
+
+ Private _address As LocationOfGoodsAddressEGType
+
+ Private _contactPerson As ContactPersonEGType
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._contactPerson = New ContactPersonEGType()
+ Me._address = New LocationOfGoodsAddressEGType()
+ End Sub
+
+
+ Public Property TypeOfLocation() As String
+ Get
+ Return Me._typeOfLocation
+ End Get
+ Set
+ Me._typeOfLocation = Value
+ End Set
+ End Property
+
+
+ Public Property QualifierOfIdentification() As String
+ Get
+ Return Me._qualifierOfIdentification
+ End Get
+ Set
+ Me._qualifierOfIdentification = Value
+ End Set
+ End Property
+
+
+ Public Property AdditionalIdentifier() As String
+ Get
+ Return Me._additionalIdentifier
+ End Get
+ Set
+ Me._additionalIdentifier = 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 UNLocode() As String
+ Get
+ Return Me._uNLocode
+ End Get
+ Set
+ Me._uNLocode = Value
+ End Set
+ End Property
+
+
+ Public Property Latitude() As String
+ Get
+ Return Me._latitude
+ End Get
+ Set
+ Me._latitude = Value
+ End Set
+ End Property
+
+
+ Public Property Longitude() As String
+ Get
+ Return Me._longitude
+ End Get
+ Set
+ Me._longitude = Value
+ End Set
+ End Property
+
+
+ Public Property Address() As LocationOfGoodsAddressEGType
+ Get
+ Return Me._address
+ End Get
+ Set
+ Me._address = Value
+ End Set
+ End Property
+
+
+ Public Property ContactPerson() As ContactPersonEGType
+ Get
+ Return Me._contactPerson
+ End Get
+ Set
+ Me._contactPerson = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(LocationOfGoodsEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize LocationOfGoodsEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 LocationOfGoodsEGType object
+ '''
+ ''' string to deserialize
+ ''' Output LocationOfGoodsEGType 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 LocationOfGoodsEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, LocationOfGoodsEGType)
+ 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 LocationOfGoodsEGType) 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 LocationOfGoodsEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), LocationOfGoodsEGType)
+ 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 LocationOfGoodsEGType
+ Return CType(SerializerXml.Deserialize(s), LocationOfGoodsEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current LocationOfGoodsEGType 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 LocationOfGoodsEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output LocationOfGoodsEGType 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 LocationOfGoodsEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, LocationOfGoodsEGType)
+ 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 LocationOfGoodsEGType) 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 LocationOfGoodsEGType
+ 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 ActiveBorderTransportMeansEGType
+
+#Region "Private fields"
+ Private _typeOfIdentification As String
+
+ Private _identificationNumber As String
+
+ Private _nationality As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property TypeOfIdentification() As String
+ Get
+ Return Me._typeOfIdentification
+ End Get
+ Set
+ Me._typeOfIdentification = Value
+ End Set
+ End Property
+
+
+ Public Property IdentificationNumber() As String
+ Get
+ Return Me._identificationNumber
+ End Get
+ Set
+ Me._identificationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property Nationality() As String
+ Get
+ Return Me._nationality
+ End Get
+ Set
+ Me._nationality = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ActiveBorderTransportMeansEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize ActiveBorderTransportMeansEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 ActiveBorderTransportMeansEGType object
+ '''
+ ''' string to deserialize
+ ''' Output ActiveBorderTransportMeansEGType 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 ActiveBorderTransportMeansEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, ActiveBorderTransportMeansEGType)
+ 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 ActiveBorderTransportMeansEGType) 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 ActiveBorderTransportMeansEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ActiveBorderTransportMeansEGType)
+ 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 ActiveBorderTransportMeansEGType
+ Return CType(SerializerXml.Deserialize(s), ActiveBorderTransportMeansEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current ActiveBorderTransportMeansEGType 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 ActiveBorderTransportMeansEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output ActiveBorderTransportMeansEGType 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 ActiveBorderTransportMeansEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, ActiveBorderTransportMeansEGType)
+ 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 ActiveBorderTransportMeansEGType) 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 ActiveBorderTransportMeansEGType
+ 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 DepartureTransportMeansEGType
+
+#Region "Private fields"
+ Private _typeOfIdentification As String
+
+ Private _identificationNumber As String
+
+ Private _nationality As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property TypeOfIdentification() As String
+ Get
+ Return Me._typeOfIdentification
+ End Get
+ Set
+ Me._typeOfIdentification = Value
+ End Set
+ End Property
+
+
+ Public Property IdentificationNumber() As String
+ Get
+ Return Me._identificationNumber
+ End Get
+ Set
+ Me._identificationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property Nationality() As String
+ Get
+ Return Me._nationality
+ End Get
+ Set
+ Me._nationality = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DepartureTransportMeansEGType))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DepartureTransportMeansEGType 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()
+ xmlWriterSettings.Indent = True
+ xmlWriterSettings.IndentChars = " "
+ 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 DepartureTransportMeansEGType object
+ '''
+ ''' string to deserialize
+ ''' Output DepartureTransportMeansEGType 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 DepartureTransportMeansEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DepartureTransportMeansEGType)
+ 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 DepartureTransportMeansEGType) 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 DepartureTransportMeansEGType
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DepartureTransportMeansEGType)
+ 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 DepartureTransportMeansEGType
+ Return CType(SerializerXml.Deserialize(s), DepartureTransportMeansEGType)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DepartureTransportMeansEGType 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 DepartureTransportMeansEGType object
+ '''
+ ''' File to load and deserialize
+ ''' Output DepartureTransportMeansEGType 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 DepartureTransportMeansEGType, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DepartureTransportMeansEGType)
+ 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 DepartureTransportMeansEGType) 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 DepartureTransportMeansEGType
+ 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 ExportOperationEGType
+
+#Region "Private fields"
+ Private _declarationType As String
+
+ Private _exportDeclarationType As String
+
+ Private _security As String
+
+ Private _countryOfExport As String
+
+ Private _countryOfDestination As String
+
+ Private _additionalSupplyChainActor As List(Of AdditionalSupplyChainActorEGType)
+
+ Private _declarationSubmissionDateAndTime As Date
+
+ Private _exitDate As Date
+
+ Private _decisiveDate As Date
+
+ Private _specificCircumstanceIndicator As String
+
+ Private _transportCharges As String
+
+ Private _containerIndicator As String
+
+ Private _partyConstellation As String
+
+ Private _grossMass As String
+
+ Private _registrationNumberExternal As String
+
+ Private _referenceNumberUCR As String
+
+ Private _authorisation As List(Of AuthorisationEGType)
+
+ Private _inlandModeOfTransport As String
+
+ Private _departureTransportMeans As List(Of DepartureTransportMeansEGType)
+
+ Private _modeOfTransportAtTheBorder As String
+
+ Private _activeBorderTransportMeans As ActiveBorderTransportMeansEGType
+
+ Private _locationOfGoods As LocationOfGoodsEGType
+
+ Private _customsOfficeOfExport As String
+
+ Private _customsOfficeOfExitDeclared As String
+
+ Private _customsOfficeOfSupplement As String
+
+ Private _customsOfficeOfPresentation As String
+
+ Private _customsOfficeOfExitActual As String
+
+ Private _natureOfTransaction As String
+
+ Private _totalAmountInvoiced As String
+
+ Private _invoiceCurrency As String
+
+ Private _additionalInformation As List(Of AdditionalInformationEGType)
+
+ Private _transportEquipment As List(Of TransportEquipmentEGType)
+
+ Private _presentationStartDateAndTime As Date
+
+ Private _loadingEndDateAndTime As Date
+
+ Private _exporter As AddressEGType
+
+ Private _consignee As AddressEGType
+
+ Private _declarant As DeclarantEGType
+
+ Private _representative As RepresentativeEGType
+
+ Private _subContractor As AddressEGType
+
+ Private _contractualPartner As AddressEGType
+
+ Private _carrier As CarrierEGType
+
+ Private _consignor As AddressEGType
+
+ Private _countryOfRoutingOfConsignment As List(Of String)
+
+ Private _outwardProcessing As OutwardProcessingEGType
+
+ Private _aBDEmailAddress As String
+
+ Private _aVMEmailAddress As String
+
+ Private _deliveryTerms As DeliveryTermsEGType
+
+ Private _transportDocument As List(Of TransportDocumentEGType)
+
+ Private _previousDocument As List(Of PreviousDocumentEGType)
+
+ Private _supportingDocument As List(Of SupportingDocumentEGType)
+
+ Private _additionalReference As List(Of AdditionalReferenceEGType)
+
+ Private _applicationInternalData As ApplicationInternalDataType
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._applicationInternalData = New ApplicationInternalDataType()
+ Me._additionalReference = New List(Of AdditionalReferenceEGType)()
+ Me._supportingDocument = New List(Of SupportingDocumentEGType)()
+ Me._previousDocument = New List(Of PreviousDocumentEGType)()
+ Me._transportDocument = New List(Of TransportDocumentEGType)()
+ Me._deliveryTerms = New DeliveryTermsEGType()
+ Me._outwardProcessing = New OutwardProcessingEGType()
+ Me._countryOfRoutingOfConsignment = New List(Of String)()
+ Me._consignor = New AddressEGType()
+ Me._carrier = New CarrierEGType()
+ Me._contractualPartner = New AddressEGType()
+ Me._subContractor = New AddressEGType()
+ Me._representative = New RepresentativeEGType()
+ Me._declarant = New DeclarantEGType()
+ Me._consignee = New AddressEGType()
+ Me._exporter = New AddressEGType()
+ Me._transportEquipment = New List(Of TransportEquipmentEGType)()
+ Me._additionalInformation = New List(Of AdditionalInformationEGType)()
+ Me._locationOfGoods = New LocationOfGoodsEGType()
+ Me._activeBorderTransportMeans = New ActiveBorderTransportMeansEGType()
+ Me._departureTransportMeans = New List(Of DepartureTransportMeansEGType)()
+ Me._authorisation = New List(Of AuthorisationEGType)()
+ Me._additionalSupplyChainActor = New List(Of AdditionalSupplyChainActorEGType)()
+ End Sub
+
+
+ Public Property DeclarationType() As String
+ Get
+ Return Me._declarationType
+ End Get
+ Set
+ Me._declarationType = Value
+ End Set
+ End Property
+
+
+ Public Property ExportDeclarationType() As String
+ Get
+ Return Me._exportDeclarationType
+ End Get
+ Set
+ Me._exportDeclarationType = Value
+ End Set
+ End Property
+
+
+ Public Property Security() As String
+ Get
+ Return Me._security
+ End Get
+ Set
+ Me._security = Value
+ End Set
+ End Property
+
+
+ Public Property CountryOfExport() As String
+ Get
+ Return Me._countryOfExport
+ End Get
+ Set
+ Me._countryOfExport = Value
+ End Set
+ End Property
+
+
+ Public Property CountryOfDestination() As String
+ Get
+ Return Me._countryOfDestination
+ End Get
+ Set
+ Me._countryOfDestination = Value
+ End Set
+ End Property
+
+
+ Public Property AdditionalSupplyChainActor() As List(Of AdditionalSupplyChainActorEGType)
+ Get
+ Return Me._additionalSupplyChainActor
+ End Get
+ Set
+ Me._additionalSupplyChainActor = Value
+ End Set
+ End Property
+
+
+ Public Property DeclarationSubmissionDateAndTime() As Date
+ Get
+ Return Me._declarationSubmissionDateAndTime
+ End Get
+ Set
+ Me._declarationSubmissionDateAndTime = Value
+ End Set
+ End Property
+
+
+ Public Property ExitDate() As Date
+ Get
+ Return Me._exitDate
+ End Get
+ Set
+ Me._exitDate = Value
+ End Set
+ End Property
+
+
+ Public Property DecisiveDate() As Date
+ Get
+ Return Me._decisiveDate
+ End Get
+ Set
+ Me._decisiveDate = Value
+ End Set
+ End Property
+
+
+ Public Property SpecificCircumstanceIndicator() As String
+ Get
+ Return Me._specificCircumstanceIndicator
+ End Get
+ Set
+ Me._specificCircumstanceIndicator = Value
+ End Set
+ End Property
+
+
+ Public Property TransportCharges() As String
+ Get
+ Return Me._transportCharges
+ End Get
+ Set
+ Me._transportCharges = Value
+ End Set
+ End Property
+
+
+ Public Property ContainerIndicator() As String
+ Get
+ Return Me._containerIndicator
+ End Get
+ Set
+ Me._containerIndicator = Value
+ End Set
+ End Property
+
+
+ Public Property PartyConstellation() As String
+ Get
+ Return Me._partyConstellation
+ End Get
+ Set
+ Me._partyConstellation = Value
+ End Set
+ End Property
+
+
+ Public Property GrossMass() As String
+ Get
+ Return Me._grossMass
+ End Get
+ Set
+ Me._grossMass = Value
+ End Set
+ End Property
+
+
+ Public Property RegistrationNumberExternal() As String
+ Get
+ Return Me._registrationNumberExternal
+ End Get
+ Set
+ Me._registrationNumberExternal = Value
+ End Set
+ End Property
+
+
+ Public Property ReferenceNumberUCR() As String
+ Get
+ Return Me._referenceNumberUCR
+ End Get
+ Set
+ Me._referenceNumberUCR = Value
+ End Set
+ End Property
+
+
+ Public Property Authorisation() As List(Of AuthorisationEGType)
+ Get
+ Return Me._authorisation
+ End Get
+ Set
+ Me._authorisation = Value
+ End Set
+ End Property
+
+