diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Ueberlassungsmeldung/e_dep_rel.Designer.vb b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Ueberlassungsmeldung/e_dep_rel.Designer.vb
new file mode 100644
index 0000000..b5f508f
--- /dev/null
+++ b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Ueberlassungsmeldung/e_dep_rel.Designer.vb
@@ -0,0 +1,20273 @@
+'' ------------------------------------------------------------------------------
+''
+'' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com
+'' {"TargetFramework":"Net47","NameSpace":"DETPRH","Language":"VisualBasic","Properties":{},"XmlAttribute":{"Enabled":true},"ClassParams":{},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{},"JsonOutput":{},"Enabled":true,"DefaultEncoder":"ASCII"},"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 DETPRH
+
+
+ Partial Public Class DETPRH
+
+#Region "Private fields"
+ Private _preparationDateAndTime As Date
+
+ Private _messageIdentification As String
+
+ Private _messageGroup As DETPRHMessageGroup
+
+ Private _messageType As DETPRHMessageType
+
+ Private _messageVersion As String
+
+ Private _correlationIdentifier As String
+
+ Private _messageSender As DETPRHMessageSender
+
+ Private _messageRecipient As DETPRHMessageRecipient
+
+ Private _transitOperation As DETPRHTransitOperation
+
+ Private _authorisation As List(Of DETPRHAuthorisation)
+
+ Private _customsOfficeOfDeparture As DETPRHCustomsOfficeOfDeparture
+
+ Private _customsOfficeOfDestinationDeclared As DETPRHCustomsOfficeOfDestinationDeclared
+
+ Private _customsOfficeOfTransitDeclared As List(Of DETPRHCustomsOfficeOfTransitDeclared)
+
+ Private _customsOfficeOfExitForTransitDeclared As List(Of DETPRHCustomsOfficeOfExitForTransitDeclared)
+
+ Private _holderOfTheTransitProcedure As DETPRHHolderOfTheTransitProcedure
+
+ Private _representative As DETPRHRepresentative
+
+ Private _guarantee As List(Of DETPRHGuarantee)
+
+ Private _consignment As DETPRHConsignment
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._consignment = New DETPRHConsignment()
+ Me._guarantee = New List(Of DETPRHGuarantee)()
+ Me._representative = New DETPRHRepresentative()
+ Me._holderOfTheTransitProcedure = New DETPRHHolderOfTheTransitProcedure()
+ Me._customsOfficeOfExitForTransitDeclared = New List(Of DETPRHCustomsOfficeOfExitForTransitDeclared)()
+ Me._customsOfficeOfTransitDeclared = New List(Of DETPRHCustomsOfficeOfTransitDeclared)()
+ Me._customsOfficeOfDestinationDeclared = New DETPRHCustomsOfficeOfDestinationDeclared()
+ Me._customsOfficeOfDeparture = New DETPRHCustomsOfficeOfDeparture()
+ Me._authorisation = New List(Of DETPRHAuthorisation)()
+ Me._transitOperation = New DETPRHTransitOperation()
+ Me._messageRecipient = New DETPRHMessageRecipient()
+ Me._messageSender = New DETPRHMessageSender()
+ End Sub
+
+ Public Property preparationDateAndTime() As Date
+ Get
+ Return Me._preparationDateAndTime
+ End Get
+ Set
+ Me._preparationDateAndTime = Value
+ End Set
+ End Property
+
+
+ Public Property messageIdentification() As String
+ Get
+ Return Me._messageIdentification
+ End Get
+ Set
+ Me._messageIdentification = Value
+ End Set
+ End Property
+
+ Public Property messageGroup() As DETPRHMessageGroup
+ Get
+ Return Me._messageGroup
+ End Get
+ Set
+ Me._messageGroup = Value
+ End Set
+ End Property
+
+ Public Property messageType() As DETPRHMessageType
+ Get
+ Return Me._messageType
+ End Get
+ Set
+ Me._messageType = Value
+ End Set
+ End Property
+
+
+ Public Property messageVersion() As String
+ Get
+ Return Me._messageVersion
+ End Get
+ Set
+ Me._messageVersion = Value
+ End Set
+ End Property
+
+
+ Public Property correlationIdentifier() As String
+ Get
+ Return Me._correlationIdentifier
+ End Get
+ Set
+ Me._correlationIdentifier = Value
+ End Set
+ End Property
+
+ Public Property MessageSender() As DETPRHMessageSender
+ Get
+ Return Me._messageSender
+ End Get
+ Set
+ Me._messageSender = Value
+ End Set
+ End Property
+
+ Public Property MessageRecipient() As DETPRHMessageRecipient
+ Get
+ Return Me._messageRecipient
+ End Get
+ Set
+ Me._messageRecipient = Value
+ End Set
+ End Property
+
+ Public Property TransitOperation() As DETPRHTransitOperation
+ Get
+ Return Me._transitOperation
+ End Get
+ Set
+ Me._transitOperation = Value
+ End Set
+ End Property
+
+
+ Public Property Authorisation() As List(Of DETPRHAuthorisation)
+ Get
+ Return Me._authorisation
+ End Get
+ Set
+ Me._authorisation = Value
+ End Set
+ End Property
+
+ Public Property CustomsOfficeOfDeparture() As DETPRHCustomsOfficeOfDeparture
+ Get
+ Return Me._customsOfficeOfDeparture
+ End Get
+ Set
+ Me._customsOfficeOfDeparture = Value
+ End Set
+ End Property
+
+ Public Property CustomsOfficeOfDestinationDeclared() As DETPRHCustomsOfficeOfDestinationDeclared
+ Get
+ Return Me._customsOfficeOfDestinationDeclared
+ End Get
+ Set
+ Me._customsOfficeOfDestinationDeclared = Value
+ End Set
+ End Property
+
+
+ Public Property CustomsOfficeOfTransitDeclared() As List(Of DETPRHCustomsOfficeOfTransitDeclared)
+ Get
+ Return Me._customsOfficeOfTransitDeclared
+ End Get
+ Set
+ Me._customsOfficeOfTransitDeclared = Value
+ End Set
+ End Property
+
+
+ Public Property CustomsOfficeOfExitForTransitDeclared() As List(Of DETPRHCustomsOfficeOfExitForTransitDeclared)
+ Get
+ Return Me._customsOfficeOfExitForTransitDeclared
+ End Get
+ Set
+ Me._customsOfficeOfExitForTransitDeclared = Value
+ End Set
+ End Property
+
+ Public Property HolderOfTheTransitProcedure() As DETPRHHolderOfTheTransitProcedure
+ Get
+ Return Me._holderOfTheTransitProcedure
+ End Get
+ Set
+ Me._holderOfTheTransitProcedure = Value
+ End Set
+ End Property
+
+ Public Property Representative() As DETPRHRepresentative
+ Get
+ Return Me._representative
+ End Get
+ Set
+ Me._representative = Value
+ End Set
+ End Property
+
+
+ Public Property Guarantee() As List(Of DETPRHGuarantee)
+ Get
+ Return Me._guarantee
+ End Get
+ Set
+ Me._guarantee = Value
+ End Set
+ End Property
+
+ Public Property Consignment() As DETPRHConsignment
+ Get
+ Return Me._consignment
+ End Get
+ Set
+ Me._consignment = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRH))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRH object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRH object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRH object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRH, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRH)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRH) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRH
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRH)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRH
+ Return CType(SerializerXml.Deserialize(s), DETPRH)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRH object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRH object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRH object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRH, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRH)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRH) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRH
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Public Enum DETPRHMessageGroup
+
+ DEP
+ End Enum
+
+
+ Public Enum DETPRHMessageType
+
+ DETPRH
+ End Enum
+
+
+ Partial Public Class DETPRHMessageSender
+
+#Region "Private fields"
+ Private _referenceNumber As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property referenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHMessageSender))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHMessageSender object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHMessageSender object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHMessageSender object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHMessageSender, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHMessageSender)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHMessageSender) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHMessageSender
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHMessageSender)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHMessageSender
+ Return CType(SerializerXml.Deserialize(s), DETPRHMessageSender)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHMessageSender object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHMessageSender object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHMessageSender object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHMessageSender, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHMessageSender)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHMessageSender) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHMessageSender
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHMessageRecipient
+
+#Region "Private fields"
+ Private _identificationNumber As String
+
+ Private _subsidiaryNumber 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
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHMessageRecipient))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHMessageRecipient object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHMessageRecipient object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHMessageRecipient object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHMessageRecipient, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHMessageRecipient)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHMessageRecipient) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHMessageRecipient
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHMessageRecipient)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHMessageRecipient
+ Return CType(SerializerXml.Deserialize(s), DETPRHMessageRecipient)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHMessageRecipient object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHMessageRecipient object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHMessageRecipient object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHMessageRecipient, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHMessageRecipient)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHMessageRecipient) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHMessageRecipient
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHTransitOperation
+
+#Region "Private fields"
+ Private _lRN As String
+
+ Private _mRN As String
+
+ Private _declarationType As String
+
+ Private _transitDeclarationType As String
+
+ Private _tIRCarnetNumber As String
+
+ Private _declarationAcceptanceDateAndTime As Date
+
+ Private _releaseDateAndTime As Date
+
+ Private _limitDate As Date
+
+ Private _security As String
+
+ Private _reducedDatasetIndicator As String
+
+ Private _specificCircumstanceIndicator As String
+
+ Private _bindingItinerary As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property LRN() As String
+ Get
+ Return Me._lRN
+ End Get
+ Set
+ Me._lRN = Value
+ End Set
+ End Property
+
+
+ Public Property MRN() As String
+ Get
+ Return Me._mRN
+ End Get
+ Set
+ Me._mRN = Value
+ End Set
+ End Property
+
+
+ Public Property declarationType() As String
+ Get
+ Return Me._declarationType
+ End Get
+ Set
+ Me._declarationType = Value
+ End Set
+ End Property
+
+
+ Public Property transitDeclarationType() As String
+ Get
+ Return Me._transitDeclarationType
+ End Get
+ Set
+ Me._transitDeclarationType = Value
+ End Set
+ End Property
+
+
+ Public Property TIRCarnetNumber() As String
+ Get
+ Return Me._tIRCarnetNumber
+ End Get
+ Set
+ Me._tIRCarnetNumber = Value
+ End Set
+ End Property
+
+ Public Property declarationAcceptanceDateAndTime() As Date
+ Get
+ Return Me._declarationAcceptanceDateAndTime
+ End Get
+ Set
+ Me._declarationAcceptanceDateAndTime = 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 limitDate() As Date
+ Get
+ Return Me._limitDate
+ End Get
+ Set
+ Me._limitDate = Value
+ End Set
+ End Property
+
+
+ Public Property security() As String
+ Get
+ Return Me._security
+ End Get
+ Set
+ Me._security = Value
+ End Set
+ End Property
+
+
+ Public Property reducedDatasetIndicator() As String
+ Get
+ Return Me._reducedDatasetIndicator
+ End Get
+ Set
+ Me._reducedDatasetIndicator = Value
+ End Set
+ End Property
+
+
+ Public Property specificCircumstanceIndicator() As String
+ Get
+ Return Me._specificCircumstanceIndicator
+ End Get
+ Set
+ Me._specificCircumstanceIndicator = Value
+ End Set
+ End Property
+
+
+ Public Property bindingItinerary() As String
+ Get
+ Return Me._bindingItinerary
+ End Get
+ Set
+ Me._bindingItinerary = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHTransitOperation))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHTransitOperation object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHTransitOperation object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHTransitOperation object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHTransitOperation, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHTransitOperation)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHTransitOperation) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHTransitOperation
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHTransitOperation)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHTransitOperation
+ Return CType(SerializerXml.Deserialize(s), DETPRHTransitOperation)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHTransitOperation object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHTransitOperation object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHTransitOperation object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHTransitOperation, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHTransitOperation)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHTransitOperation) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHTransitOperation
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHAuthorisation
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _type As String
+
+ Private _referenceNumber As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property type() As String
+ Get
+ Return Me._type
+ End Get
+ Set
+ Me._type = Value
+ End Set
+ End Property
+
+
+ Public Property referenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHAuthorisation))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHAuthorisation object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHAuthorisation object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHAuthorisation object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHAuthorisation, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHAuthorisation)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHAuthorisation) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHAuthorisation
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHAuthorisation)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHAuthorisation
+ Return CType(SerializerXml.Deserialize(s), DETPRHAuthorisation)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHAuthorisation object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHAuthorisation object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHAuthorisation object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHAuthorisation, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHAuthorisation)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHAuthorisation) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHAuthorisation
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHCustomsOfficeOfDeparture
+
+#Region "Private fields"
+ Private _referenceNumber As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property referenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHCustomsOfficeOfDeparture))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHCustomsOfficeOfDeparture object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHCustomsOfficeOfDeparture object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHCustomsOfficeOfDeparture object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHCustomsOfficeOfDeparture, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHCustomsOfficeOfDeparture)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHCustomsOfficeOfDeparture) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHCustomsOfficeOfDeparture
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHCustomsOfficeOfDeparture)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHCustomsOfficeOfDeparture
+ Return CType(SerializerXml.Deserialize(s), DETPRHCustomsOfficeOfDeparture)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHCustomsOfficeOfDeparture object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHCustomsOfficeOfDeparture object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHCustomsOfficeOfDeparture object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHCustomsOfficeOfDeparture, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHCustomsOfficeOfDeparture)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHCustomsOfficeOfDeparture) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHCustomsOfficeOfDeparture
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHCustomsOfficeOfDestinationDeclared
+
+#Region "Private fields"
+ Private _referenceNumber As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property referenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHCustomsOfficeOfDestinationDeclared))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHCustomsOfficeOfDestinationDeclared object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHCustomsOfficeOfDestinationDeclared object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHCustomsOfficeOfDestinationDeclared object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHCustomsOfficeOfDestinationDeclared, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHCustomsOfficeOfDestinationDeclared)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHCustomsOfficeOfDestinationDeclared) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHCustomsOfficeOfDestinationDeclared
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHCustomsOfficeOfDestinationDeclared)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHCustomsOfficeOfDestinationDeclared
+ Return CType(SerializerXml.Deserialize(s), DETPRHCustomsOfficeOfDestinationDeclared)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHCustomsOfficeOfDestinationDeclared object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHCustomsOfficeOfDestinationDeclared object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHCustomsOfficeOfDestinationDeclared object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHCustomsOfficeOfDestinationDeclared, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHCustomsOfficeOfDestinationDeclared)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHCustomsOfficeOfDestinationDeclared) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHCustomsOfficeOfDestinationDeclared
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHCustomsOfficeOfTransitDeclared
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _referenceNumber As String
+
+ Private _arrivalDateAndTimeEstimated As Date
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property referenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+ Public Property arrivalDateAndTimeEstimated() As Date
+ Get
+ Return Me._arrivalDateAndTimeEstimated
+ End Get
+ Set
+ Me._arrivalDateAndTimeEstimated = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHCustomsOfficeOfTransitDeclared))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHCustomsOfficeOfTransitDeclared object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHCustomsOfficeOfTransitDeclared object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHCustomsOfficeOfTransitDeclared object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHCustomsOfficeOfTransitDeclared, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHCustomsOfficeOfTransitDeclared)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHCustomsOfficeOfTransitDeclared) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHCustomsOfficeOfTransitDeclared
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHCustomsOfficeOfTransitDeclared)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHCustomsOfficeOfTransitDeclared
+ Return CType(SerializerXml.Deserialize(s), DETPRHCustomsOfficeOfTransitDeclared)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHCustomsOfficeOfTransitDeclared object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHCustomsOfficeOfTransitDeclared object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHCustomsOfficeOfTransitDeclared object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHCustomsOfficeOfTransitDeclared, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHCustomsOfficeOfTransitDeclared)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHCustomsOfficeOfTransitDeclared) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHCustomsOfficeOfTransitDeclared
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHCustomsOfficeOfExitForTransitDeclared
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _referenceNumber As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property referenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHCustomsOfficeOfExitForTransitDeclared))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHCustomsOfficeOfExitForTransitDeclared object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHCustomsOfficeOfExitForTransitDeclared object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHCustomsOfficeOfExitForTransitDeclared object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHCustomsOfficeOfExitForTransitDeclared, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHCustomsOfficeOfExitForTransitDeclared)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHCustomsOfficeOfExitForTransitDeclared) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHCustomsOfficeOfExitForTransitDeclared
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHCustomsOfficeOfExitForTransitDeclared)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHCustomsOfficeOfExitForTransitDeclared
+ Return CType(SerializerXml.Deserialize(s), DETPRHCustomsOfficeOfExitForTransitDeclared)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHCustomsOfficeOfExitForTransitDeclared object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHCustomsOfficeOfExitForTransitDeclared object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHCustomsOfficeOfExitForTransitDeclared object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHCustomsOfficeOfExitForTransitDeclared, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHCustomsOfficeOfExitForTransitDeclared)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHCustomsOfficeOfExitForTransitDeclared) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHCustomsOfficeOfExitForTransitDeclared
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHHolderOfTheTransitProcedure
+
+#Region "Private fields"
+ Private _identificationNumber As String
+
+ Private _tIRHolderIdentificationNumber As String
+
+ Private _name As String
+
+ Private _address As DETPRHHolderOfTheTransitProcedureAddress
+
+ Private _contactPerson As DETPRHHolderOfTheTransitProcedureContactPerson
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._contactPerson = New DETPRHHolderOfTheTransitProcedureContactPerson()
+ Me._address = New DETPRHHolderOfTheTransitProcedureAddress()
+ End Sub
+
+
+ Public Property identificationNumber() As String
+ Get
+ Return Me._identificationNumber
+ End Get
+ Set
+ Me._identificationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property TIRHolderIdentificationNumber() As String
+ Get
+ Return Me._tIRHolderIdentificationNumber
+ End Get
+ Set
+ Me._tIRHolderIdentificationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property name() As String
+ Get
+ Return Me._name
+ End Get
+ Set
+ Me._name = Value
+ End Set
+ End Property
+
+ Public Property Address() As DETPRHHolderOfTheTransitProcedureAddress
+ Get
+ Return Me._address
+ End Get
+ Set
+ Me._address = Value
+ End Set
+ End Property
+
+ Public Property ContactPerson() As DETPRHHolderOfTheTransitProcedureContactPerson
+ 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(DETPRHHolderOfTheTransitProcedure))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHHolderOfTheTransitProcedure object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHHolderOfTheTransitProcedure object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHHolderOfTheTransitProcedure object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHHolderOfTheTransitProcedure, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHHolderOfTheTransitProcedure)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHHolderOfTheTransitProcedure) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHHolderOfTheTransitProcedure
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHHolderOfTheTransitProcedure)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHHolderOfTheTransitProcedure
+ Return CType(SerializerXml.Deserialize(s), DETPRHHolderOfTheTransitProcedure)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHHolderOfTheTransitProcedure object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHHolderOfTheTransitProcedure object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHHolderOfTheTransitProcedure object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHHolderOfTheTransitProcedure, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHHolderOfTheTransitProcedure)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHHolderOfTheTransitProcedure) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHHolderOfTheTransitProcedure
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHHolderOfTheTransitProcedureAddress
+
+#Region "Private fields"
+ Private _streetAndNumber As String
+
+ Private _postcode As String
+
+ Private _city As String
+
+ Private _country As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property streetAndNumber() As String
+ Get
+ Return Me._streetAndNumber
+ End Get
+ Set
+ Me._streetAndNumber = Value
+ End Set
+ End Property
+
+
+ Public Property postcode() As String
+ Get
+ Return Me._postcode
+ End Get
+ Set
+ Me._postcode = Value
+ End Set
+ End Property
+
+
+ Public Property city() As String
+ Get
+ Return Me._city
+ End Get
+ Set
+ Me._city = Value
+ End Set
+ End Property
+
+
+ Public Property country() As String
+ Get
+ Return Me._country
+ End Get
+ Set
+ Me._country = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHHolderOfTheTransitProcedureAddress))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHHolderOfTheTransitProcedureAddress object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHHolderOfTheTransitProcedureAddress object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHHolderOfTheTransitProcedureAddress object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHHolderOfTheTransitProcedureAddress, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHHolderOfTheTransitProcedureAddress)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHHolderOfTheTransitProcedureAddress) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHHolderOfTheTransitProcedureAddress
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHHolderOfTheTransitProcedureAddress)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHHolderOfTheTransitProcedureAddress
+ Return CType(SerializerXml.Deserialize(s), DETPRHHolderOfTheTransitProcedureAddress)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHHolderOfTheTransitProcedureAddress object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHHolderOfTheTransitProcedureAddress object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHHolderOfTheTransitProcedureAddress object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHHolderOfTheTransitProcedureAddress, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHHolderOfTheTransitProcedureAddress)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHHolderOfTheTransitProcedureAddress) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHHolderOfTheTransitProcedureAddress
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHHolderOfTheTransitProcedureContactPerson
+
+#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(DETPRHHolderOfTheTransitProcedureContactPerson))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHHolderOfTheTransitProcedureContactPerson object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHHolderOfTheTransitProcedureContactPerson object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHHolderOfTheTransitProcedureContactPerson object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHHolderOfTheTransitProcedureContactPerson, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHHolderOfTheTransitProcedureContactPerson)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHHolderOfTheTransitProcedureContactPerson) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHHolderOfTheTransitProcedureContactPerson
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHHolderOfTheTransitProcedureContactPerson)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHHolderOfTheTransitProcedureContactPerson
+ Return CType(SerializerXml.Deserialize(s), DETPRHHolderOfTheTransitProcedureContactPerson)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHHolderOfTheTransitProcedureContactPerson object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHHolderOfTheTransitProcedureContactPerson object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHHolderOfTheTransitProcedureContactPerson object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHHolderOfTheTransitProcedureContactPerson, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHHolderOfTheTransitProcedureContactPerson)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHHolderOfTheTransitProcedureContactPerson) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHHolderOfTheTransitProcedureContactPerson
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHRepresentative
+
+#Region "Private fields"
+ Private _identificationNumber As String
+
+ Private _name As String
+
+ Private _address As DETPRHRepresentativeAddress
+
+ Private _contactPerson As DETPRHRepresentativeContactPerson
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._contactPerson = New DETPRHRepresentativeContactPerson()
+ Me._address = New DETPRHRepresentativeAddress()
+ End Sub
+
+
+ Public Property identificationNumber() As String
+ Get
+ Return Me._identificationNumber
+ End Get
+ Set
+ Me._identificationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property name() As String
+ Get
+ Return Me._name
+ End Get
+ Set
+ Me._name = Value
+ End Set
+ End Property
+
+ Public Property Address() As DETPRHRepresentativeAddress
+ Get
+ Return Me._address
+ End Get
+ Set
+ Me._address = Value
+ End Set
+ End Property
+
+ Public Property ContactPerson() As DETPRHRepresentativeContactPerson
+ 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(DETPRHRepresentative))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHRepresentative object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHRepresentative object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHRepresentative object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHRepresentative, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHRepresentative)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHRepresentative) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHRepresentative
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHRepresentative)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHRepresentative
+ Return CType(SerializerXml.Deserialize(s), DETPRHRepresentative)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHRepresentative object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHRepresentative object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHRepresentative object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHRepresentative, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHRepresentative)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHRepresentative) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHRepresentative
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHRepresentativeAddress
+
+#Region "Private fields"
+ Private _streetAndNumber As String
+
+ Private _postcode As String
+
+ Private _city As String
+
+ Private _country As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property streetAndNumber() As String
+ Get
+ Return Me._streetAndNumber
+ End Get
+ Set
+ Me._streetAndNumber = Value
+ End Set
+ End Property
+
+
+ Public Property postcode() As String
+ Get
+ Return Me._postcode
+ End Get
+ Set
+ Me._postcode = Value
+ End Set
+ End Property
+
+
+ Public Property city() As String
+ Get
+ Return Me._city
+ End Get
+ Set
+ Me._city = Value
+ End Set
+ End Property
+
+
+ Public Property country() As String
+ Get
+ Return Me._country
+ End Get
+ Set
+ Me._country = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHRepresentativeAddress))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHRepresentativeAddress object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHRepresentativeAddress object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHRepresentativeAddress object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHRepresentativeAddress, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHRepresentativeAddress)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHRepresentativeAddress) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHRepresentativeAddress
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHRepresentativeAddress)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHRepresentativeAddress
+ Return CType(SerializerXml.Deserialize(s), DETPRHRepresentativeAddress)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHRepresentativeAddress object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHRepresentativeAddress object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHRepresentativeAddress object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHRepresentativeAddress, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHRepresentativeAddress)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHRepresentativeAddress) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHRepresentativeAddress
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHRepresentativeContactPerson
+
+#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(DETPRHRepresentativeContactPerson))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHRepresentativeContactPerson object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHRepresentativeContactPerson object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHRepresentativeContactPerson object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHRepresentativeContactPerson, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHRepresentativeContactPerson)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHRepresentativeContactPerson) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHRepresentativeContactPerson
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHRepresentativeContactPerson)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHRepresentativeContactPerson
+ Return CType(SerializerXml.Deserialize(s), DETPRHRepresentativeContactPerson)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHRepresentativeContactPerson object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHRepresentativeContactPerson object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHRepresentativeContactPerson object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHRepresentativeContactPerson, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHRepresentativeContactPerson)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHRepresentativeContactPerson) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHRepresentativeContactPerson
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHGuarantee
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _guaranteeType As String
+
+ Private _otherGuaranteeReference As String
+
+ Private _guaranteeReference As List(Of DETPRHGuaranteeGuaranteeReference)
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._guaranteeReference = New List(Of DETPRHGuaranteeGuaranteeReference)()
+ End Sub
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property guaranteeType() As String
+ Get
+ Return Me._guaranteeType
+ End Get
+ Set
+ Me._guaranteeType = Value
+ End Set
+ End Property
+
+
+ Public Property otherGuaranteeReference() As String
+ Get
+ Return Me._otherGuaranteeReference
+ End Get
+ Set
+ Me._otherGuaranteeReference = Value
+ End Set
+ End Property
+
+
+ Public Property GuaranteeReference() As List(Of DETPRHGuaranteeGuaranteeReference)
+ Get
+ Return Me._guaranteeReference
+ End Get
+ Set
+ Me._guaranteeReference = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHGuarantee))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHGuarantee object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHGuarantee object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHGuarantee object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHGuarantee, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHGuarantee)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHGuarantee) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHGuarantee
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHGuarantee)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHGuarantee
+ Return CType(SerializerXml.Deserialize(s), DETPRHGuarantee)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHGuarantee object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHGuarantee object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHGuarantee object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHGuarantee, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHGuarantee)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHGuarantee) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHGuarantee
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHGuaranteeGuaranteeReference
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _gRN As String
+
+ Private _amountToBeCovered As Decimal
+
+ Private _currency As DETPRHGuaranteeGuaranteeReferenceCurrency
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property GRN() As String
+ Get
+ Return Me._gRN
+ End Get
+ Set
+ Me._gRN = Value
+ End Set
+ End Property
+
+ Public Property amountToBeCovered() As Decimal
+ Get
+ Return Me._amountToBeCovered
+ End Get
+ Set
+ Me._amountToBeCovered = Value
+ End Set
+ End Property
+
+ Public Property currency() As DETPRHGuaranteeGuaranteeReferenceCurrency
+ Get
+ Return Me._currency
+ End Get
+ Set
+ Me._currency = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHGuaranteeGuaranteeReference))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHGuaranteeGuaranteeReference object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHGuaranteeGuaranteeReference object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHGuaranteeGuaranteeReference object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHGuaranteeGuaranteeReference, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHGuaranteeGuaranteeReference)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHGuaranteeGuaranteeReference) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHGuaranteeGuaranteeReference
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHGuaranteeGuaranteeReference)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHGuaranteeGuaranteeReference
+ Return CType(SerializerXml.Deserialize(s), DETPRHGuaranteeGuaranteeReference)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHGuaranteeGuaranteeReference object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHGuaranteeGuaranteeReference object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHGuaranteeGuaranteeReference object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHGuaranteeGuaranteeReference, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHGuaranteeGuaranteeReference)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHGuaranteeGuaranteeReference) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHGuaranteeGuaranteeReference
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Public Enum DETPRHGuaranteeGuaranteeReferenceCurrency
+
+ EUR
+ End Enum
+
+
+ Partial Public Class DETPRHConsignment
+
+#Region "Private fields"
+ Private _countryOfDispatch As String
+
+ Private _countryOfDestination As String
+
+ Private _containerIndicator As String
+
+ Private _inlandModeOfTransport As String
+
+ Private _modeOfTransportAtTheBorder As String
+
+ Private _grossMass As Decimal
+
+ Private _referenceNumberUCR As String
+
+ Private _carrier As DETPRHConsignmentCarrier
+
+ Private _consignor As DETPRHConsignmentConsignor
+
+ Private _consignee As DETPRHConsignmentConsignee
+
+ Private _additionalSupplyChainActor As List(Of DETPRHConsignmentAdditionalSupplyChainActor)
+
+ Private _transportEquipment As List(Of DETPRHConsignmentTransportEquipment)
+
+ Private _locationOfGoods As DETPRHConsignmentLocationOfGoods
+
+ Private _departureTransportMeans As List(Of DETPRHConsignmentDepartureTransportMeans)
+
+ Private _countryOfRoutingOfConsignment As List(Of DETPRHConsignmentCountryOfRoutingOfConsignment)
+
+ Private _activeBorderTransportMeans As List(Of DETPRHConsignmentActiveBorderTransportMeans)
+
+ Private _placeOfLoading As DETPRHConsignmentPlaceOfLoading
+
+ Private _placeOfUnloading As DETPRHConsignmentPlaceOfUnloading
+
+ Private _previousDocument As List(Of DETPRHConsignmentPreviousDocument)
+
+ Private _supportingDocument As List(Of DETPRHConsignmentSupportingDocument)
+
+ Private _transportDocument As List(Of DETPRHConsignmentTransportDocument)
+
+ Private _additionalReference As List(Of DETPRHConsignmentAdditionalReference)
+
+ Private _additionalInformation As List(Of DETPRHConsignmentAdditionalInformation)
+
+ Private _transportCharges As DETPRHConsignmentTransportCharges
+
+ Private _houseConsignment As List(Of DETPRHConsignmentHouseConsignment)
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._houseConsignment = New List(Of DETPRHConsignmentHouseConsignment)()
+ Me._transportCharges = New DETPRHConsignmentTransportCharges()
+ Me._additionalInformation = New List(Of DETPRHConsignmentAdditionalInformation)()
+ Me._additionalReference = New List(Of DETPRHConsignmentAdditionalReference)()
+ Me._transportDocument = New List(Of DETPRHConsignmentTransportDocument)()
+ Me._supportingDocument = New List(Of DETPRHConsignmentSupportingDocument)()
+ Me._previousDocument = New List(Of DETPRHConsignmentPreviousDocument)()
+ Me._placeOfUnloading = New DETPRHConsignmentPlaceOfUnloading()
+ Me._placeOfLoading = New DETPRHConsignmentPlaceOfLoading()
+ Me._activeBorderTransportMeans = New List(Of DETPRHConsignmentActiveBorderTransportMeans)()
+ Me._countryOfRoutingOfConsignment = New List(Of DETPRHConsignmentCountryOfRoutingOfConsignment)()
+ Me._departureTransportMeans = New List(Of DETPRHConsignmentDepartureTransportMeans)()
+ Me._locationOfGoods = New DETPRHConsignmentLocationOfGoods()
+ Me._transportEquipment = New List(Of DETPRHConsignmentTransportEquipment)()
+ Me._additionalSupplyChainActor = New List(Of DETPRHConsignmentAdditionalSupplyChainActor)()
+ Me._consignee = New DETPRHConsignmentConsignee()
+ Me._consignor = New DETPRHConsignmentConsignor()
+ Me._carrier = New DETPRHConsignmentCarrier()
+ End Sub
+
+
+ Public Property countryOfDispatch() As String
+ Get
+ Return Me._countryOfDispatch
+ End Get
+ Set
+ Me._countryOfDispatch = Value
+ End Set
+ End Property
+
+
+ Public Property countryOfDestination() As String
+ Get
+ Return Me._countryOfDestination
+ End Get
+ Set
+ Me._countryOfDestination = Value
+ End Set
+ End Property
+
+
+ Public Property containerIndicator() As String
+ Get
+ Return Me._containerIndicator
+ End Get
+ Set
+ Me._containerIndicator = Value
+ End Set
+ End Property
+
+
+ Public Property inlandModeOfTransport() As String
+ Get
+ Return Me._inlandModeOfTransport
+ End Get
+ Set
+ Me._inlandModeOfTransport = Value
+ End Set
+ End Property
+
+
+ Public Property modeOfTransportAtTheBorder() As String
+ Get
+ Return Me._modeOfTransportAtTheBorder
+ End Get
+ Set
+ Me._modeOfTransportAtTheBorder = Value
+ End Set
+ End Property
+
+ Public Property grossMass() As Decimal
+ Get
+ Return Me._grossMass
+ End Get
+ Set
+ Me._grossMass = Value
+ End Set
+ End Property
+
+
+ Public Property referenceNumberUCR() As String
+ Get
+ Return Me._referenceNumberUCR
+ End Get
+ Set
+ Me._referenceNumberUCR = Value
+ End Set
+ End Property
+
+ Public Property Carrier() As DETPRHConsignmentCarrier
+ Get
+ Return Me._carrier
+ End Get
+ Set
+ Me._carrier = Value
+ End Set
+ End Property
+
+ Public Property Consignor() As DETPRHConsignmentConsignor
+ Get
+ Return Me._consignor
+ End Get
+ Set
+ Me._consignor = Value
+ End Set
+ End Property
+
+ Public Property Consignee() As DETPRHConsignmentConsignee
+ Get
+ Return Me._consignee
+ End Get
+ Set
+ Me._consignee = Value
+ End Set
+ End Property
+
+
+ Public Property AdditionalSupplyChainActor() As List(Of DETPRHConsignmentAdditionalSupplyChainActor)
+ Get
+ Return Me._additionalSupplyChainActor
+ End Get
+ Set
+ Me._additionalSupplyChainActor = Value
+ End Set
+ End Property
+
+
+ Public Property TransportEquipment() As List(Of DETPRHConsignmentTransportEquipment)
+ Get
+ Return Me._transportEquipment
+ End Get
+ Set
+ Me._transportEquipment = Value
+ End Set
+ End Property
+
+ Public Property LocationOfGoods() As DETPRHConsignmentLocationOfGoods
+ Get
+ Return Me._locationOfGoods
+ End Get
+ Set
+ Me._locationOfGoods = Value
+ End Set
+ End Property
+
+
+ Public Property DepartureTransportMeans() As List(Of DETPRHConsignmentDepartureTransportMeans)
+ Get
+ Return Me._departureTransportMeans
+ End Get
+ Set
+ Me._departureTransportMeans = Value
+ End Set
+ End Property
+
+
+ Public Property CountryOfRoutingOfConsignment() As List(Of DETPRHConsignmentCountryOfRoutingOfConsignment)
+ Get
+ Return Me._countryOfRoutingOfConsignment
+ End Get
+ Set
+ Me._countryOfRoutingOfConsignment = Value
+ End Set
+ End Property
+
+
+ Public Property ActiveBorderTransportMeans() As List(Of DETPRHConsignmentActiveBorderTransportMeans)
+ Get
+ Return Me._activeBorderTransportMeans
+ End Get
+ Set
+ Me._activeBorderTransportMeans = Value
+ End Set
+ End Property
+
+ Public Property PlaceOfLoading() As DETPRHConsignmentPlaceOfLoading
+ Get
+ Return Me._placeOfLoading
+ End Get
+ Set
+ Me._placeOfLoading = Value
+ End Set
+ End Property
+
+ Public Property PlaceOfUnloading() As DETPRHConsignmentPlaceOfUnloading
+ Get
+ Return Me._placeOfUnloading
+ End Get
+ Set
+ Me._placeOfUnloading = Value
+ End Set
+ End Property
+
+
+ Public Property PreviousDocument() As List(Of DETPRHConsignmentPreviousDocument)
+ Get
+ Return Me._previousDocument
+ End Get
+ Set
+ Me._previousDocument = Value
+ End Set
+ End Property
+
+
+ Public Property SupportingDocument() As List(Of DETPRHConsignmentSupportingDocument)
+ Get
+ Return Me._supportingDocument
+ End Get
+ Set
+ Me._supportingDocument = Value
+ End Set
+ End Property
+
+
+ Public Property TransportDocument() As List(Of DETPRHConsignmentTransportDocument)
+ Get
+ Return Me._transportDocument
+ End Get
+ Set
+ Me._transportDocument = Value
+ End Set
+ End Property
+
+
+ Public Property AdditionalReference() As List(Of DETPRHConsignmentAdditionalReference)
+ Get
+ Return Me._additionalReference
+ End Get
+ Set
+ Me._additionalReference = Value
+ End Set
+ End Property
+
+
+ Public Property AdditionalInformation() As List(Of DETPRHConsignmentAdditionalInformation)
+ Get
+ Return Me._additionalInformation
+ End Get
+ Set
+ Me._additionalInformation = Value
+ End Set
+ End Property
+
+ Public Property TransportCharges() As DETPRHConsignmentTransportCharges
+ Get
+ Return Me._transportCharges
+ End Get
+ Set
+ Me._transportCharges = Value
+ End Set
+ End Property
+
+
+ Public Property HouseConsignment() As List(Of DETPRHConsignmentHouseConsignment)
+ Get
+ Return Me._houseConsignment
+ End Get
+ Set
+ Me._houseConsignment = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignment))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignment object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignment object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignment object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignment, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignment)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignment) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignment
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignment)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignment
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignment)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignment object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignment object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignment object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignment, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignment)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignment) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignment
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentCarrier
+
+#Region "Private fields"
+ Private _identificationNumber As String
+
+ Private _subsidiaryNumber As String
+
+ Private _contactPerson As DETPRHConsignmentCarrierContactPerson
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._contactPerson = New DETPRHConsignmentCarrierContactPerson()
+ End Sub
+
+
+ Public Property identificationNumber() As String
+ Get
+ Return Me._identificationNumber
+ End Get
+ Set
+ Me._identificationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property subsidiaryNumber() As String
+ Get
+ Return Me._subsidiaryNumber
+ End Get
+ Set
+ Me._subsidiaryNumber = Value
+ End Set
+ End Property
+
+ Public Property ContactPerson() As DETPRHConsignmentCarrierContactPerson
+ 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(DETPRHConsignmentCarrier))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentCarrier object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentCarrier object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentCarrier object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentCarrier, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentCarrier)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentCarrier) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentCarrier
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentCarrier)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentCarrier
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentCarrier)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentCarrier object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentCarrier object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentCarrier object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentCarrier, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentCarrier)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentCarrier) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentCarrier
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentCarrierContactPerson
+
+#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(DETPRHConsignmentCarrierContactPerson))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentCarrierContactPerson object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentCarrierContactPerson object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentCarrierContactPerson object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentCarrierContactPerson, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentCarrierContactPerson)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentCarrierContactPerson) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentCarrierContactPerson
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentCarrierContactPerson)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentCarrierContactPerson
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentCarrierContactPerson)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentCarrierContactPerson object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentCarrierContactPerson object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentCarrierContactPerson object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentCarrierContactPerson, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentCarrierContactPerson)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentCarrierContactPerson) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentCarrierContactPerson
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentConsignor
+
+#Region "Private fields"
+ Private _identificationNumber As String
+
+ Private _subsidiaryNumber As String
+
+ Private _name As String
+
+ Private _address As DETPRHConsignmentConsignorAddress
+
+ Private _contactPerson As DETPRHConsignmentConsignorContactPerson
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._contactPerson = New DETPRHConsignmentConsignorContactPerson()
+ Me._address = New DETPRHConsignmentConsignorAddress()
+ End Sub
+
+
+ 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 Address() As DETPRHConsignmentConsignorAddress
+ Get
+ Return Me._address
+ End Get
+ Set
+ Me._address = Value
+ End Set
+ End Property
+
+ Public Property ContactPerson() As DETPRHConsignmentConsignorContactPerson
+ 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(DETPRHConsignmentConsignor))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentConsignor object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentConsignor object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentConsignor object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentConsignor, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentConsignor)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentConsignor) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentConsignor
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentConsignor)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentConsignor
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentConsignor)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentConsignor object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentConsignor object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentConsignor object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentConsignor, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentConsignor)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentConsignor) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentConsignor
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentConsignorAddress
+
+#Region "Private fields"
+ Private _streetAndNumber As String
+
+ Private _postcode As String
+
+ Private _city As String
+
+ Private _country As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property streetAndNumber() As String
+ Get
+ Return Me._streetAndNumber
+ End Get
+ Set
+ Me._streetAndNumber = Value
+ End Set
+ End Property
+
+
+ Public Property postcode() As String
+ Get
+ Return Me._postcode
+ End Get
+ Set
+ Me._postcode = Value
+ End Set
+ End Property
+
+
+ Public Property city() As String
+ Get
+ Return Me._city
+ End Get
+ Set
+ Me._city = Value
+ End Set
+ End Property
+
+
+ Public Property country() As String
+ Get
+ Return Me._country
+ End Get
+ Set
+ Me._country = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentConsignorAddress))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentConsignorAddress object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentConsignorAddress object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentConsignorAddress object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentConsignorAddress, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentConsignorAddress)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentConsignorAddress) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentConsignorAddress
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentConsignorAddress)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentConsignorAddress
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentConsignorAddress)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentConsignorAddress object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentConsignorAddress object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentConsignorAddress object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentConsignorAddress, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentConsignorAddress)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentConsignorAddress) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentConsignorAddress
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentConsignorContactPerson
+
+#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(DETPRHConsignmentConsignorContactPerson))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentConsignorContactPerson object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentConsignorContactPerson object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentConsignorContactPerson object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentConsignorContactPerson, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentConsignorContactPerson)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentConsignorContactPerson) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentConsignorContactPerson
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentConsignorContactPerson)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentConsignorContactPerson
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentConsignorContactPerson)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentConsignorContactPerson object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentConsignorContactPerson object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentConsignorContactPerson object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentConsignorContactPerson, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentConsignorContactPerson)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentConsignorContactPerson) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentConsignorContactPerson
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentConsignee
+
+#Region "Private fields"
+ Private _identificationNumber As String
+
+ Private _subsidiaryNumber As String
+
+ Private _name As String
+
+ Private _address As DETPRHConsignmentConsigneeAddress
+
+ Private _contactPerson As DETPRHConsignmentConsigneeContactPerson
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._contactPerson = New DETPRHConsignmentConsigneeContactPerson()
+ Me._address = New DETPRHConsignmentConsigneeAddress()
+ End Sub
+
+
+ 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 Address() As DETPRHConsignmentConsigneeAddress
+ Get
+ Return Me._address
+ End Get
+ Set
+ Me._address = Value
+ End Set
+ End Property
+
+ Public Property ContactPerson() As DETPRHConsignmentConsigneeContactPerson
+ 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(DETPRHConsignmentConsignee))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentConsignee object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentConsignee object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentConsignee object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentConsignee, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentConsignee)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentConsignee) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentConsignee
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentConsignee)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentConsignee
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentConsignee)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentConsignee object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentConsignee object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentConsignee object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentConsignee, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentConsignee)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentConsignee) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentConsignee
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentConsigneeAddress
+
+#Region "Private fields"
+ Private _streetAndNumber As String
+
+ Private _postcode As String
+
+ Private _city As String
+
+ Private _country As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property streetAndNumber() As String
+ Get
+ Return Me._streetAndNumber
+ End Get
+ Set
+ Me._streetAndNumber = Value
+ End Set
+ End Property
+
+
+ Public Property postcode() As String
+ Get
+ Return Me._postcode
+ End Get
+ Set
+ Me._postcode = Value
+ End Set
+ End Property
+
+
+ Public Property city() As String
+ Get
+ Return Me._city
+ End Get
+ Set
+ Me._city = Value
+ End Set
+ End Property
+
+
+ Public Property country() As String
+ Get
+ Return Me._country
+ End Get
+ Set
+ Me._country = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentConsigneeAddress))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentConsigneeAddress object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentConsigneeAddress object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentConsigneeAddress object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentConsigneeAddress, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentConsigneeAddress)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentConsigneeAddress) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentConsigneeAddress
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentConsigneeAddress)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentConsigneeAddress
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentConsigneeAddress)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentConsigneeAddress object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentConsigneeAddress object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentConsigneeAddress object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentConsigneeAddress, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentConsigneeAddress)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentConsigneeAddress) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentConsigneeAddress
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentConsigneeContactPerson
+
+#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(DETPRHConsignmentConsigneeContactPerson))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentConsigneeContactPerson object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentConsigneeContactPerson object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentConsigneeContactPerson object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentConsigneeContactPerson, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentConsigneeContactPerson)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentConsigneeContactPerson) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentConsigneeContactPerson
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentConsigneeContactPerson)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentConsigneeContactPerson
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentConsigneeContactPerson)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentConsigneeContactPerson object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentConsigneeContactPerson object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentConsigneeContactPerson object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentConsigneeContactPerson, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentConsigneeContactPerson)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentConsigneeContactPerson) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentConsigneeContactPerson
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentAdditionalSupplyChainActor
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _role As String
+
+ Private _identificationNumber As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property role() As String
+ Get
+ Return Me._role
+ End Get
+ Set
+ Me._role = Value
+ End Set
+ End Property
+
+
+ Public Property identificationNumber() As String
+ Get
+ Return Me._identificationNumber
+ End Get
+ Set
+ Me._identificationNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentAdditionalSupplyChainActor))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentAdditionalSupplyChainActor object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentAdditionalSupplyChainActor object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentAdditionalSupplyChainActor object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentAdditionalSupplyChainActor, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentAdditionalSupplyChainActor)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentAdditionalSupplyChainActor) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentAdditionalSupplyChainActor
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentAdditionalSupplyChainActor)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentAdditionalSupplyChainActor
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentAdditionalSupplyChainActor)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentAdditionalSupplyChainActor object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentAdditionalSupplyChainActor object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentAdditionalSupplyChainActor object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentAdditionalSupplyChainActor, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentAdditionalSupplyChainActor)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentAdditionalSupplyChainActor) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentAdditionalSupplyChainActor
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentTransportEquipment
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _containerIdentificationNumber As String
+
+ Private _numberOfSeals As String
+
+ Private _seal As List(Of DETPRHConsignmentTransportEquipmentSeal)
+
+ Private _goodsReference As List(Of DETPRHConsignmentTransportEquipmentGoodsReference)
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._goodsReference = New List(Of DETPRHConsignmentTransportEquipmentGoodsReference)()
+ Me._seal = New List(Of DETPRHConsignmentTransportEquipmentSeal)()
+ End Sub
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property containerIdentificationNumber() As String
+ Get
+ Return Me._containerIdentificationNumber
+ End Get
+ Set
+ Me._containerIdentificationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property numberOfSeals() As String
+ Get
+ Return Me._numberOfSeals
+ End Get
+ Set
+ Me._numberOfSeals = Value
+ End Set
+ End Property
+
+
+ Public Property Seal() As List(Of DETPRHConsignmentTransportEquipmentSeal)
+ Get
+ Return Me._seal
+ End Get
+ Set
+ Me._seal = Value
+ End Set
+ End Property
+
+
+ Public Property GoodsReference() As List(Of DETPRHConsignmentTransportEquipmentGoodsReference)
+ 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(DETPRHConsignmentTransportEquipment))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentTransportEquipment object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentTransportEquipment object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentTransportEquipment object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentTransportEquipment, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentTransportEquipment)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentTransportEquipment) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentTransportEquipment
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentTransportEquipment)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentTransportEquipment
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentTransportEquipment)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentTransportEquipment object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentTransportEquipment object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentTransportEquipment object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentTransportEquipment, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentTransportEquipment)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentTransportEquipment) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentTransportEquipment
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentTransportEquipmentSeal
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _identifier As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property identifier() As String
+ Get
+ Return Me._identifier
+ End Get
+ Set
+ Me._identifier = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentTransportEquipmentSeal))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentTransportEquipmentSeal object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentTransportEquipmentSeal object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentTransportEquipmentSeal object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentTransportEquipmentSeal, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentTransportEquipmentSeal)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentTransportEquipmentSeal) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentTransportEquipmentSeal
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentTransportEquipmentSeal)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentTransportEquipmentSeal
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentTransportEquipmentSeal)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentTransportEquipmentSeal object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentTransportEquipmentSeal object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentTransportEquipmentSeal object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentTransportEquipmentSeal, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentTransportEquipmentSeal)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentTransportEquipmentSeal) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentTransportEquipmentSeal
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentTransportEquipmentGoodsReference
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _declarationGoodsItemNumber As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property declarationGoodsItemNumber() As String
+ Get
+ Return Me._declarationGoodsItemNumber
+ End Get
+ Set
+ Me._declarationGoodsItemNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentTransportEquipmentGoodsReference))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentTransportEquipmentGoodsReference object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentTransportEquipmentGoodsReference object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentTransportEquipmentGoodsReference object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentTransportEquipmentGoodsReference, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentTransportEquipmentGoodsReference)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentTransportEquipmentGoodsReference) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentTransportEquipmentGoodsReference
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentTransportEquipmentGoodsReference)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentTransportEquipmentGoodsReference
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentTransportEquipmentGoodsReference)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentTransportEquipmentGoodsReference object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentTransportEquipmentGoodsReference object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentTransportEquipmentGoodsReference object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentTransportEquipmentGoodsReference, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentTransportEquipmentGoodsReference)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentTransportEquipmentGoodsReference) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentTransportEquipmentGoodsReference
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentLocationOfGoods
+
+#Region "Private fields"
+ Private _typeOfLocation As String
+
+ Private _qualifierOfIdentification As String
+
+ Private _additionalIdentifier As String
+
+ Private _contactPerson As DETPRHConsignmentLocationOfGoodsContactPerson
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._contactPerson = New DETPRHConsignmentLocationOfGoodsContactPerson()
+ End Sub
+
+
+ Public Property typeOfLocation() As String
+ Get
+ Return Me._typeOfLocation
+ End Get
+ Set
+ Me._typeOfLocation = Value
+ End Set
+ End Property
+
+
+ Public Property qualifierOfIdentification() As String
+ Get
+ Return Me._qualifierOfIdentification
+ End Get
+ Set
+ Me._qualifierOfIdentification = Value
+ End Set
+ End Property
+
+
+ Public Property additionalIdentifier() As String
+ Get
+ Return Me._additionalIdentifier
+ End Get
+ Set
+ Me._additionalIdentifier = Value
+ End Set
+ End Property
+
+ Public Property ContactPerson() As DETPRHConsignmentLocationOfGoodsContactPerson
+ 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(DETPRHConsignmentLocationOfGoods))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentLocationOfGoods object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentLocationOfGoods object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentLocationOfGoods object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentLocationOfGoods, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentLocationOfGoods)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentLocationOfGoods) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentLocationOfGoods
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentLocationOfGoods)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentLocationOfGoods
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentLocationOfGoods)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentLocationOfGoods object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentLocationOfGoods object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentLocationOfGoods object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentLocationOfGoods, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentLocationOfGoods)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentLocationOfGoods) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentLocationOfGoods
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentLocationOfGoodsContactPerson
+
+#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(DETPRHConsignmentLocationOfGoodsContactPerson))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentLocationOfGoodsContactPerson object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentLocationOfGoodsContactPerson object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentLocationOfGoodsContactPerson object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentLocationOfGoodsContactPerson, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentLocationOfGoodsContactPerson)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentLocationOfGoodsContactPerson) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentLocationOfGoodsContactPerson
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentLocationOfGoodsContactPerson)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentLocationOfGoodsContactPerson
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentLocationOfGoodsContactPerson)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentLocationOfGoodsContactPerson object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentLocationOfGoodsContactPerson object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentLocationOfGoodsContactPerson object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentLocationOfGoodsContactPerson, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentLocationOfGoodsContactPerson)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentLocationOfGoodsContactPerson) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentLocationOfGoodsContactPerson
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentDepartureTransportMeans
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _typeOfIdentification As String
+
+ Private _identificationNumber As String
+
+ Private _nationality As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property typeOfIdentification() As String
+ Get
+ Return Me._typeOfIdentification
+ End Get
+ Set
+ Me._typeOfIdentification = Value
+ End Set
+ End Property
+
+
+ Public Property identificationNumber() As String
+ Get
+ Return Me._identificationNumber
+ End Get
+ Set
+ Me._identificationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property nationality() As String
+ Get
+ Return Me._nationality
+ End Get
+ Set
+ Me._nationality = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentDepartureTransportMeans))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentDepartureTransportMeans object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentDepartureTransportMeans object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentDepartureTransportMeans object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentDepartureTransportMeans, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentDepartureTransportMeans)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentDepartureTransportMeans) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentDepartureTransportMeans
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentDepartureTransportMeans)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentDepartureTransportMeans
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentDepartureTransportMeans)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentDepartureTransportMeans object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentDepartureTransportMeans object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentDepartureTransportMeans object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentDepartureTransportMeans, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentDepartureTransportMeans)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentDepartureTransportMeans) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentDepartureTransportMeans
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentCountryOfRoutingOfConsignment
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _country As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property country() As String
+ Get
+ Return Me._country
+ End Get
+ Set
+ Me._country = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentCountryOfRoutingOfConsignment))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentCountryOfRoutingOfConsignment object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentCountryOfRoutingOfConsignment object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentCountryOfRoutingOfConsignment object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentCountryOfRoutingOfConsignment, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentCountryOfRoutingOfConsignment)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentCountryOfRoutingOfConsignment) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentCountryOfRoutingOfConsignment
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentCountryOfRoutingOfConsignment)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentCountryOfRoutingOfConsignment
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentCountryOfRoutingOfConsignment)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentCountryOfRoutingOfConsignment object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentCountryOfRoutingOfConsignment object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentCountryOfRoutingOfConsignment object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentCountryOfRoutingOfConsignment, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentCountryOfRoutingOfConsignment)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentCountryOfRoutingOfConsignment) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentCountryOfRoutingOfConsignment
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentActiveBorderTransportMeans
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _typeOfIdentification As String
+
+ Private _identificationNumber As String
+
+ Private _nationality As String
+
+ Private _conveyanceReferenceNumber As String
+
+ Private _customsOfficeAtBorderDeclared As DETPRHConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._customsOfficeAtBorderDeclared = New DETPRHConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared()
+ End Sub
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property typeOfIdentification() As String
+ Get
+ Return Me._typeOfIdentification
+ End Get
+ Set
+ Me._typeOfIdentification = Value
+ End Set
+ End Property
+
+
+ Public Property identificationNumber() As String
+ Get
+ Return Me._identificationNumber
+ End Get
+ Set
+ Me._identificationNumber = Value
+ End Set
+ End Property
+
+
+ Public Property nationality() As String
+ Get
+ Return Me._nationality
+ End Get
+ Set
+ Me._nationality = Value
+ End Set
+ End Property
+
+
+ Public Property conveyanceReferenceNumber() As String
+ Get
+ Return Me._conveyanceReferenceNumber
+ End Get
+ Set
+ Me._conveyanceReferenceNumber = Value
+ End Set
+ End Property
+
+ Public Property CustomsOfficeAtBorderDeclared() As DETPRHConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared
+ Get
+ Return Me._customsOfficeAtBorderDeclared
+ End Get
+ Set
+ Me._customsOfficeAtBorderDeclared = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentActiveBorderTransportMeans))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentActiveBorderTransportMeans object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentActiveBorderTransportMeans object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentActiveBorderTransportMeans object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentActiveBorderTransportMeans, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentActiveBorderTransportMeans)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentActiveBorderTransportMeans) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentActiveBorderTransportMeans
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentActiveBorderTransportMeans)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentActiveBorderTransportMeans
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentActiveBorderTransportMeans)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentActiveBorderTransportMeans object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentActiveBorderTransportMeans object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentActiveBorderTransportMeans object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentActiveBorderTransportMeans, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentActiveBorderTransportMeans)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentActiveBorderTransportMeans) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentActiveBorderTransportMeans
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared
+
+#Region "Private fields"
+ Private _referenceNumber As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property referenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentPlaceOfLoading
+
+#Region "Private fields"
+ Private _country As String
+
+ Private _location As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property country() As String
+ Get
+ Return Me._country
+ End Get
+ Set
+ Me._country = Value
+ End Set
+ End Property
+
+
+ Public Property location() As String
+ Get
+ Return Me._location
+ End Get
+ Set
+ Me._location = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentPlaceOfLoading))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentPlaceOfLoading object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentPlaceOfLoading object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentPlaceOfLoading object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentPlaceOfLoading, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentPlaceOfLoading)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentPlaceOfLoading) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentPlaceOfLoading
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentPlaceOfLoading)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentPlaceOfLoading
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentPlaceOfLoading)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentPlaceOfLoading object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentPlaceOfLoading object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentPlaceOfLoading object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentPlaceOfLoading, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentPlaceOfLoading)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentPlaceOfLoading) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentPlaceOfLoading
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentPlaceOfUnloading
+
+#Region "Private fields"
+ Private _country As String
+
+ Private _location As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property country() As String
+ Get
+ Return Me._country
+ End Get
+ Set
+ Me._country = Value
+ End Set
+ End Property
+
+
+ Public Property location() As String
+ Get
+ Return Me._location
+ End Get
+ Set
+ Me._location = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentPlaceOfUnloading))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentPlaceOfUnloading object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentPlaceOfUnloading object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentPlaceOfUnloading object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentPlaceOfUnloading, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentPlaceOfUnloading)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentPlaceOfUnloading) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentPlaceOfUnloading
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentPlaceOfUnloading)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentPlaceOfUnloading
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentPlaceOfUnloading)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentPlaceOfUnloading object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentPlaceOfUnloading object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentPlaceOfUnloading object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentPlaceOfUnloading, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentPlaceOfUnloading)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentPlaceOfUnloading) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentPlaceOfUnloading
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentPreviousDocument
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _type As String
+
+ Private _referenceNumber As String
+
+ Private _complementOfInformation As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property type() As String
+ Get
+ Return Me._type
+ End Get
+ Set
+ Me._type = Value
+ End Set
+ End Property
+
+
+ Public Property referenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property complementOfInformation() As String
+ Get
+ Return Me._complementOfInformation
+ End Get
+ Set
+ Me._complementOfInformation = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentPreviousDocument))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentPreviousDocument object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentPreviousDocument object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentPreviousDocument object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentPreviousDocument, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentPreviousDocument)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentPreviousDocument) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentPreviousDocument
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentPreviousDocument)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentPreviousDocument
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentPreviousDocument)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentPreviousDocument object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentPreviousDocument object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentPreviousDocument object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentPreviousDocument, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentPreviousDocument)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentPreviousDocument) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentPreviousDocument
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentSupportingDocument
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _type As String
+
+ Private _referenceNumber As String
+
+ Private _documentLineItemNumber As String
+
+ Private _complementOfInformation As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property type() As String
+ Get
+ Return Me._type
+ End Get
+ Set
+ Me._type = Value
+ End Set
+ End Property
+
+
+ Public Property referenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property documentLineItemNumber() As String
+ Get
+ Return Me._documentLineItemNumber
+ End Get
+ Set
+ Me._documentLineItemNumber = Value
+ End Set
+ End Property
+
+
+ Public Property complementOfInformation() As String
+ Get
+ Return Me._complementOfInformation
+ End Get
+ Set
+ Me._complementOfInformation = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentSupportingDocument))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentSupportingDocument object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentSupportingDocument object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentSupportingDocument object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentSupportingDocument, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentSupportingDocument)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentSupportingDocument) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentSupportingDocument
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentSupportingDocument)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentSupportingDocument
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentSupportingDocument)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentSupportingDocument object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentSupportingDocument object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentSupportingDocument object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentSupportingDocument, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentSupportingDocument)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentSupportingDocument) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentSupportingDocument
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentTransportDocument
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _type As String
+
+ Private _referenceNumber As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property type() As String
+ Get
+ Return Me._type
+ End Get
+ Set
+ Me._type = Value
+ End Set
+ End Property
+
+
+ Public Property referenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentTransportDocument))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentTransportDocument object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentTransportDocument object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentTransportDocument object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentTransportDocument, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentTransportDocument)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentTransportDocument) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentTransportDocument
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentTransportDocument)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentTransportDocument
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentTransportDocument)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentTransportDocument object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentTransportDocument object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentTransportDocument object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentTransportDocument, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentTransportDocument)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentTransportDocument) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentTransportDocument
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentAdditionalReference
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _type As String
+
+ Private _referenceNumber As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property type() As String
+ Get
+ Return Me._type
+ End Get
+ Set
+ Me._type = Value
+ End Set
+ End Property
+
+
+ Public Property referenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentAdditionalReference))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentAdditionalReference object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentAdditionalReference object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentAdditionalReference object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentAdditionalReference, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentAdditionalReference)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentAdditionalReference) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentAdditionalReference
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentAdditionalReference)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentAdditionalReference
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentAdditionalReference)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentAdditionalReference object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentAdditionalReference object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentAdditionalReference object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentAdditionalReference, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentAdditionalReference)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentAdditionalReference) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentAdditionalReference
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentAdditionalInformation
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _code As String
+
+ Private _text As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property code() As String
+ Get
+ Return Me._code
+ End Get
+ Set
+ Me._code = Value
+ End Set
+ End Property
+
+
+ Public Property text() As String
+ Get
+ Return Me._text
+ End Get
+ Set
+ Me._text = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentAdditionalInformation))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentAdditionalInformation object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentAdditionalInformation object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentAdditionalInformation object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentAdditionalInformation, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentAdditionalInformation)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentAdditionalInformation) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentAdditionalInformation
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentAdditionalInformation)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentAdditionalInformation
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentAdditionalInformation)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentAdditionalInformation object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentAdditionalInformation object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentAdditionalInformation object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentAdditionalInformation, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentAdditionalInformation)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentAdditionalInformation) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentAdditionalInformation
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentTransportCharges
+
+#Region "Private fields"
+ Private _methodOfPayment As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property methodOfPayment() As String
+ Get
+ Return Me._methodOfPayment
+ End Get
+ Set
+ Me._methodOfPayment = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentTransportCharges))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentTransportCharges object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentTransportCharges object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentTransportCharges object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentTransportCharges, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentTransportCharges)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentTransportCharges) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentTransportCharges
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentTransportCharges)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentTransportCharges
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentTransportCharges)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentTransportCharges object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentTransportCharges object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentTransportCharges object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentTransportCharges, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentTransportCharges)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentTransportCharges) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentTransportCharges
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentHouseConsignment
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _countryOfDispatch As String
+
+ Private _countryOfDestination As String
+
+ Private _grossMass As Decimal
+
+ Private _referenceNumberUCR As String
+
+ Private _consignor As DETPRHConsignmentHouseConsignmentConsignor
+
+ Private _consignee As DETPRHConsignmentHouseConsignmentConsignee
+
+ Private _additionalSupplyChainActor As List(Of DETPRHConsignmentHouseConsignmentAdditionalSupplyChainActor)
+
+ Private _previousDocument As List(Of DETPRHConsignmentHouseConsignmentPreviousDocument)
+
+ Private _supportingDocument As List(Of DETPRHConsignmentHouseConsignmentSupportingDocument)
+
+ Private _transportDocument As List(Of DETPRHConsignmentHouseConsignmentTransportDocument)
+
+ Private _additionalReference As List(Of DETPRHConsignmentHouseConsignmentAdditionalReference)
+
+ Private _additionalInformation As List(Of DETPRHConsignmentHouseConsignmentAdditionalInformation)
+
+ Private _transportCharges As DETPRHConsignmentHouseConsignmentTransportCharges
+
+ Private _consignmentItem As List(Of DETPRHConsignmentHouseConsignmentConsignmentItem)
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._consignmentItem = New List(Of DETPRHConsignmentHouseConsignmentConsignmentItem)()
+ Me._transportCharges = New DETPRHConsignmentHouseConsignmentTransportCharges()
+ Me._additionalInformation = New List(Of DETPRHConsignmentHouseConsignmentAdditionalInformation)()
+ Me._additionalReference = New List(Of DETPRHConsignmentHouseConsignmentAdditionalReference)()
+ Me._transportDocument = New List(Of DETPRHConsignmentHouseConsignmentTransportDocument)()
+ Me._supportingDocument = New List(Of DETPRHConsignmentHouseConsignmentSupportingDocument)()
+ Me._previousDocument = New List(Of DETPRHConsignmentHouseConsignmentPreviousDocument)()
+ Me._additionalSupplyChainActor = New List(Of DETPRHConsignmentHouseConsignmentAdditionalSupplyChainActor)()
+ Me._consignee = New DETPRHConsignmentHouseConsignmentConsignee()
+ Me._consignor = New DETPRHConsignmentHouseConsignmentConsignor()
+ End Sub
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property countryOfDispatch() As String
+ Get
+ Return Me._countryOfDispatch
+ End Get
+ Set
+ Me._countryOfDispatch = Value
+ End Set
+ End Property
+
+
+ Public Property countryOfDestination() As String
+ Get
+ Return Me._countryOfDestination
+ End Get
+ Set
+ Me._countryOfDestination = Value
+ End Set
+ End Property
+
+ Public Property grossMass() As Decimal
+ Get
+ Return Me._grossMass
+ End Get
+ Set
+ Me._grossMass = Value
+ End Set
+ End Property
+
+
+ Public Property referenceNumberUCR() As String
+ Get
+ Return Me._referenceNumberUCR
+ End Get
+ Set
+ Me._referenceNumberUCR = Value
+ End Set
+ End Property
+
+ Public Property Consignor() As DETPRHConsignmentHouseConsignmentConsignor
+ Get
+ Return Me._consignor
+ End Get
+ Set
+ Me._consignor = Value
+ End Set
+ End Property
+
+ Public Property Consignee() As DETPRHConsignmentHouseConsignmentConsignee
+ Get
+ Return Me._consignee
+ End Get
+ Set
+ Me._consignee = Value
+ End Set
+ End Property
+
+
+ Public Property AdditionalSupplyChainActor() As List(Of DETPRHConsignmentHouseConsignmentAdditionalSupplyChainActor)
+ Get
+ Return Me._additionalSupplyChainActor
+ End Get
+ Set
+ Me._additionalSupplyChainActor = Value
+ End Set
+ End Property
+
+
+ Public Property PreviousDocument() As List(Of DETPRHConsignmentHouseConsignmentPreviousDocument)
+ Get
+ Return Me._previousDocument
+ End Get
+ Set
+ Me._previousDocument = Value
+ End Set
+ End Property
+
+
+ Public Property SupportingDocument() As List(Of DETPRHConsignmentHouseConsignmentSupportingDocument)
+ Get
+ Return Me._supportingDocument
+ End Get
+ Set
+ Me._supportingDocument = Value
+ End Set
+ End Property
+
+
+ Public Property TransportDocument() As List(Of DETPRHConsignmentHouseConsignmentTransportDocument)
+ Get
+ Return Me._transportDocument
+ End Get
+ Set
+ Me._transportDocument = Value
+ End Set
+ End Property
+
+
+ Public Property AdditionalReference() As List(Of DETPRHConsignmentHouseConsignmentAdditionalReference)
+ Get
+ Return Me._additionalReference
+ End Get
+ Set
+ Me._additionalReference = Value
+ End Set
+ End Property
+
+
+ Public Property AdditionalInformation() As List(Of DETPRHConsignmentHouseConsignmentAdditionalInformation)
+ Get
+ Return Me._additionalInformation
+ End Get
+ Set
+ Me._additionalInformation = Value
+ End Set
+ End Property
+
+ Public Property TransportCharges() As DETPRHConsignmentHouseConsignmentTransportCharges
+ Get
+ Return Me._transportCharges
+ End Get
+ Set
+ Me._transportCharges = Value
+ End Set
+ End Property
+
+
+ Public Property ConsignmentItem() As List(Of DETPRHConsignmentHouseConsignmentConsignmentItem)
+ Get
+ Return Me._consignmentItem
+ End Get
+ Set
+ Me._consignmentItem = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignment))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentHouseConsignment object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentHouseConsignment object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentHouseConsignment object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignment, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentHouseConsignment)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignment) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignment
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignment)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignment
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignment)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentHouseConsignment object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignment object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentHouseConsignment object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignment, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentHouseConsignment)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignment) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignment
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentHouseConsignmentConsignor
+
+#Region "Private fields"
+ Private _identificationNumber As String
+
+ Private _subsidiaryNumber As String
+
+ Private _name As String
+
+ Private _address As DETPRHConsignmentHouseConsignmentConsignorAddress
+
+ Private _contactPerson As DETPRHConsignmentHouseConsignmentConsignorContactPerson
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._contactPerson = New DETPRHConsignmentHouseConsignmentConsignorContactPerson()
+ Me._address = New DETPRHConsignmentHouseConsignmentConsignorAddress()
+ End Sub
+
+
+ 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 Address() As DETPRHConsignmentHouseConsignmentConsignorAddress
+ Get
+ Return Me._address
+ End Get
+ Set
+ Me._address = Value
+ End Set
+ End Property
+
+ Public Property ContactPerson() As DETPRHConsignmentHouseConsignmentConsignorContactPerson
+ 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(DETPRHConsignmentHouseConsignmentConsignor))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentHouseConsignmentConsignor object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentHouseConsignmentConsignor object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentHouseConsignmentConsignor object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignor, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignor)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignor) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignor
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignor)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignor
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignor)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentHouseConsignmentConsignor object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignor object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentHouseConsignmentConsignor object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignor, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignor)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignor) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignor
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentHouseConsignmentConsignorAddress
+
+#Region "Private fields"
+ Private _streetAndNumber As String
+
+ Private _postcode As String
+
+ Private _city As String
+
+ Private _country As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property streetAndNumber() As String
+ Get
+ Return Me._streetAndNumber
+ End Get
+ Set
+ Me._streetAndNumber = Value
+ End Set
+ End Property
+
+
+ Public Property postcode() As String
+ Get
+ Return Me._postcode
+ End Get
+ Set
+ Me._postcode = Value
+ End Set
+ End Property
+
+
+ Public Property city() As String
+ Get
+ Return Me._city
+ End Get
+ Set
+ Me._city = Value
+ End Set
+ End Property
+
+
+ Public Property country() As String
+ Get
+ Return Me._country
+ End Get
+ Set
+ Me._country = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentConsignorAddress))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentHouseConsignmentConsignorAddress object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentHouseConsignmentConsignorAddress object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentHouseConsignmentConsignorAddress object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignorAddress, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignorAddress)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignorAddress) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignorAddress
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignorAddress)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignorAddress
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignorAddress)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentHouseConsignmentConsignorAddress object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignorAddress object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentHouseConsignmentConsignorAddress object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignorAddress, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignorAddress)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignorAddress) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignorAddress
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentHouseConsignmentConsignorContactPerson
+
+#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(DETPRHConsignmentHouseConsignmentConsignorContactPerson))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentHouseConsignmentConsignorContactPerson object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentHouseConsignmentConsignorContactPerson object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentHouseConsignmentConsignorContactPerson object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignorContactPerson, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignorContactPerson)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignorContactPerson) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignorContactPerson
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignorContactPerson)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignorContactPerson
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignorContactPerson)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentHouseConsignmentConsignorContactPerson object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignorContactPerson object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentHouseConsignmentConsignorContactPerson object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignorContactPerson, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignorContactPerson)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignorContactPerson) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignorContactPerson
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentHouseConsignmentConsignee
+
+#Region "Private fields"
+ Private _identificationNumber As String
+
+ Private _subsidiaryNumber As String
+
+ Private _name As String
+
+ Private _address As DETPRHConsignmentHouseConsignmentConsigneeAddress
+
+ Private _contactPerson As DETPRHConsignmentHouseConsignmentConsigneeContactPerson
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+ Public Sub New()
+ MyBase.New
+ Me._contactPerson = New DETPRHConsignmentHouseConsignmentConsigneeContactPerson()
+ Me._address = New DETPRHConsignmentHouseConsignmentConsigneeAddress()
+ End Sub
+
+
+ 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 Address() As DETPRHConsignmentHouseConsignmentConsigneeAddress
+ Get
+ Return Me._address
+ End Get
+ Set
+ Me._address = Value
+ End Set
+ End Property
+
+ Public Property ContactPerson() As DETPRHConsignmentHouseConsignmentConsigneeContactPerson
+ 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(DETPRHConsignmentHouseConsignmentConsignee))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentHouseConsignmentConsignee object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentHouseConsignmentConsignee object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentHouseConsignmentConsignee object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignee, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignee)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignee) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignee
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignee)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignee
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignee)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentHouseConsignmentConsignee object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignee object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentHouseConsignmentConsignee object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignee, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignee)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignee) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignee
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentHouseConsignmentConsigneeAddress
+
+#Region "Private fields"
+ Private _streetAndNumber As String
+
+ Private _postcode As String
+
+ Private _city As String
+
+ Private _country As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property streetAndNumber() As String
+ Get
+ Return Me._streetAndNumber
+ End Get
+ Set
+ Me._streetAndNumber = Value
+ End Set
+ End Property
+
+
+ Public Property postcode() As String
+ Get
+ Return Me._postcode
+ End Get
+ Set
+ Me._postcode = Value
+ End Set
+ End Property
+
+
+ Public Property city() As String
+ Get
+ Return Me._city
+ End Get
+ Set
+ Me._city = Value
+ End Set
+ End Property
+
+
+ Public Property country() As String
+ Get
+ Return Me._country
+ End Get
+ Set
+ Me._country = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentConsigneeAddress))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentHouseConsignmentConsigneeAddress object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentHouseConsignmentConsigneeAddress object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentHouseConsignmentConsigneeAddress object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsigneeAddress, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsigneeAddress)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsigneeAddress) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsigneeAddress
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsigneeAddress)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsigneeAddress
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsigneeAddress)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentHouseConsignmentConsigneeAddress object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsigneeAddress object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentHouseConsignmentConsigneeAddress object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsigneeAddress, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsigneeAddress)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsigneeAddress) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsigneeAddress
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentHouseConsignmentConsigneeContactPerson
+
+#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(DETPRHConsignmentHouseConsignmentConsigneeContactPerson))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentHouseConsignmentConsigneeContactPerson object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentHouseConsignmentConsigneeContactPerson object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentHouseConsignmentConsigneeContactPerson object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsigneeContactPerson, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsigneeContactPerson)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsigneeContactPerson) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsigneeContactPerson
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsigneeContactPerson)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsigneeContactPerson
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsigneeContactPerson)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentHouseConsignmentConsigneeContactPerson object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsigneeContactPerson object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentHouseConsignmentConsigneeContactPerson object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsigneeContactPerson, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsigneeContactPerson)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsigneeContactPerson) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsigneeContactPerson
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentHouseConsignmentAdditionalSupplyChainActor
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _role As String
+
+ Private _identificationNumber As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property role() As String
+ Get
+ Return Me._role
+ End Get
+ Set
+ Me._role = Value
+ End Set
+ End Property
+
+
+ Public Property identificationNumber() As String
+ Get
+ Return Me._identificationNumber
+ End Get
+ Set
+ Me._identificationNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentAdditionalSupplyChainActor))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentHouseConsignmentAdditionalSupplyChainActor object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentHouseConsignmentAdditionalSupplyChainActor object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentHouseConsignmentAdditionalSupplyChainActor object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentAdditionalSupplyChainActor, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentHouseConsignmentAdditionalSupplyChainActor)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentAdditionalSupplyChainActor) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentAdditionalSupplyChainActor
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentAdditionalSupplyChainActor)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentAdditionalSupplyChainActor
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentAdditionalSupplyChainActor)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentHouseConsignmentAdditionalSupplyChainActor object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentAdditionalSupplyChainActor object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentHouseConsignmentAdditionalSupplyChainActor object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentAdditionalSupplyChainActor, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentHouseConsignmentAdditionalSupplyChainActor)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentAdditionalSupplyChainActor) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentAdditionalSupplyChainActor
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentHouseConsignmentPreviousDocument
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _type As String
+
+ Private _referenceNumber As String
+
+ Private _complementOfInformation As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property type() As String
+ Get
+ Return Me._type
+ End Get
+ Set
+ Me._type = Value
+ End Set
+ End Property
+
+
+ Public Property referenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property complementOfInformation() As String
+ Get
+ Return Me._complementOfInformation
+ End Get
+ Set
+ Me._complementOfInformation = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentPreviousDocument))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentHouseConsignmentPreviousDocument object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentHouseConsignmentPreviousDocument object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentHouseConsignmentPreviousDocument object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentPreviousDocument, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentHouseConsignmentPreviousDocument)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentPreviousDocument) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentPreviousDocument
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentPreviousDocument)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentPreviousDocument
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentPreviousDocument)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentHouseConsignmentPreviousDocument object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentPreviousDocument object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentHouseConsignmentPreviousDocument object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentPreviousDocument, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentHouseConsignmentPreviousDocument)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentPreviousDocument) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentPreviousDocument
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentHouseConsignmentSupportingDocument
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _type As String
+
+ Private _referenceNumber As String
+
+ Private _documentLineItemNumber As String
+
+ Private _complementOfInformation As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property type() As String
+ Get
+ Return Me._type
+ End Get
+ Set
+ Me._type = Value
+ End Set
+ End Property
+
+
+ Public Property referenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property documentLineItemNumber() As String
+ Get
+ Return Me._documentLineItemNumber
+ End Get
+ Set
+ Me._documentLineItemNumber = Value
+ End Set
+ End Property
+
+
+ Public Property complementOfInformation() As String
+ Get
+ Return Me._complementOfInformation
+ End Get
+ Set
+ Me._complementOfInformation = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentSupportingDocument))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentHouseConsignmentSupportingDocument object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentHouseConsignmentSupportingDocument object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentHouseConsignmentSupportingDocument object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentSupportingDocument, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentHouseConsignmentSupportingDocument)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentSupportingDocument) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentSupportingDocument
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentSupportingDocument)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentSupportingDocument
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentSupportingDocument)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentHouseConsignmentSupportingDocument object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentSupportingDocument object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentHouseConsignmentSupportingDocument object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentSupportingDocument, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentHouseConsignmentSupportingDocument)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentSupportingDocument) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentSupportingDocument
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentHouseConsignmentTransportDocument
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _type As String
+
+ Private _referenceNumber As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+
+ Public Property sequenceNumber() As String
+ Get
+ Return Me._sequenceNumber
+ End Get
+ Set
+ Me._sequenceNumber = Value
+ End Set
+ End Property
+
+
+ Public Property type() As String
+ Get
+ Return Me._type
+ End Get
+ Set
+ Me._type = Value
+ End Set
+ End Property
+
+
+ Public Property referenceNumber() As String
+ Get
+ Return Me._referenceNumber
+ End Get
+ Set
+ Me._referenceNumber = Value
+ End Set
+ End Property
+
+ Private Shared ReadOnly Property SerializerXml() As XmlSerializer
+ Get
+ If (_serializerXml Is Nothing) Then
+ _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentTransportDocument))
+ End If
+ Return _serializerXml
+ End Get
+ End Property
+
+#Region "Serialize/Deserialize"
+ '''
+ ''' Serialize DETPRHConsignmentHouseConsignmentTransportDocument object
+ '''
+ ''' XML value
+ Public Overridable Function Serialize() As String
+ 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 DETPRHConsignmentHouseConsignmentTransportDocument object
+ '''
+ ''' string to deserialize
+ ''' Output DETPRHConsignmentHouseConsignmentTransportDocument object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentTransportDocument, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentHouseConsignmentTransportDocument)
+ Try
+ obj = Deserialize(input)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentTransportDocument) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return Deserialize(input, obj, exception)
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentTransportDocument
+ Dim stringReader As StringReader = Nothing
+ Try
+ stringReader = New StringReader(input)
+ Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentTransportDocument)
+ Finally
+ If (Not (stringReader) Is Nothing) Then
+ stringReader.Dispose()
+ End If
+ End Try
+ End Function
+
+ Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentTransportDocument
+ Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentTransportDocument)
+ End Function
+#End Region
+
+ '''
+ ''' Serializes current DETPRHConsignmentHouseConsignmentTransportDocument object into file
+ '''
+ ''' full path of outupt xml file
+ ''' output Exception value if failed
+ ''' true if can serialize and save into file; otherwise, false
+ Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ Try
+ SaveToFile(fileName)
+ Return True
+ Catch e As System.Exception
+ exception = e
+ Return False
+ End Try
+ End Function
+
+ Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
+ Dim streamWriter As StreamWriter = Nothing
+ Try
+ Dim dataString As String = Serialize()
+ Dim outputFile As FileInfo = New FileInfo(fileName)
+ streamWriter = outputFile.CreateText
+ streamWriter.WriteLine(dataString)
+ streamWriter.Close()
+ Finally
+ If (Not (streamWriter) Is Nothing) Then
+ streamWriter.Dispose()
+ End If
+ End Try
+ End Sub
+
+ '''
+ ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentTransportDocument object
+ '''
+ ''' File to load and deserialize
+ ''' Output DETPRHConsignmentHouseConsignmentTransportDocument object
+ ''' output Exception value if deserialize failed
+ ''' true if this Serializer can deserialize the object; otherwise, false
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentTransportDocument, ByRef exception As System.Exception) As Boolean
+ exception = Nothing
+ obj = CType(Nothing, DETPRHConsignmentHouseConsignmentTransportDocument)
+ Try
+ obj = LoadFromFile(fileName)
+ Return True
+ Catch ex As System.Exception
+ exception = ex
+ Return False
+ End Try
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentTransportDocument) As Boolean
+ Dim exception As System.Exception = Nothing
+ Return LoadFromFile(fileName, obj, exception)
+ End Function
+
+ Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentTransportDocument
+ Dim file As FileStream = Nothing
+ Dim sr As StreamReader = Nothing
+ Try
+ file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
+ sr = New StreamReader(file)
+ Dim dataString As String = sr.ReadToEnd
+ sr.Close()
+ file.Close()
+ Return Deserialize(dataString)
+ Finally
+ If (Not (file) Is Nothing) Then
+ file.Dispose()
+ End If
+ If (Not (sr) Is Nothing) Then
+ sr.Dispose()
+ End If
+ End Try
+ End Function
+ End Class
+
+
+ Partial Public Class DETPRHConsignmentHouseConsignmentAdditionalReference
+
+#Region "Private fields"
+ Private _sequenceNumber As String
+
+ Private _type As String
+
+ Private _referenceNumber As String
+
+ Private Shared _serializerXml As XmlSerializer
+#End Region
+
+