'' ------------------------------------------------------------------------------
''
'' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com
'' {"TargetFramework":"Net47","NameSpace":"UeberlassungAusfuhr_007","Language":"VisualBasic","Properties":{},"XmlAttribute":{"Enabled":true},"ClassParams":{},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{},"JsonOutput":{},"Enabled":true},"Miscellaneous":{}}
''
'' ------------------------------------------------------------------------------
#Disable Warning
Imports System
Imports System.Diagnostics
Imports System.Xml.Serialization
Imports System.Runtime.Serialization
Imports System.Collections
Imports System.Xml.Schema
Imports System.ComponentModel
Imports System.Xml
Imports System.IO
Imports System.Text
Imports System.Collections.Generic
Namespace UeberlassungAusfuhr_007
Partial Public Class UeberlassungAusfuhrERTyp
Inherits DatenaustauschExportTyp
#Region "Private fields"
Private _einzelUeberlassung As List(Of EinzelUeberlassungTyp)
Private Shared _serializerXml As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._einzelUeberlassung = New List(Of EinzelUeberlassungTyp)()
End Sub
Public Property EinzelUeberlassung() As List(Of EinzelUeberlassungTyp)
Get
Return Me._einzelUeberlassung
End Get
Set
Me._einzelUeberlassung = Value
End Set
End Property
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
Get
If (_serializerXml Is Nothing) Then
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(UeberlassungAusfuhrERTyp))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize UeberlassungAusfuhrERTyp object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes UeberlassungAusfuhrERTyp object
'''
''' string to deserialize
''' Output UeberlassungAusfuhrERTyp 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 UeberlassungAusfuhrERTyp, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, UeberlassungAusfuhrERTyp)
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 UeberlassungAusfuhrERTyp) 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 UeberlassungAusfuhrERTyp
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), UeberlassungAusfuhrERTyp)
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 UeberlassungAusfuhrERTyp
Return CType(SerializerXml.Deserialize(s), UeberlassungAusfuhrERTyp)
End Function
#End Region
'''
''' Serializes current UeberlassungAusfuhrERTyp 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 UeberlassungAusfuhrERTyp object
'''
''' File to load and deserialize
''' Output UeberlassungAusfuhrERTyp 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 UeberlassungAusfuhrERTyp, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, UeberlassungAusfuhrERTyp)
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 UeberlassungAusfuhrERTyp) 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 UeberlassungAusfuhrERTyp
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 EinzelUeberlassungTyp
#Region "Private fields"
Private _objektIdentifizierung As ObjektIdentifizierungERTyp
Private _kopfDaten As KopfDatenUeberlassungTyp
Private _warenPosition As List(Of PositionUeberlassungTyp)
Private _exportOperation As ExportOperationERType
Private _goodsItem As List(Of GoodsItemERType)
Private _attachments As List(Of AttachmentERType)
Private Shared _serializerXml As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._attachments = New List(Of AttachmentERType)()
Me._goodsItem = New List(Of GoodsItemERType)()
Me._exportOperation = New ExportOperationERType()
Me._warenPosition = New List(Of PositionUeberlassungTyp)()
Me._kopfDaten = New KopfDatenUeberlassungTyp()
Me._objektIdentifizierung = New ObjektIdentifizierungERTyp()
End Sub
Public Property ObjektIdentifizierung() As ObjektIdentifizierungERTyp
Get
Return Me._objektIdentifizierung
End Get
Set
Me._objektIdentifizierung = Value
End Set
End Property
Public Property KopfDaten() As KopfDatenUeberlassungTyp
Get
Return Me._kopfDaten
End Get
Set
Me._kopfDaten = Value
End Set
End Property
Public Property WarenPosition() As List(Of PositionUeberlassungTyp)
Get
Return Me._warenPosition
End Get
Set
Me._warenPosition = Value
End Set
End Property
Public Property ExportOperation() As ExportOperationERType
Get
Return Me._exportOperation
End Get
Set
Me._exportOperation = Value
End Set
End Property
Public Property GoodsItem() As List(Of GoodsItemERType)
Get
Return Me._goodsItem
End Get
Set
Me._goodsItem = Value
End Set
End Property
Public Property Attachments() As List(Of AttachmentERType)
Get
Return Me._attachments
End Get
Set
Me._attachments = Value
End Set
End Property
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
Get
If (_serializerXml Is Nothing) Then
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(EinzelUeberlassungTyp))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize EinzelUeberlassungTyp object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes EinzelUeberlassungTyp object
'''
''' string to deserialize
''' Output EinzelUeberlassungTyp 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 EinzelUeberlassungTyp, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, EinzelUeberlassungTyp)
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 EinzelUeberlassungTyp) 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 EinzelUeberlassungTyp
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), EinzelUeberlassungTyp)
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 EinzelUeberlassungTyp
Return CType(SerializerXml.Deserialize(s), EinzelUeberlassungTyp)
End Function
#End Region
'''
''' Serializes current EinzelUeberlassungTyp 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 EinzelUeberlassungTyp object
'''
''' File to load and deserialize
''' Output EinzelUeberlassungTyp 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 EinzelUeberlassungTyp, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, EinzelUeberlassungTyp)
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 EinzelUeberlassungTyp) 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 EinzelUeberlassungTyp
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 ObjektIdentifizierungERTyp
#Region "Private fields"
Private _objektName As String
Private _eDIFACTNachrichtenNr As String
Private _zeitpunktEingang As Date
Private _shipmentReferenz As String
Private Shared _serializerXml As XmlSerializer
#End Region
Public Property ObjektName() As String
Get
Return Me._objektName
End Get
Set
Me._objektName = Value
End Set
End Property
Public Property EDIFACTNachrichtenNr() As String
Get
Return Me._eDIFACTNachrichtenNr
End Get
Set
Me._eDIFACTNachrichtenNr = Value
End Set
End Property
Public Property ZeitpunktEingang() As Date
Get
Return Me._zeitpunktEingang
End Get
Set
Me._zeitpunktEingang = 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(ObjektIdentifizierungERTyp))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize ObjektIdentifizierungERTyp object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes ObjektIdentifizierungERTyp object
'''
''' string to deserialize
''' Output ObjektIdentifizierungERTyp 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 ObjektIdentifizierungERTyp, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, ObjektIdentifizierungERTyp)
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 ObjektIdentifizierungERTyp) 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 ObjektIdentifizierungERTyp
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ObjektIdentifizierungERTyp)
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 ObjektIdentifizierungERTyp
Return CType(SerializerXml.Deserialize(s), ObjektIdentifizierungERTyp)
End Function
#End Region
'''
''' Serializes current ObjektIdentifizierungERTyp 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 ObjektIdentifizierungERTyp object
'''
''' File to load and deserialize
''' Output ObjektIdentifizierungERTyp 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 ObjektIdentifizierungERTyp, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, ObjektIdentifizierungERTyp)
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 ObjektIdentifizierungERTyp) 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 ObjektIdentifizierungERTyp
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 AttachmentERType
#Region "Private fields"
Private _technicalContent As String
Private _originalFilename As String
Private _fileFormat As String
Private _dataEncoding As String
Private _data As String
Private Shared _serializerXml As XmlSerializer
#End Region
Public Property TechnicalContent() As String
Get
Return Me._technicalContent
End Get
Set
Me._technicalContent = Value
End Set
End Property
Public Property OriginalFilename() As String
Get
Return Me._originalFilename
End Get
Set
Me._originalFilename = Value
End Set
End Property
Public Property FileFormat() As String
Get
Return Me._fileFormat
End Get
Set
Me._fileFormat = Value
End Set
End Property
Public Property DataEncoding() As String
Get
Return Me._dataEncoding
End Get
Set
Me._dataEncoding = Value
End Set
End Property
Public Property Data() As String
Get
Return Me._data
End Get
Set
Me._data = Value
End Set
End Property
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
Get
If (_serializerXml Is Nothing) Then
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AttachmentERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize AttachmentERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes AttachmentERType object
'''
''' string to deserialize
''' Output AttachmentERType 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 AttachmentERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, AttachmentERType)
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 AttachmentERType) 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 AttachmentERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AttachmentERType)
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 AttachmentERType
Return CType(SerializerXml.Deserialize(s), AttachmentERType)
End Function
#End Region
'''
''' Serializes current AttachmentERType 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 AttachmentERType object
'''
''' File to load and deserialize
''' Output AttachmentERType 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 AttachmentERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, AttachmentERType)
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 AttachmentERType) 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 AttachmentERType
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 OutwardProcessingGoodsItemERType
#Region "Private fields"
Private _reimportDate As Date
Private _replacement As String
Private Shared _serializerXml As XmlSerializer
#End Region
Public Property ReimportDate() As Date
Get
Return Me._reimportDate
End Get
Set
Me._reimportDate = Value
End Set
End Property
Public Property Replacement() As String
Get
Return Me._replacement
End Get
Set
Me._replacement = Value
End Set
End Property
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
Get
If (_serializerXml Is Nothing) Then
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(OutwardProcessingGoodsItemERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize OutwardProcessingGoodsItemERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes OutwardProcessingGoodsItemERType object
'''
''' string to deserialize
''' Output OutwardProcessingGoodsItemERType 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 OutwardProcessingGoodsItemERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, OutwardProcessingGoodsItemERType)
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 OutwardProcessingGoodsItemERType) 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 OutwardProcessingGoodsItemERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), OutwardProcessingGoodsItemERType)
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 OutwardProcessingGoodsItemERType
Return CType(SerializerXml.Deserialize(s), OutwardProcessingGoodsItemERType)
End Function
#End Region
'''
''' Serializes current OutwardProcessingGoodsItemERType 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 OutwardProcessingGoodsItemERType object
'''
''' File to load and deserialize
''' Output OutwardProcessingGoodsItemERType 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 OutwardProcessingGoodsItemERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, OutwardProcessingGoodsItemERType)
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 OutwardProcessingGoodsItemERType) 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 OutwardProcessingGoodsItemERType
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 AuthorisationGoodsItemERType
#Region "Private fields"
Private _type As String
Private _referenceNumber As String
Private _holderOfAuthorisation 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
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(AuthorisationGoodsItemERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize AuthorisationGoodsItemERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes AuthorisationGoodsItemERType object
'''
''' string to deserialize
''' Output AuthorisationGoodsItemERType 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 AuthorisationGoodsItemERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, AuthorisationGoodsItemERType)
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 AuthorisationGoodsItemERType) 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 AuthorisationGoodsItemERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AuthorisationGoodsItemERType)
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 AuthorisationGoodsItemERType
Return CType(SerializerXml.Deserialize(s), AuthorisationGoodsItemERType)
End Function
#End Region
'''
''' Serializes current AuthorisationGoodsItemERType 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 AuthorisationGoodsItemERType object
'''
''' File to load and deserialize
''' Output AuthorisationGoodsItemERType 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 AuthorisationGoodsItemERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, AuthorisationGoodsItemERType)
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 AuthorisationGoodsItemERType) 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 AuthorisationGoodsItemERType
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 InwardProcessingGoodsReferenceERType
#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(InwardProcessingGoodsReferenceERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize InwardProcessingGoodsReferenceERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes InwardProcessingGoodsReferenceERType object
'''
''' string to deserialize
''' Output InwardProcessingGoodsReferenceERType 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 InwardProcessingGoodsReferenceERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, InwardProcessingGoodsReferenceERType)
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 InwardProcessingGoodsReferenceERType) 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 InwardProcessingGoodsReferenceERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), InwardProcessingGoodsReferenceERType)
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 InwardProcessingGoodsReferenceERType
Return CType(SerializerXml.Deserialize(s), InwardProcessingGoodsReferenceERType)
End Function
#End Region
'''
''' Serializes current InwardProcessingGoodsReferenceERType 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 InwardProcessingGoodsReferenceERType object
'''
''' File to load and deserialize
''' Output InwardProcessingGoodsReferenceERType 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 InwardProcessingGoodsReferenceERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, InwardProcessingGoodsReferenceERType)
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 InwardProcessingGoodsReferenceERType) 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 InwardProcessingGoodsReferenceERType
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 InwardProcessingERType
#Region "Private fields"
Private _alignment As String
Private _simplyGrantedAuthorisation As String
Private _typeOfAuthorisation As String
Private _referenceNumber As String
Private _customsOfficeOfSupervision As String
Private _goodsReference As List(Of InwardProcessingGoodsReferenceERType)
Private Shared _serializerXml As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._goodsReference = New List(Of InwardProcessingGoodsReferenceERType)()
End Sub
Public Property Alignment() As String
Get
Return Me._alignment
End Get
Set
Me._alignment = Value
End Set
End Property
Public Property SimplyGrantedAuthorisation() As String
Get
Return Me._simplyGrantedAuthorisation
End Get
Set
Me._simplyGrantedAuthorisation = 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 CustomsOfficeOfSupervision() As String
Get
Return Me._customsOfficeOfSupervision
End Get
Set
Me._customsOfficeOfSupervision = Value
End Set
End Property
Public Property GoodsReference() As List(Of InwardProcessingGoodsReferenceERType)
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(InwardProcessingERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize InwardProcessingERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes InwardProcessingERType object
'''
''' string to deserialize
''' Output InwardProcessingERType 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 InwardProcessingERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, InwardProcessingERType)
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 InwardProcessingERType) 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 InwardProcessingERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), InwardProcessingERType)
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 InwardProcessingERType
Return CType(SerializerXml.Deserialize(s), InwardProcessingERType)
End Function
#End Region
'''
''' Serializes current InwardProcessingERType 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 InwardProcessingERType object
'''
''' File to load and deserialize
''' Output InwardProcessingERType 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 InwardProcessingERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, InwardProcessingERType)
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 InwardProcessingERType) 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 InwardProcessingERType
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 GoodsReductionAfterTreatmentERType
#Region "Private fields"
Private _quantity As Decimal
Private _measurementUnit As String
Private _qualifier As String
Private Shared _serializerXml As XmlSerializer
#End Region
Public Property Quantity() As Decimal
Get
Return Me._quantity
End Get
Set
Me._quantity = Value
End Set
End Property
Public Property MeasurementUnit() As String
Get
Return Me._measurementUnit
End Get
Set
Me._measurementUnit = Value
End Set
End Property
Public Property Qualifier() As String
Get
Return Me._qualifier
End Get
Set
Me._qualifier = Value
End Set
End Property
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
Get
If (_serializerXml Is Nothing) Then
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(GoodsReductionAfterTreatmentERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize GoodsReductionAfterTreatmentERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes GoodsReductionAfterTreatmentERType object
'''
''' string to deserialize
''' Output GoodsReductionAfterTreatmentERType 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 GoodsReductionAfterTreatmentERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, GoodsReductionAfterTreatmentERType)
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 GoodsReductionAfterTreatmentERType) 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 GoodsReductionAfterTreatmentERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), GoodsReductionAfterTreatmentERType)
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 GoodsReductionAfterTreatmentERType
Return CType(SerializerXml.Deserialize(s), GoodsReductionAfterTreatmentERType)
End Function
#End Region
'''
''' Serializes current GoodsReductionAfterTreatmentERType 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 GoodsReductionAfterTreatmentERType object
'''
''' File to load and deserialize
''' Output GoodsReductionAfterTreatmentERType 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 GoodsReductionAfterTreatmentERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, GoodsReductionAfterTreatmentERType)
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 GoodsReductionAfterTreatmentERType) 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 GoodsReductionAfterTreatmentERType
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 GoodsReductionERType
#Region "Private fields"
Private _quantity As Decimal
Private _measurementUnit As String
Private _qualifier As String
Private Shared _serializerXml As XmlSerializer
#End Region
Public Property Quantity() As Decimal
Get
Return Me._quantity
End Get
Set
Me._quantity = Value
End Set
End Property
Public Property MeasurementUnit() As String
Get
Return Me._measurementUnit
End Get
Set
Me._measurementUnit = Value
End Set
End Property
Public Property Qualifier() As String
Get
Return Me._qualifier
End Get
Set
Me._qualifier = Value
End Set
End Property
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
Get
If (_serializerXml Is Nothing) Then
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(GoodsReductionERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize GoodsReductionERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes GoodsReductionERType object
'''
''' string to deserialize
''' Output GoodsReductionERType 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 GoodsReductionERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, GoodsReductionERType)
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 GoodsReductionERType) 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 GoodsReductionERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), GoodsReductionERType)
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 GoodsReductionERType
Return CType(SerializerXml.Deserialize(s), GoodsReductionERType)
End Function
#End Region
'''
''' Serializes current GoodsReductionERType 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 GoodsReductionERType object
'''
''' File to load and deserialize
''' Output GoodsReductionERType 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 GoodsReductionERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, GoodsReductionERType)
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 GoodsReductionERType) 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 GoodsReductionERType
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 CustomsWarehousingGoodsReferenceERType
#Region "Private fields"
Private _goodsItemNumber As String
Private _mRN As String
Private _registrationNumber As String
Private _commodityCode As String
Private _usualTreatment As String
Private _accessViaATLAS As String
Private _complementOfInformation As String
Private _goodsReduction As GoodsReductionERType
Private _goodsReductionAfterTreatment As GoodsReductionAfterTreatmentERType
Private Shared _serializerXml As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._goodsReductionAfterTreatment = New GoodsReductionAfterTreatmentERType()
Me._goodsReduction = New GoodsReductionERType()
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 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 GoodsReductionERType
Get
Return Me._goodsReduction
End Get
Set
Me._goodsReduction = Value
End Set
End Property
Public Property GoodsReductionAfterTreatment() As GoodsReductionAfterTreatmentERType
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(CustomsWarehousingGoodsReferenceERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize CustomsWarehousingGoodsReferenceERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes CustomsWarehousingGoodsReferenceERType object
'''
''' string to deserialize
''' Output CustomsWarehousingGoodsReferenceERType 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 CustomsWarehousingGoodsReferenceERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, CustomsWarehousingGoodsReferenceERType)
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 CustomsWarehousingGoodsReferenceERType) 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 CustomsWarehousingGoodsReferenceERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CustomsWarehousingGoodsReferenceERType)
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 CustomsWarehousingGoodsReferenceERType
Return CType(SerializerXml.Deserialize(s), CustomsWarehousingGoodsReferenceERType)
End Function
#End Region
'''
''' Serializes current CustomsWarehousingGoodsReferenceERType 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 CustomsWarehousingGoodsReferenceERType object
'''
''' File to load and deserialize
''' Output CustomsWarehousingGoodsReferenceERType 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 CustomsWarehousingGoodsReferenceERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, CustomsWarehousingGoodsReferenceERType)
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 CustomsWarehousingGoodsReferenceERType) 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 CustomsWarehousingGoodsReferenceERType
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 CustomsWarehousingERType
#Region "Private fields"
Private _alignment As String
Private _typeOfAuthorisation As String
Private _referenceNumber As String
Private _lRN As String
Private _goodsReference As List(Of CustomsWarehousingGoodsReferenceERType)
Private Shared _serializerXml As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._goodsReference = New List(Of CustomsWarehousingGoodsReferenceERType)()
End Sub
Public Property Alignment() As String
Get
Return Me._alignment
End Get
Set
Me._alignment = 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 LRN() As String
Get
Return Me._lRN
End Get
Set
Me._lRN = Value
End Set
End Property
Public Property GoodsReference() As List(Of CustomsWarehousingGoodsReferenceERType)
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(CustomsWarehousingERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize CustomsWarehousingERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes CustomsWarehousingERType object
'''
''' string to deserialize
''' Output CustomsWarehousingERType 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 CustomsWarehousingERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, CustomsWarehousingERType)
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 CustomsWarehousingERType) 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 CustomsWarehousingERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CustomsWarehousingERType)
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 CustomsWarehousingERType
Return CType(SerializerXml.Deserialize(s), CustomsWarehousingERType)
End Function
#End Region
'''
''' Serializes current CustomsWarehousingERType 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 CustomsWarehousingERType object
'''
''' File to load and deserialize
''' Output CustomsWarehousingERType 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 CustomsWarehousingERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, CustomsWarehousingERType)
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 CustomsWarehousingERType) 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 CustomsWarehousingERType
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 ProcedureTransferenceERType
#Region "Private fields"
Private _customsWarehousing As CustomsWarehousingERType
Private _inwardProcessing As InwardProcessingERType
Private Shared _serializerXml As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._inwardProcessing = New InwardProcessingERType()
Me._customsWarehousing = New CustomsWarehousingERType()
End Sub
Public Property CustomsWarehousing() As CustomsWarehousingERType
Get
Return Me._customsWarehousing
End Get
Set
Me._customsWarehousing = Value
End Set
End Property
Public Property InwardProcessing() As InwardProcessingERType
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(ProcedureTransferenceERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize ProcedureTransferenceERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes ProcedureTransferenceERType object
'''
''' string to deserialize
''' Output ProcedureTransferenceERType 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 ProcedureTransferenceERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, ProcedureTransferenceERType)
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 ProcedureTransferenceERType) 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 ProcedureTransferenceERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ProcedureTransferenceERType)
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 ProcedureTransferenceERType
Return CType(SerializerXml.Deserialize(s), ProcedureTransferenceERType)
End Function
#End Region
'''
''' Serializes current ProcedureTransferenceERType 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 ProcedureTransferenceERType object
'''
''' File to load and deserialize
''' Output ProcedureTransferenceERType 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 ProcedureTransferenceERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, ProcedureTransferenceERType)
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 ProcedureTransferenceERType) 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 ProcedureTransferenceERType
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()
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 AdditionalReferenceGoodsItemERType
Inherits AdditionalReferenceEGType
#Region "Private fields"
Private _detail As String
Private _currency As String
Private _amount As Decimal
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 Decimal
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(AdditionalReferenceGoodsItemERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize AdditionalReferenceGoodsItemERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes AdditionalReferenceGoodsItemERType object
'''
''' string to deserialize
''' Output AdditionalReferenceGoodsItemERType 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 AdditionalReferenceGoodsItemERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, AdditionalReferenceGoodsItemERType)
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 AdditionalReferenceGoodsItemERType) 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 AdditionalReferenceGoodsItemERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalReferenceGoodsItemERType)
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 AdditionalReferenceGoodsItemERType
Return CType(SerializerXml.Deserialize(s), AdditionalReferenceGoodsItemERType)
End Function
#End Region
'''
''' Serializes current AdditionalReferenceGoodsItemERType 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 AdditionalReferenceGoodsItemERType object
'''
''' File to load and deserialize
''' Output AdditionalReferenceGoodsItemERType 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 AdditionalReferenceGoodsItemERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, AdditionalReferenceGoodsItemERType)
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 AdditionalReferenceGoodsItemERType) 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 AdditionalReferenceGoodsItemERType
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()
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 SupportingDocumentGoodsItemERType
Inherits SupportingDocumentEGType
#Region "Private fields"
Private _complementOfInformation As String
Private _detail As String
Private _amount As Decimal
Private _currency As String
Private _measurementUnitAndQualifier As String
Private _complementaryUnit As String
Private _quantity As Decimal
Private Shared _serializerXml As XmlSerializer
#End Region
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 Amount() As Decimal
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 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
Public Property Quantity() As Decimal
Get
Return Me._quantity
End Get
Set
Me._quantity = Value
End Set
End Property
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
Get
If (_serializerXml Is Nothing) Then
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(SupportingDocumentGoodsItemERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize SupportingDocumentGoodsItemERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes SupportingDocumentGoodsItemERType object
'''
''' string to deserialize
''' Output SupportingDocumentGoodsItemERType 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 SupportingDocumentGoodsItemERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, SupportingDocumentGoodsItemERType)
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 SupportingDocumentGoodsItemERType) 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 SupportingDocumentGoodsItemERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), SupportingDocumentGoodsItemERType)
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 SupportingDocumentGoodsItemERType
Return CType(SerializerXml.Deserialize(s), SupportingDocumentGoodsItemERType)
End Function
#End Region
'''
''' Serializes current SupportingDocumentGoodsItemERType 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 SupportingDocumentGoodsItemERType object
'''
''' File to load and deserialize
''' Output SupportingDocumentGoodsItemERType 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 SupportingDocumentGoodsItemERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, SupportingDocumentGoodsItemERType)
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 SupportingDocumentGoodsItemERType) 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 SupportingDocumentGoodsItemERType
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 PackagingERType
#Region "Private fields"
Private _numberOfPackages As String
Private _sequenceNumber 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 SequenceNumber() As String
Get
Return Me._sequenceNumber
End Get
Set
Me._sequenceNumber = 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(PackagingERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize PackagingERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes PackagingERType object
'''
''' string to deserialize
''' Output PackagingERType 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 PackagingERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, PackagingERType)
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 PackagingERType) 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 PackagingERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PackagingERType)
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 PackagingERType
Return CType(SerializerXml.Deserialize(s), PackagingERType)
End Function
#End Region
'''
''' Serializes current PackagingERType 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 PackagingERType object
'''
''' File to load and deserialize
''' Output PackagingERType 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 PackagingERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, PackagingERType)
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 PackagingERType) 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 PackagingERType
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 PreviousDocumentGoodsItemERType
#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 Decimal
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 Decimal
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(PreviousDocumentGoodsItemERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize PreviousDocumentGoodsItemERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes PreviousDocumentGoodsItemERType object
'''
''' string to deserialize
''' Output PreviousDocumentGoodsItemERType 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 PreviousDocumentGoodsItemERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, PreviousDocumentGoodsItemERType)
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 PreviousDocumentGoodsItemERType) 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 PreviousDocumentGoodsItemERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PreviousDocumentGoodsItemERType)
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 PreviousDocumentGoodsItemERType
Return CType(SerializerXml.Deserialize(s), PreviousDocumentGoodsItemERType)
End Function
#End Region
'''
''' Serializes current PreviousDocumentGoodsItemERType 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 PreviousDocumentGoodsItemERType object
'''
''' File to load and deserialize
''' Output PreviousDocumentGoodsItemERType 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 PreviousDocumentGoodsItemERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, PreviousDocumentGoodsItemERType)
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 PreviousDocumentGoodsItemERType) 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 PreviousDocumentGoodsItemERType
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 ProcedureERType
#Region "Private fields"
Private _requestedProcedure As String
Private _previousProcedure As String
Private _additionalProcedure As String
Private Shared _serializerXml As XmlSerializer
#End Region
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
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
Get
If (_serializerXml Is Nothing) Then
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ProcedureERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize ProcedureERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes ProcedureERType object
'''
''' string to deserialize
''' Output ProcedureERType 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 ProcedureERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, ProcedureERType)
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 ProcedureERType) 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 ProcedureERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ProcedureERType)
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 ProcedureERType
Return CType(SerializerXml.Deserialize(s), ProcedureERType)
End Function
#End Region
'''
''' Serializes current ProcedureERType 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 ProcedureERType object
'''
''' File to load and deserialize
''' Output ProcedureERType 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 ProcedureERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, ProcedureERType)
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 ProcedureERType) 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 ProcedureERType
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 GoodsItemERType
#Region "Private fields"
Private _declarationGoodsItemNumber As String
Private _harmonizedSystemSubHeadingCode As String
Private _combinedNomenclatureCode As String
Private _taricAdditionalCode As List(Of String)
Private _cusCode As String
Private _descriptionOfGoods As String
Private _registrationNumberExternal As String
Private _referenceNumberUCR As String
Private _countryOfOrigin As String
Private _countryOfExport As String
Private _regionOfDispatch As String
Private _netMass As Decimal
Private _grossMass As Decimal
Private _originalGoodsItemNumber As String
Private _uNNumber As List(Of String)
Private _transportCharges As String
Private _procedure As ProcedureERType
Private _supplementaryUnits As Decimal
Private _statisticalValue As Decimal
Private _previousDocument As List(Of PreviousDocumentGoodsItemERType)
Private _packaging As List(Of PackagingERType)
Private _supportingDocument As List(Of SupportingDocumentGoodsItemERType)
Private _transportDocument As List(Of TransportDocumentERType)
Private _additionalReference As List(Of AdditionalReferenceGoodsItemERType)
Private _additionalInformation As List(Of AdditionalInformationERType)
Private _consignee As AddressERType
Private _consignor As AddressERType
Private _additionalSupplyChainActor As List(Of AdditionalSupplyChainActorERType)
Private _procedureTransference As ProcedureTransferenceERType
Private _natureOfTransaction As String
Private _authorisation As List(Of AuthorisationGoodsItemERType)
Private _outwardProcessing As OutwardProcessingGoodsItemERType
Private _applicationInternalData As ApplicationInternalDataType
Private Shared _serializerXml As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._applicationInternalData = New ApplicationInternalDataType()
Me._outwardProcessing = New OutwardProcessingGoodsItemERType()
Me._authorisation = New List(Of AuthorisationGoodsItemERType)()
Me._procedureTransference = New ProcedureTransferenceERType()
Me._additionalSupplyChainActor = New List(Of AdditionalSupplyChainActorERType)()
Me._consignor = New AddressERType()
Me._consignee = New AddressERType()
Me._additionalInformation = New List(Of AdditionalInformationERType)()
Me._additionalReference = New List(Of AdditionalReferenceGoodsItemERType)()
Me._transportDocument = New List(Of TransportDocumentERType)()
Me._supportingDocument = New List(Of SupportingDocumentGoodsItemERType)()
Me._packaging = New List(Of PackagingERType)()
Me._previousDocument = New List(Of PreviousDocumentGoodsItemERType)()
Me._procedure = New ProcedureERType()
Me._uNNumber = New List(Of String)()
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 HarmonizedSystemSubHeadingCode() As String
Get
Return Me._harmonizedSystemSubHeadingCode
End Get
Set
Me._harmonizedSystemSubHeadingCode = Value
End Set
End Property
Public Property CombinedNomenclatureCode() As String
Get
Return Me._combinedNomenclatureCode
End Get
Set
Me._combinedNomenclatureCode = 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 CusCode() As String
Get
Return Me._cusCode
End Get
Set
Me._cusCode = 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 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 CountryOfOrigin() As String
Get
Return Me._countryOfOrigin
End Get
Set
Me._countryOfOrigin = 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 RegionOfDispatch() As String
Get
Return Me._regionOfDispatch
End Get
Set
Me._regionOfDispatch = Value
End Set
End Property
Public Property NetMass() As Decimal
Get
Return Me._netMass
End Get
Set
Me._netMass = Value
End Set
End Property
Public Property GrossMass() As Decimal
Get
Return Me._grossMass
End Get
Set
Me._grossMass = Value
End Set
End Property
Public Property OriginalGoodsItemNumber() As String
Get
Return Me._originalGoodsItemNumber
End Get
Set
Me._originalGoodsItemNumber = 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 Procedure() As ProcedureERType
Get
Return Me._procedure
End Get
Set
Me._procedure = Value
End Set
End Property
Public Property SupplementaryUnits() As Decimal
Get
Return Me._supplementaryUnits
End Get
Set
Me._supplementaryUnits = Value
End Set
End Property
Public Property StatisticalValue() As Decimal
Get
Return Me._statisticalValue
End Get
Set
Me._statisticalValue = Value
End Set
End Property
Public Property PreviousDocument() As List(Of PreviousDocumentGoodsItemERType)
Get
Return Me._previousDocument
End Get
Set
Me._previousDocument = Value
End Set
End Property
Public Property Packaging() As List(Of PackagingERType)
Get
Return Me._packaging
End Get
Set
Me._packaging = Value
End Set
End Property
Public Property SupportingDocument() As List(Of SupportingDocumentGoodsItemERType)
Get
Return Me._supportingDocument
End Get
Set
Me._supportingDocument = Value
End Set
End Property
Public Property TransportDocument() As List(Of TransportDocumentERType)
Get
Return Me._transportDocument
End Get
Set
Me._transportDocument = Value
End Set
End Property
Public Property AdditionalReference() As List(Of AdditionalReferenceGoodsItemERType)
Get
Return Me._additionalReference
End Get
Set
Me._additionalReference = Value
End Set
End Property
Public Property AdditionalInformation() As List(Of AdditionalInformationERType)
Get
Return Me._additionalInformation
End Get
Set
Me._additionalInformation = Value
End Set
End Property
Public Property Consignee() As AddressERType
Get
Return Me._consignee
End Get
Set
Me._consignee = Value
End Set
End Property
Public Property Consignor() As AddressERType
Get
Return Me._consignor
End Get
Set
Me._consignor = Value
End Set
End Property
Public Property AdditionalSupplyChainActor() As List(Of AdditionalSupplyChainActorERType)
Get
Return Me._additionalSupplyChainActor
End Get
Set
Me._additionalSupplyChainActor = Value
End Set
End Property
Public Property ProcedureTransference() As ProcedureTransferenceERType
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 Authorisation() As List(Of AuthorisationGoodsItemERType)
Get
Return Me._authorisation
End Get
Set
Me._authorisation = Value
End Set
End Property
Public Property OutwardProcessing() As OutwardProcessingGoodsItemERType
Get
Return Me._outwardProcessing
End Get
Set
Me._outwardProcessing = 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(GoodsItemERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize GoodsItemERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes GoodsItemERType object
'''
''' string to deserialize
''' Output GoodsItemERType 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 GoodsItemERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, GoodsItemERType)
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 GoodsItemERType) 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 GoodsItemERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), GoodsItemERType)
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 GoodsItemERType
Return CType(SerializerXml.Deserialize(s), GoodsItemERType)
End Function
#End Region
'''
''' Serializes current GoodsItemERType 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 GoodsItemERType object
'''
''' File to load and deserialize
''' Output GoodsItemERType 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 GoodsItemERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, GoodsItemERType)
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 GoodsItemERType) 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 GoodsItemERType
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 TransportDocumentERType
#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(TransportDocumentERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize TransportDocumentERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes TransportDocumentERType object
'''
''' string to deserialize
''' Output TransportDocumentERType 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 TransportDocumentERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, TransportDocumentERType)
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 TransportDocumentERType) 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 TransportDocumentERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransportDocumentERType)
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 TransportDocumentERType
Return CType(SerializerXml.Deserialize(s), TransportDocumentERType)
End Function
#End Region
'''
''' Serializes current TransportDocumentERType 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 TransportDocumentERType object
'''
''' File to load and deserialize
''' Output TransportDocumentERType 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 TransportDocumentERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, TransportDocumentERType)
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 TransportDocumentERType) 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 TransportDocumentERType
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 AdditionalInformationERType
#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(AdditionalInformationERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize AdditionalInformationERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes AdditionalInformationERType object
'''
''' string to deserialize
''' Output AdditionalInformationERType 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 AdditionalInformationERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, AdditionalInformationERType)
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 AdditionalInformationERType) 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 AdditionalInformationERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalInformationERType)
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 AdditionalInformationERType
Return CType(SerializerXml.Deserialize(s), AdditionalInformationERType)
End Function
#End Region
'''
''' Serializes current AdditionalInformationERType 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 AdditionalInformationERType object
'''
''' File to load and deserialize
''' Output AdditionalInformationERType 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 AdditionalInformationERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, AdditionalInformationERType)
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 AdditionalInformationERType) 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 AdditionalInformationERType
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 AddressERType
#Region "Private fields"
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 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(AddressERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize AddressERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes AddressERType object
'''
''' string to deserialize
''' Output AddressERType 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 AddressERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, AddressERType)
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 AddressERType) 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 AddressERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AddressERType)
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 AddressERType
Return CType(SerializerXml.Deserialize(s), AddressERType)
End Function
#End Region
'''
''' Serializes current AddressERType 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 AddressERType object
'''
''' File to load and deserialize
''' Output AddressERType 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 AddressERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, AddressERType)
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 AddressERType) 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 AddressERType
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 AddressWithContactERType
Inherits AddressERType
#Region "Private fields"
Private _contactPerson As ContactPersonERType
Private Shared _serializerXml As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._contactPerson = New ContactPersonERType()
End Sub
Public Property ContactPerson() As ContactPersonERType
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(AddressWithContactERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize AddressWithContactERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes AddressWithContactERType object
'''
''' string to deserialize
''' Output AddressWithContactERType 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 AddressWithContactERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, AddressWithContactERType)
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 AddressWithContactERType) 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 AddressWithContactERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AddressWithContactERType)
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 AddressWithContactERType
Return CType(SerializerXml.Deserialize(s), AddressWithContactERType)
End Function
#End Region
'''
''' Serializes current AddressWithContactERType 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 AddressWithContactERType object
'''
''' File to load and deserialize
''' Output AddressWithContactERType 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 AddressWithContactERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, AddressWithContactERType)
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 AddressWithContactERType) 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 AddressWithContactERType
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 ContactPersonERType
#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(ContactPersonERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize ContactPersonERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes ContactPersonERType object
'''
''' string to deserialize
''' Output ContactPersonERType 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 ContactPersonERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, ContactPersonERType)
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 ContactPersonERType) 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 ContactPersonERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ContactPersonERType)
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 ContactPersonERType
Return CType(SerializerXml.Deserialize(s), ContactPersonERType)
End Function
#End Region
'''
''' Serializes current ContactPersonERType 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 ContactPersonERType object
'''
''' File to load and deserialize
''' Output ContactPersonERType 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 ContactPersonERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, ContactPersonERType)
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 ContactPersonERType) 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 ContactPersonERType
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 AdditionalSupplyChainActorERType
#Region "Private fields"
Private _role As String
Private _identificationNumber 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 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
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(AdditionalSupplyChainActorERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize AdditionalSupplyChainActorERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes AdditionalSupplyChainActorERType object
'''
''' string to deserialize
''' Output AdditionalSupplyChainActorERType 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 AdditionalSupplyChainActorERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, AdditionalSupplyChainActorERType)
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 AdditionalSupplyChainActorERType) 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 AdditionalSupplyChainActorERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalSupplyChainActorERType)
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 AdditionalSupplyChainActorERType
Return CType(SerializerXml.Deserialize(s), AdditionalSupplyChainActorERType)
End Function
#End Region
'''
''' Serializes current AdditionalSupplyChainActorERType 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 AdditionalSupplyChainActorERType object
'''
''' File to load and deserialize
''' Output AdditionalSupplyChainActorERType 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 AdditionalSupplyChainActorERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, AdditionalSupplyChainActorERType)
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 AdditionalSupplyChainActorERType) 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 AdditionalSupplyChainActorERType
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()
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()
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 LocationOfGoodsAddressERType
#Region "Private fields"
Private _complementOfInformation 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 ComplementOfInformation() As String
Get
Return Me._complementOfInformation
End Get
Set
Me._complementOfInformation = 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(LocationOfGoodsAddressERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize LocationOfGoodsAddressERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes LocationOfGoodsAddressERType object
'''
''' string to deserialize
''' Output LocationOfGoodsAddressERType 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 LocationOfGoodsAddressERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, LocationOfGoodsAddressERType)
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 LocationOfGoodsAddressERType) 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 LocationOfGoodsAddressERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), LocationOfGoodsAddressERType)
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 LocationOfGoodsAddressERType
Return CType(SerializerXml.Deserialize(s), LocationOfGoodsAddressERType)
End Function
#End Region
'''
''' Serializes current LocationOfGoodsAddressERType 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 LocationOfGoodsAddressERType object
'''
''' File to load and deserialize
''' Output LocationOfGoodsAddressERType 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 LocationOfGoodsAddressERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, LocationOfGoodsAddressERType)
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 LocationOfGoodsAddressERType) 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 LocationOfGoodsAddressERType
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 LocationOfGoodsERType
#Region "Private fields"
Private _typeOfLocation As String
Private _qualifierOfIdentification As String
Private _authorisationNumber As String
Private _additionalIdentifier As String
Private _uNLocode As String
Private _latitude As String
Private _longitude As String
Private _address As LocationOfGoodsAddressERType
Private _contactPerson As ContactPersonERType
Private Shared _serializerXml As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._contactPerson = New ContactPersonERType()
Me._address = New LocationOfGoodsAddressERType()
End Sub
Public Property TypeOfLocation() As String
Get
Return Me._typeOfLocation
End Get
Set
Me._typeOfLocation = Value
End Set
End Property
Public Property QualifierOfIdentification() As String
Get
Return Me._qualifierOfIdentification
End Get
Set
Me._qualifierOfIdentification = Value
End Set
End Property
Public Property AuthorisationNumber() As String
Get
Return Me._authorisationNumber
End Get
Set
Me._authorisationNumber = Value
End Set
End Property
Public Property AdditionalIdentifier() As String
Get
Return Me._additionalIdentifier
End Get
Set
Me._additionalIdentifier = Value
End Set
End Property
Public Property UNLocode() As String
Get
Return Me._uNLocode
End Get
Set
Me._uNLocode = Value
End Set
End Property
Public Property 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 LocationOfGoodsAddressERType
Get
Return Me._address
End Get
Set
Me._address = Value
End Set
End Property
Public Property ContactPerson() As ContactPersonERType
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(LocationOfGoodsERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize LocationOfGoodsERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes LocationOfGoodsERType object
'''
''' string to deserialize
''' Output LocationOfGoodsERType 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 LocationOfGoodsERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, LocationOfGoodsERType)
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 LocationOfGoodsERType) 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 LocationOfGoodsERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), LocationOfGoodsERType)
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 LocationOfGoodsERType
Return CType(SerializerXml.Deserialize(s), LocationOfGoodsERType)
End Function
#End Region
'''
''' Serializes current LocationOfGoodsERType 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 LocationOfGoodsERType object
'''
''' File to load and deserialize
''' Output LocationOfGoodsERType 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 LocationOfGoodsERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, LocationOfGoodsERType)
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 LocationOfGoodsERType) 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 LocationOfGoodsERType
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 TransportEquipmentERType
#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(TransportEquipmentERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize TransportEquipmentERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes TransportEquipmentERType object
'''
''' string to deserialize
''' Output TransportEquipmentERType 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 TransportEquipmentERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, TransportEquipmentERType)
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 TransportEquipmentERType) 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 TransportEquipmentERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransportEquipmentERType)
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 TransportEquipmentERType
Return CType(SerializerXml.Deserialize(s), TransportEquipmentERType)
End Function
#End Region
'''
''' Serializes current TransportEquipmentERType 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 TransportEquipmentERType object
'''
''' File to load and deserialize
''' Output TransportEquipmentERType 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 TransportEquipmentERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, TransportEquipmentERType)
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 TransportEquipmentERType) 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 TransportEquipmentERType
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 AdditionalReferenceERType
#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(AdditionalReferenceERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize AdditionalReferenceERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes AdditionalReferenceERType object
'''
''' string to deserialize
''' Output AdditionalReferenceERType 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 AdditionalReferenceERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, AdditionalReferenceERType)
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 AdditionalReferenceERType) 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 AdditionalReferenceERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalReferenceERType)
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 AdditionalReferenceERType
Return CType(SerializerXml.Deserialize(s), AdditionalReferenceERType)
End Function
#End Region
'''
''' Serializes current AdditionalReferenceERType 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 AdditionalReferenceERType object
'''
''' File to load and deserialize
''' Output AdditionalReferenceERType 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 AdditionalReferenceERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, AdditionalReferenceERType)
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 AdditionalReferenceERType) 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 AdditionalReferenceERType
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 SupportingDocumentERType
#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(SupportingDocumentERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize SupportingDocumentERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes SupportingDocumentERType object
'''
''' string to deserialize
''' Output SupportingDocumentERType 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 SupportingDocumentERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, SupportingDocumentERType)
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 SupportingDocumentERType) 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 SupportingDocumentERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), SupportingDocumentERType)
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 SupportingDocumentERType
Return CType(SerializerXml.Deserialize(s), SupportingDocumentERType)
End Function
#End Region
'''
''' Serializes current SupportingDocumentERType 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 SupportingDocumentERType object
'''
''' File to load and deserialize
''' Output SupportingDocumentERType 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 SupportingDocumentERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, SupportingDocumentERType)
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 SupportingDocumentERType) 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 SupportingDocumentERType
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 PreviousDocumentERType
#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(PreviousDocumentERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize PreviousDocumentERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes PreviousDocumentERType object
'''
''' string to deserialize
''' Output PreviousDocumentERType 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 PreviousDocumentERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, PreviousDocumentERType)
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 PreviousDocumentERType) 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 PreviousDocumentERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PreviousDocumentERType)
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 PreviousDocumentERType
Return CType(SerializerXml.Deserialize(s), PreviousDocumentERType)
End Function
#End Region
'''
''' Serializes current PreviousDocumentERType 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 PreviousDocumentERType object
'''
''' File to load and deserialize
''' Output PreviousDocumentERType 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 PreviousDocumentERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, PreviousDocumentERType)
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 PreviousDocumentERType) 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 PreviousDocumentERType
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 ProductERType
#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(ProductERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize ProductERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes ProductERType object
'''
''' string to deserialize
''' Output ProductERType 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 ProductERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, ProductERType)
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 ProductERType) 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 ProductERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ProductERType)
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 ProductERType
Return CType(SerializerXml.Deserialize(s), ProductERType)
End Function
#End Region
'''
''' Serializes current ProductERType 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 ProductERType object
'''
''' File to load and deserialize
''' Output ProductERType 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 ProductERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, ProductERType)
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 ProductERType) 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 ProductERType
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 IdentificationMeansERType
#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(IdentificationMeansERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize IdentificationMeansERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes IdentificationMeansERType object
'''
''' string to deserialize
''' Output IdentificationMeansERType 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 IdentificationMeansERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, IdentificationMeansERType)
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 IdentificationMeansERType) 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 IdentificationMeansERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), IdentificationMeansERType)
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 IdentificationMeansERType
Return CType(SerializerXml.Deserialize(s), IdentificationMeansERType)
End Function
#End Region
'''
''' Serializes current IdentificationMeansERType 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 IdentificationMeansERType object
'''
''' File to load and deserialize
''' Output IdentificationMeansERType 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 IdentificationMeansERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, IdentificationMeansERType)
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 IdentificationMeansERType) 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 IdentificationMeansERType
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 OutwardProcessingERType
#Region "Private fields"
Private _countryOfReimport As List(Of String)
Private _identificationMeans As List(Of IdentificationMeansERType)
Private _product As List(Of ProductERType)
Private Shared _serializerXml As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._product = New List(Of ProductERType)()
Me._identificationMeans = New List(Of IdentificationMeansERType)()
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 IdentificationMeansERType)
Get
Return Me._identificationMeans
End Get
Set
Me._identificationMeans = Value
End Set
End Property
Public Property Product() As List(Of ProductERType)
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(OutwardProcessingERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize OutwardProcessingERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes OutwardProcessingERType object
'''
''' string to deserialize
''' Output OutwardProcessingERType 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 OutwardProcessingERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, OutwardProcessingERType)
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 OutwardProcessingERType) 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 OutwardProcessingERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), OutwardProcessingERType)
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 OutwardProcessingERType
Return CType(SerializerXml.Deserialize(s), OutwardProcessingERType)
End Function
#End Region
'''
''' Serializes current OutwardProcessingERType 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 OutwardProcessingERType object
'''
''' File to load and deserialize
''' Output OutwardProcessingERType 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 OutwardProcessingERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, OutwardProcessingERType)
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 OutwardProcessingERType) 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 OutwardProcessingERType
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 DeliveryTermsERType
#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(DeliveryTermsERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize DeliveryTermsERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes DeliveryTermsERType object
'''
''' string to deserialize
''' Output DeliveryTermsERType 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 DeliveryTermsERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DeliveryTermsERType)
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 DeliveryTermsERType) 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 DeliveryTermsERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DeliveryTermsERType)
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 DeliveryTermsERType
Return CType(SerializerXml.Deserialize(s), DeliveryTermsERType)
End Function
#End Region
'''
''' Serializes current DeliveryTermsERType 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 DeliveryTermsERType object
'''
''' File to load and deserialize
''' Output DeliveryTermsERType 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 DeliveryTermsERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DeliveryTermsERType)
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 DeliveryTermsERType) 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 DeliveryTermsERType
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 AuthorisationERType
#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(AuthorisationERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize AuthorisationERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes AuthorisationERType object
'''
''' string to deserialize
''' Output AuthorisationERType 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 AuthorisationERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, AuthorisationERType)
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 AuthorisationERType) 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 AuthorisationERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AuthorisationERType)
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 AuthorisationERType
Return CType(SerializerXml.Deserialize(s), AuthorisationERType)
End Function
#End Region
'''
''' Serializes current AuthorisationERType 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 AuthorisationERType object
'''
''' File to load and deserialize
''' Output AuthorisationERType 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 AuthorisationERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, AuthorisationERType)
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 AuthorisationERType) 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 AuthorisationERType
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 ActiveBorderTransportMeansERType
#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(ActiveBorderTransportMeansERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize ActiveBorderTransportMeansERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes ActiveBorderTransportMeansERType object
'''
''' string to deserialize
''' Output ActiveBorderTransportMeansERType 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 ActiveBorderTransportMeansERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, ActiveBorderTransportMeansERType)
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 ActiveBorderTransportMeansERType) 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 ActiveBorderTransportMeansERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ActiveBorderTransportMeansERType)
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 ActiveBorderTransportMeansERType
Return CType(SerializerXml.Deserialize(s), ActiveBorderTransportMeansERType)
End Function
#End Region
'''
''' Serializes current ActiveBorderTransportMeansERType 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 ActiveBorderTransportMeansERType object
'''
''' File to load and deserialize
''' Output ActiveBorderTransportMeansERType 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 ActiveBorderTransportMeansERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, ActiveBorderTransportMeansERType)
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 ActiveBorderTransportMeansERType) 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 ActiveBorderTransportMeansERType
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 DepartureTransportMeansERType
#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(DepartureTransportMeansERType))
End If
Return _serializerXml
End Get
End Property
#Region "Serialize/Deserialize"
'''
''' Serialize DepartureTransportMeansERType object
'''
''' XML value
Public Overridable Function Serialize() As String
Dim streamReader As StreamReader = Nothing
Dim memoryStream As MemoryStream = Nothing
Try
memoryStream = New MemoryStream()
Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings()
Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)
SerializerXml.Serialize(xmlWriter, Me)
memoryStream.Seek(0, SeekOrigin.Begin)
streamReader = New StreamReader(memoryStream)
Return streamReader.ReadToEnd
Finally
If (Not (streamReader) Is Nothing) Then
streamReader.Dispose()
End If
If (Not (memoryStream) Is Nothing) Then
memoryStream.Dispose()
End If
End Try
End Function
'''
''' Deserializes DepartureTransportMeansERType object
'''
''' string to deserialize
''' Output DepartureTransportMeansERType 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 DepartureTransportMeansERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DepartureTransportMeansERType)
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 DepartureTransportMeansERType) 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 DepartureTransportMeansERType
Dim stringReader As StringReader = Nothing
Try
stringReader = New StringReader(input)
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DepartureTransportMeansERType)
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 DepartureTransportMeansERType
Return CType(SerializerXml.Deserialize(s), DepartureTransportMeansERType)
End Function
#End Region
'''
''' Serializes current DepartureTransportMeansERType 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 DepartureTransportMeansERType object
'''
''' File to load and deserialize
''' Output DepartureTransportMeansERType 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 DepartureTransportMeansERType, ByRef exception As System.Exception) As Boolean
exception = Nothing
obj = CType(Nothing, DepartureTransportMeansERType)
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 DepartureTransportMeansERType) 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 DepartureTransportMeansERType
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 ExportOperationERType
#Region "Private fields"
Private _declarationType As String
Private _additionalDeclarationType As String
Private _exportDeclarationType As String
Private _mRN As String
Private _countryOfDestination As String
Private _countryOfExport As String
Private _declarationRecordationDateAndTime As Date
Private _declarationAcceptanceDateAndTime As Date
Private _exitDate As Date
Private _releaseDateAndTime As Date
Private _decisiveDate As Date
Private _containerIndicator As String
Private _partyConstellation As String
Private _security As String
Private _grossMass As Decimal
Private _registrationNumberExternal As String
Private _inlandModeOfTransport As String
Private _departureTransportMeans As List(Of DepartureTransportMeansERType)
Private _modeOfTransportAtTheBorder As String
Private _activeBorderTransportMeans As ActiveBorderTransportMeansERType
Private _customsOfficeOfExport As String
Private _customsOfficeOfSupplement As String
Private _customsOfficeOfExitDeclared As String
Private _customsOfficeOfExitActual As String
Private _customsOfficeOfPresentation As String
Private _authorisation As List(Of AuthorisationERType)
Private _contractualPartner As AddressERType
Private _additionalSupplyChainActor As List(Of AdditionalSupplyChainActorERType)
Private _carrier As AddressERType
Private _natureOfTransaction As String
Private _totalAmountInvoiced As Decimal
Private _invoiceCurrency As String
Private _specificCircumstanceIndicator As String
Private _transportCharges As String
Private _referenceNumberUCR As String
Private _exporter As AddressERType
Private _consignee As AddressERType
Private _declarant As AddressWithContactERType
Private _representative As AddressWithContactERType
Private _subContractor As AddressERType
Private _consignor As AddressERType
Private _deliveryTerms As DeliveryTermsERType
Private _fileNameOfExportAccompanyingDocument As String
Private _countryOfRoutingOfConsignment As List(Of String)
Private _outwardProcessing As OutwardProcessingERType
Private _previousDocument As List(Of PreviousDocumentERType)
Private _supportingDocument As List(Of SupportingDocumentERType)
Private _additionalReference As List(Of AdditionalReferenceERType)
Private _additionalInformation As List(Of AdditionalInformationERType)
Private _transportEquipment As List(Of TransportEquipmentERType)
Private _transportDocument As List(Of TransportDocumentERType)
Private _locationOfGoods As LocationOfGoodsERType
Private _applicationInternalData As ApplicationInternalDataType
Private Shared _serializerXml As XmlSerializer
#End Region
Public Sub New()
MyBase.New
Me._applicationInternalData = New ApplicationInternalDataType()
Me._locationOfGoods = New LocationOfGoodsERType()
Me._transportDocument = New List(Of TransportDocumentERType)()
Me._transportEquipment = New List(Of TransportEquipmentERType)()
Me._additionalInformation = New List(Of AdditionalInformationERType)()
Me._additionalReference = New List(Of AdditionalReferenceERType)()
Me._supportingDocument = New List(Of SupportingDocumentERType)()
Me._previousDocument = New List(Of PreviousDocumentERType)()
Me._outwardProcessing = New OutwardProcessingERType()
Me._countryOfRoutingOfConsignment = New List(Of String)()
Me._deliveryTerms = New DeliveryTermsERType()
Me._consignor = New AddressERType()
Me._subContractor = New AddressERType()
Me._representative = New AddressWithContactERType()
Me._declarant = New AddressWithContactERType()
Me._consignee = New AddressERType()
Me._exporter = New AddressERType()
Me._carrier = New AddressERType()
Me._additionalSupplyChainActor = New List(Of AdditionalSupplyChainActorERType)()
Me._contractualPartner = New AddressERType()
Me._authorisation = New List(Of AuthorisationERType)()
Me._activeBorderTransportMeans = New ActiveBorderTransportMeansERType()
Me._departureTransportMeans = New List(Of DepartureTransportMeansERType)()
End Sub
Public Property DeclarationType() As String
Get
Return Me._declarationType
End Get
Set
Me._declarationType = Value
End Set
End Property
Public Property AdditionalDeclarationType() As String
Get
Return Me._additionalDeclarationType
End Get
Set
Me._additionalDeclarationType = Value
End Set
End Property
Public Property ExportDeclarationType() As String
Get
Return Me._exportDeclarationType
End Get
Set
Me._exportDeclarationType = 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 CountryOfDestination() As String
Get
Return Me._countryOfDestination
End Get
Set
Me._countryOfDestination = 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 DeclarationRecordationDateAndTime() As Date
Get
Return Me._declarationRecordationDateAndTime
End Get
Set
Me._declarationRecordationDateAndTime = Value
End Set
End Property
Public Property DeclarationAcceptanceDateAndTime() As Date
Get
Return Me._declarationAcceptanceDateAndTime
End Get
Set
Me._declarationAcceptanceDateAndTime = 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 ReleaseDateAndTime() As Date
Get
Return Me._releaseDateAndTime
End Get
Set
Me._releaseDateAndTime = 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 ContainerIndicator() As String
Get
Return Me._containerIndicator
End Get
Set
Me._containerIndicator = Value
End Set
End Property