From 391bea7c98c12a201b605f1d89474abd46898212 Mon Sep 17 00:00:00 2001 From: Andreas Luxbauer Date: Tue, 14 Nov 2023 15:07:32 +0100 Subject: [PATCH] NCTS5 --- .../e_dep_rel.Designer.vb | 20273 ++++++++++++++++ .../NCTS/Ueberlassungsmeldung/e_dep_rel.xsd | 6691 +++++ DAKOSY_Worker/DAKOSY_Worker_lib.vbproj | 4 + VERAGMonitoring/My Project/AssemblyInfo.vb | 4 +- VERAGMonitoring/frmMain.vb | 8 +- initATLASAufschubkonten/cGetMsgType.vb | 9 + initATLASAufschubkonten/cWorker_NCTS.vb | 111 +- .../frmDYNachrichtenVerarbeitung.vb | 4 + initATLASAufschubkonten/frmStartOptions.vb | 8 + 9 files changed, 27107 insertions(+), 5 deletions(-) create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Ueberlassungsmeldung/e_dep_rel.Designer.vb create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Ueberlassungsmeldung/e_dep_rel.xsd 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 + + + 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(DETPRHConsignmentHouseConsignmentAdditionalReference)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentAdditionalReference object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentAdditionalReference object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentAdditionalReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentAdditionalReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentAdditionalReference) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentAdditionalReference) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentAdditionalReference + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentAdditionalReference) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentAdditionalReference + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentAdditionalReference) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentAdditionalReference object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentAdditionalReference object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentAdditionalReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentAdditionalReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentAdditionalReference) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentAdditionalReference) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentAdditionalReference + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentAdditionalInformation + +#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(DETPRHConsignmentHouseConsignmentAdditionalInformation)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentAdditionalInformation object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentAdditionalInformation object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentAdditionalInformation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentAdditionalInformation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentAdditionalInformation) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentAdditionalInformation) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentAdditionalInformation + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentAdditionalInformation) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentAdditionalInformation + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentAdditionalInformation) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentAdditionalInformation object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentAdditionalInformation object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentAdditionalInformation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentAdditionalInformation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentAdditionalInformation) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentAdditionalInformation) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentAdditionalInformation + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentTransportCharges + +#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(DETPRHConsignmentHouseConsignmentTransportCharges)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentTransportCharges object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentTransportCharges object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentTransportCharges object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentTransportCharges, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentTransportCharges) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentTransportCharges) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentTransportCharges + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentTransportCharges) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentTransportCharges + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentTransportCharges) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentTransportCharges object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentTransportCharges object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentTransportCharges object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentTransportCharges, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentTransportCharges) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentTransportCharges) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentTransportCharges + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItem + +#Region "Private fields" + Private _sequenceNumber As String + + Private _goodsItemNumber As String + + Private _declarationGoodsItemNumber As String + + Private _declarationType As String + + Private _countryOfDispatch As String + + Private _countryOfDestination As String + + Private _referenceNumberUCR As String + + Private _consignee As DETPRHConsignmentHouseConsignmentConsignmentItemConsignee + + Private _additionalSupplyChainActor As List(Of DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor) + + Private _commodity As DETPRHConsignmentHouseConsignmentConsignmentItemCommodity + + Private _packaging As List(Of DETPRHConsignmentHouseConsignmentConsignmentItemPackaging) + + Private _previousDocument As List(Of DETPRHConsignmentHouseConsignmentConsignmentItemPreviousDocument) + + Private _supportingDocument As List(Of DETPRHConsignmentHouseConsignmentConsignmentItemSupportingDocument) + + Private _transportDocument As List(Of DETPRHConsignmentHouseConsignmentConsignmentItemTransportDocument) + + Private _additionalReference As List(Of DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalReference) + + Private _additionalInformation As List(Of DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalInformation) + + Private _transportCharges As DETPRHConsignmentHouseConsignmentConsignmentItemTransportCharges + + Private _procedureTransference As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransference + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._procedureTransference = New DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransference() + Me._transportCharges = New DETPRHConsignmentHouseConsignmentConsignmentItemTransportCharges() + Me._additionalInformation = New List(Of DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalInformation)() + Me._additionalReference = New List(Of DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalReference)() + Me._transportDocument = New List(Of DETPRHConsignmentHouseConsignmentConsignmentItemTransportDocument)() + Me._supportingDocument = New List(Of DETPRHConsignmentHouseConsignmentConsignmentItemSupportingDocument)() + Me._previousDocument = New List(Of DETPRHConsignmentHouseConsignmentConsignmentItemPreviousDocument)() + Me._packaging = New List(Of DETPRHConsignmentHouseConsignmentConsignmentItemPackaging)() + Me._commodity = New DETPRHConsignmentHouseConsignmentConsignmentItemCommodity() + Me._additionalSupplyChainActor = New List(Of DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor)() + Me._consignee = New DETPRHConsignmentHouseConsignmentConsignmentItemConsignee() + End Sub + + + Public Property sequenceNumber() As String + Get + Return Me._sequenceNumber + End Get + Set + Me._sequenceNumber = Value + End Set + End Property + + + Public Property goodsItemNumber() As String + Get + Return Me._goodsItemNumber + End Get + Set + Me._goodsItemNumber = Value + End Set + End Property + + + Public Property declarationGoodsItemNumber() As String + Get + Return Me._declarationGoodsItemNumber + End Get + Set + Me._declarationGoodsItemNumber = 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 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 referenceNumberUCR() As String + Get + Return Me._referenceNumberUCR + End Get + Set + Me._referenceNumberUCR = Value + End Set + End Property + + Public Property Consignee() As DETPRHConsignmentHouseConsignmentConsignmentItemConsignee + Get + Return Me._consignee + End Get + Set + Me._consignee = Value + End Set + End Property + + + Public Property AdditionalSupplyChainActor() As List(Of DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor) + Get + Return Me._additionalSupplyChainActor + End Get + Set + Me._additionalSupplyChainActor = Value + End Set + End Property + + Public Property Commodity() As DETPRHConsignmentHouseConsignmentConsignmentItemCommodity + Get + Return Me._commodity + End Get + Set + Me._commodity = Value + End Set + End Property + + + Public Property Packaging() As List(Of DETPRHConsignmentHouseConsignmentConsignmentItemPackaging) + Get + Return Me._packaging + End Get + Set + Me._packaging = Value + End Set + End Property + + + Public Property PreviousDocument() As List(Of DETPRHConsignmentHouseConsignmentConsignmentItemPreviousDocument) + Get + Return Me._previousDocument + End Get + Set + Me._previousDocument = Value + End Set + End Property + + + Public Property SupportingDocument() As List(Of DETPRHConsignmentHouseConsignmentConsignmentItemSupportingDocument) + Get + Return Me._supportingDocument + End Get + Set + Me._supportingDocument = Value + End Set + End Property + + + Public Property TransportDocument() As List(Of DETPRHConsignmentHouseConsignmentConsignmentItemTransportDocument) + Get + Return Me._transportDocument + End Get + Set + Me._transportDocument = Value + End Set + End Property + + + Public Property AdditionalReference() As List(Of DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalReference) + Get + Return Me._additionalReference + End Get + Set + Me._additionalReference = Value + End Set + End Property + + + Public Property AdditionalInformation() As List(Of DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalInformation) + Get + Return Me._additionalInformation + End Get + Set + Me._additionalInformation = Value + End Set + End Property + + Public Property TransportCharges() As DETPRHConsignmentHouseConsignmentConsignmentItemTransportCharges + Get + Return Me._transportCharges + End Get + Set + Me._transportCharges = Value + End Set + End Property + + Public Property ProcedureTransference() As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransference + Get + Return Me._procedureTransference + End Get + Set + Me._procedureTransference = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentConsignmentItem)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItem object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItem object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItem object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItem, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItem) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItem) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItem + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItem) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItem + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItem) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItem object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItem object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItem object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItem, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItem) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItem) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItem + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemConsignee + +#Region "Private fields" + Private _identificationNumber As String + + Private _subsidiaryNumber As String + + Private _name As String + + Private _address As DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeAddress + + Private _contactPerson As DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contactPerson = New DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson() + Me._address = New DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeAddress() + 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 DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeAddress + Get + Return Me._address + End Get + Set + Me._address = Value + End Set + End Property + + Public Property ContactPerson() As DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson + 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(DETPRHConsignmentHouseConsignmentConsignmentItemConsignee)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemConsignee object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemConsignee object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemConsignee object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemConsignee, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemConsignee) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemConsignee) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemConsignee + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemConsignee) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemConsignee + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemConsignee) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemConsignee object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemConsignee object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemConsignee object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemConsignee, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemConsignee) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemConsignee) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemConsignee + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeAddress + +#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(DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeAddress)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeAddress object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeAddress object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeAddress) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeAddress) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeAddress + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeAddress) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeAddress + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeAddress) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeAddress object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeAddress object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeAddress) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeAddress) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeAddress + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson + +#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(DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor + +#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(DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemCommodity + +#Region "Private fields" + Private _descriptionOfGoods As String + + Private _cusCode As String + + Private _commodityCode As DETPRHConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode + + Private _dangerousGoods As List(Of DETPRHConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods) + + Private _goodsMeasure As DETPRHConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsMeasure = New DETPRHConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure() + Me._dangerousGoods = New List(Of DETPRHConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods)() + Me._commodityCode = New DETPRHConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode() + End Sub + + + Public Property descriptionOfGoods() As String + Get + Return Me._descriptionOfGoods + End Get + Set + Me._descriptionOfGoods = Value + End Set + End Property + + + Public Property cusCode() As String + Get + Return Me._cusCode + End Get + Set + Me._cusCode = Value + End Set + End Property + + Public Property CommodityCode() As DETPRHConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode + Get + Return Me._commodityCode + End Get + Set + Me._commodityCode = Value + End Set + End Property + + + Public Property DangerousGoods() As List(Of DETPRHConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods) + Get + Return Me._dangerousGoods + End Get + Set + Me._dangerousGoods = Value + End Set + End Property + + Public Property GoodsMeasure() As DETPRHConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure + Get + Return Me._goodsMeasure + End Get + Set + Me._goodsMeasure = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentConsignmentItemCommodity)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemCommodity object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemCommodity object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemCommodity object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemCommodity, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemCommodity) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemCommodity) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemCommodity + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemCommodity) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemCommodity + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemCommodity) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemCommodity object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemCommodity object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemCommodity object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemCommodity, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemCommodity) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemCommodity) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemCommodity + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode + +#Region "Private fields" + Private _harmonizedSystemSubHeadingCode As String + + Private _combinedNomenclatureCode As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property harmonizedSystemSubHeadingCode() As String + Get + Return Me._harmonizedSystemSubHeadingCode + End Get + Set + Me._harmonizedSystemSubHeadingCode = Value + End Set + End Property + + + Public Property combinedNomenclatureCode() As String + Get + Return Me._combinedNomenclatureCode + End Get + Set + Me._combinedNomenclatureCode = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods + +#Region "Private fields" + Private _sequenceNumber As String + + Private _uNNumber 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 UNNumber() As String + Get + Return Me._uNNumber + End Get + Set + Me._uNNumber = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure + +#Region "Private fields" + Private _grossMass As Decimal + + Private _netMass As Decimal + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Property grossMass() As Decimal + Get + Return Me._grossMass + End Get + Set + Me._grossMass = Value + End Set + End Property + + Public Property netMass() As Decimal + Get + Return Me._netMass + End Get + Set + Me._netMass = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemPackaging + +#Region "Private fields" + Private _sequenceNumber As String + + Private _typeOfPackages As String + + Private _numberOfPackages As String + + Private _shippingMarks As String + + Private _packageReference As DETPRHConsignmentHouseConsignmentConsignmentItemPackagingPackageReference + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._packageReference = New DETPRHConsignmentHouseConsignmentConsignmentItemPackagingPackageReference() + End Sub + + + Public Property sequenceNumber() As String + Get + Return Me._sequenceNumber + End Get + Set + Me._sequenceNumber = Value + End Set + End Property + + + Public Property typeOfPackages() As String + Get + Return Me._typeOfPackages + End Get + Set + Me._typeOfPackages = Value + End Set + End Property + + + Public Property numberOfPackages() As String + Get + Return Me._numberOfPackages + End Get + Set + Me._numberOfPackages = Value + End Set + End Property + + + Public Property shippingMarks() As String + Get + Return Me._shippingMarks + End Get + Set + Me._shippingMarks = Value + End Set + End Property + + Public Property PackageReference() As DETPRHConsignmentHouseConsignmentConsignmentItemPackagingPackageReference + Get + Return Me._packageReference + End Get + Set + Me._packageReference = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentConsignmentItemPackaging)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemPackaging object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemPackaging object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemPackaging object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemPackaging, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemPackaging) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemPackaging) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemPackaging + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemPackaging) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemPackaging + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemPackaging) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemPackaging object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemPackaging object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemPackaging object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemPackaging, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemPackaging) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemPackaging) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemPackaging + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemPackagingPackageReference + +#Region "Private fields" + Private _goodsItemNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property goodsItemNumber() As String + Get + Return Me._goodsItemNumber + End Get + Set + Me._goodsItemNumber = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentConsignmentItemPackagingPackageReference)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemPackagingPackageReference object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemPackagingPackageReference object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemPackagingPackageReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemPackagingPackageReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemPackagingPackageReference) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemPackagingPackageReference) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemPackagingPackageReference + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemPackagingPackageReference) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemPackagingPackageReference + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemPackagingPackageReference) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemPackagingPackageReference object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemPackagingPackageReference object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemPackagingPackageReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemPackagingPackageReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemPackagingPackageReference) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemPackagingPackageReference) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemPackagingPackageReference + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemPreviousDocument + +#Region "Private fields" + Private _sequenceNumber As String + + Private _type As String + + Private _referenceNumber As String + + Private _goodsItemNumber 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 goodsItemNumber() As String + Get + Return Me._goodsItemNumber + End Get + Set + Me._goodsItemNumber = 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(DETPRHConsignmentHouseConsignmentConsignmentItemPreviousDocument)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemPreviousDocument object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemPreviousDocument object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemPreviousDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemPreviousDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemPreviousDocument) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemPreviousDocument) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemPreviousDocument + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemPreviousDocument) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemPreviousDocument + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemPreviousDocument) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemPreviousDocument object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemPreviousDocument object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemPreviousDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemPreviousDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemPreviousDocument) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemPreviousDocument) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemPreviousDocument + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemSupportingDocument + +#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(DETPRHConsignmentHouseConsignmentConsignmentItemSupportingDocument)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemSupportingDocument object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemSupportingDocument object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemSupportingDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemSupportingDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemSupportingDocument) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemSupportingDocument) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemSupportingDocument + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemSupportingDocument) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemSupportingDocument + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemSupportingDocument) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemSupportingDocument object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemSupportingDocument object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemSupportingDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemSupportingDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemSupportingDocument) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemSupportingDocument) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemSupportingDocument + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemTransportDocument + +#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(DETPRHConsignmentHouseConsignmentConsignmentItemTransportDocument)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemTransportDocument object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemTransportDocument object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemTransportDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemTransportDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemTransportDocument) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemTransportDocument) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemTransportDocument + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemTransportDocument) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemTransportDocument + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemTransportDocument) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemTransportDocument object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemTransportDocument object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemTransportDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemTransportDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemTransportDocument) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemTransportDocument) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemTransportDocument + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalReference + +#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(DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalReference)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalReference object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalReference object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalReference) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalReference) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalReference + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalReference) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalReference + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalReference) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalReference object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalReference object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalReference) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalReference) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalReference + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalInformation + +#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(DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalInformation)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalInformation object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalInformation object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalInformation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalInformation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalInformation) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalInformation) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalInformation + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalInformation) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalInformation + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalInformation) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalInformation object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalInformation object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalInformation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalInformation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalInformation) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalInformation) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemAdditionalInformation + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemTransportCharges + +#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(DETPRHConsignmentHouseConsignmentConsignmentItemTransportCharges)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemTransportCharges object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemTransportCharges object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemTransportCharges object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemTransportCharges, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemTransportCharges) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemTransportCharges) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemTransportCharges + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemTransportCharges) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemTransportCharges + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemTransportCharges) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemTransportCharges object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemTransportCharges object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemTransportCharges object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemTransportCharges, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemTransportCharges) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemTransportCharges) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemTransportCharges + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransference + +#Region "Private fields" + Private _summaryDeclaration As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration + + Private _customsWarehousing As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing + + Private _inwardProcessing As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._inwardProcessing = New DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing() + Me._customsWarehousing = New DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing() + Me._summaryDeclaration = New DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration() + End Sub + + Public Property SummaryDeclaration() As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration + Get + Return Me._summaryDeclaration + End Get + Set + Me._summaryDeclaration = Value + End Set + End Property + + Public Property CustomsWarehousing() As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing + Get + Return Me._customsWarehousing + End Get + Set + Me._customsWarehousing = Value + End Set + End Property + + Public Property InwardProcessing() As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing + Get + Return Me._inwardProcessing + End Get + Set + Me._inwardProcessing = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransference)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransference object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransference object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransference) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransference) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransference + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransference) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransference + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransference) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransference object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransference object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransference) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransference) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransference + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration + +#Region "Private fields" + Private _transference As String + + Private _identificationType As String + + Private _goodsReference As List(Of DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsReference = New List(Of DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference)() + End Sub + + + Public Property transference() As String + Get + Return Me._transference + End Get + Set + Me._transference = Value + End Set + End Property + + + Public Property identificationType() As String + Get + Return Me._identificationType + End Get + Set + Me._identificationType = Value + End Set + End Property + + + Public Property GoodsReference() As List(Of DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference) + 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(DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference + +#Region "Private fields" + Private _sequenceNumber As String + + Private _identificationByKey As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey + + Private _identificationByRegistrationNumber As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber + + Private _packaging As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._packaging = New DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging() + Me._identificationByRegistrationNumber = New DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber() + Me._identificationByKey = New DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey() + End Sub + + + Public Property sequenceNumber() As String + Get + Return Me._sequenceNumber + End Get + Set + Me._sequenceNumber = Value + End Set + End Property + + Public Property IdentificationByKey() As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey + Get + Return Me._identificationByKey + End Get + Set + Me._identificationByKey = Value + End Set + End Property + + Public Property IdentificationByRegistrationNumber() As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber + Get + Return Me._identificationByRegistrationNumber + End Get + Set + Me._identificationByRegistrationNumber = Value + End Set + End Property + + Public Property Packaging() As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging + Get + Return Me._packaging + End Get + Set + Me._packaging = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey + +#Region "Private fields" + Private _type As String + + Private _referenceNumber As String + + Private _custodian As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._custodian = New DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian() + End Sub + + + 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 Custodian() As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian + Get + Return Me._custodian + End Get + Set + Me._custodian = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian + +#Region "Private fields" + Private _identificationNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property identificationNumber() As String + Get + Return Me._identificationNumber + End Get + Set + Me._identificationNumber = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber + +#Region "Private fields" + Private _mRN As String + + Private _registrationNumber As String + + Private _goodsItemNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property MRN() As String + Get + Return Me._mRN + End Get + Set + Me._mRN = Value + End Set + End Property + + + Public Property registrationNumber() As String + Get + Return Me._registrationNumber + End Get + Set + Me._registrationNumber = Value + End Set + End Property + + + Public Property goodsItemNumber() As String + Get + Return Me._goodsItemNumber + End Get + Set + Me._goodsItemNumber = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging + +#Region "Private fields" + Private _numberOfPackages As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property numberOfPackages() As String + Get + Return Me._numberOfPackages + End Get + Set + Me._numberOfPackages = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing + +#Region "Private fields" + Private _transference As String + + Private _lRN As String + + Private _authorisation As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation + + Private _goodsReference As List(Of DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsReference = New List(Of DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference)() + Me._authorisation = New DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation() + End Sub + + + Public Property transference() As String + Get + Return Me._transference + End Get + Set + Me._transference = Value + End Set + End Property + + + Public Property LRN() As String + Get + Return Me._lRN + End Get + Set + Me._lRN = Value + End Set + End Property + + Public Property Authorisation() As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation + Get + Return Me._authorisation + End Get + Set + Me._authorisation = Value + End Set + End Property + + + Public Property GoodsReference() As List(Of DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference) + 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(DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation + +#Region "Private fields" + Private _type As String + + Private _referenceNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property type() As String + Get + Return Me._type + End Get + Set + Me._type = Value + End Set + End Property + + + Public Property referenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference + +#Region "Private fields" + Private _sequenceNumber As String + + Private _accessViaATLAS As String + + Private _mRN As String + + Private _registrationNumber As String + + Private _goodsItemNumber As String + + Private _usualTreatment As String + + Private _complement As String + + Private _commodity As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._commodity = New DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity() + End Sub + + + Public Property sequenceNumber() As String + Get + Return Me._sequenceNumber + End Get + Set + Me._sequenceNumber = Value + End Set + End Property + + + Public Property accessViaATLAS() As String + Get + Return Me._accessViaATLAS + End Get + Set + Me._accessViaATLAS = Value + End Set + End Property + + + Public Property MRN() As String + Get + Return Me._mRN + End Get + Set + Me._mRN = Value + End Set + End Property + + + Public Property registrationNumber() As String + Get + Return Me._registrationNumber + End Get + Set + Me._registrationNumber = Value + End Set + End Property + + + Public Property goodsItemNumber() As String + Get + Return Me._goodsItemNumber + End Get + Set + Me._goodsItemNumber = Value + End Set + End Property + + + Public Property usualTreatment() As String + Get + Return Me._usualTreatment + End Get + Set + Me._usualTreatment = Value + End Set + End Property + + + Public Property complement() As String + Get + Return Me._complement + End Get + Set + Me._complement = Value + End Set + End Property + + Public Property Commodity() As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity + Get + Return Me._commodity + End Get + Set + Me._commodity = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity + +#Region "Private fields" + Private _commodityCode As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode + + Private _goodsReduction As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction + + Private _goodsReductionAfterTreatment As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsReductionAfterTreatment = New DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment() + Me._goodsReduction = New DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction() + Me._commodityCode = New DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode() + End Sub + + Public Property CommodityCode() As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode + Get + Return Me._commodityCode + End Get + Set + Me._commodityCode = Value + End Set + End Property + + Public Property GoodsReduction() As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction + Get + Return Me._goodsReduction + End Get + Set + Me._goodsReduction = Value + End Set + End Property + + Public Property GoodsReductionAfterTreatment() As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment + Get + Return Me._goodsReductionAfterTreatment + End Get + Set + Me._goodsReductionAfterTreatment = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode + +#Region "Private fields" + Private _harmonizedSystemSubHeadingCode As String + + Private _combinedNomenclatureCode As String + + Private _taricCode As String + + Private _nationalAdditionalCode As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._nationalAdditionalCode = New DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode() + End Sub + + + Public Property harmonizedSystemSubHeadingCode() As String + Get + Return Me._harmonizedSystemSubHeadingCode + End Get + Set + Me._harmonizedSystemSubHeadingCode = Value + End Set + End Property + + + Public Property combinedNomenclatureCode() As String + Get + Return Me._combinedNomenclatureCode + End Get + Set + Me._combinedNomenclatureCode = Value + End Set + End Property + + + Public Property taricCode() As String + Get + Return Me._taricCode + End Get + Set + Me._taricCode = Value + End Set + End Property + + Public Property NationalAdditionalCode() As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode + Get + Return Me._nationalAdditionalCode + End Get + Set + Me._nationalAdditionalCode = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode + +#Region "Private fields" + Private _nationalAdditionalCode As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property nationalAdditionalCode() As String + Get + Return Me._nationalAdditionalCode + End Get + Set + Me._nationalAdditionalCode = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction + +#Region "Private fields" + Private _measurementUnit As String + + Private _qualifier As String + + Private _quantity As Decimal + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property measurementUnit() As String + Get + Return Me._measurementUnit + End Get + Set + Me._measurementUnit = Value + End Set + End Property + + + Public Property qualifier() As String + Get + Return Me._qualifier + End Get + Set + Me._qualifier = Value + End Set + End Property + + Public Property quantity() As Decimal + Get + Return Me._quantity + End Get + Set + Me._quantity = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment + +#Region "Private fields" + Private _measurementUnit As String + + Private _qualifier As String + + Private _quantity As Decimal + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property measurementUnit() As String + Get + Return Me._measurementUnit + End Get + Set + Me._measurementUnit = Value + End Set + End Property + + + Public Property qualifier() As String + Get + Return Me._qualifier + End Get + Set + Me._qualifier = Value + End Set + End Property + + Public Property quantity() As Decimal + Get + Return Me._quantity + End Get + Set + Me._quantity = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing + +#Region "Private fields" + Private _transference As String + + Private _simplyGrantedAuthorisation As String + + Private _authorisation As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation + + Private _customsOfficeOfSupervision As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision + + Private _goodsReference As List(Of DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsReference = New List(Of DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference)() + Me._customsOfficeOfSupervision = New DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision() + Me._authorisation = New DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation() + End Sub + + + Public Property transference() As String + Get + Return Me._transference + End Get + Set + Me._transference = Value + End Set + End Property + + + Public Property simplyGrantedAuthorisation() As String + Get + Return Me._simplyGrantedAuthorisation + End Get + Set + Me._simplyGrantedAuthorisation = Value + End Set + End Property + + Public Property Authorisation() As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation + Get + Return Me._authorisation + End Get + Set + Me._authorisation = Value + End Set + End Property + + Public Property CustomsOfficeOfSupervision() As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision + Get + Return Me._customsOfficeOfSupervision + End Get + Set + Me._customsOfficeOfSupervision = Value + End Set + End Property + + + Public Property GoodsReference() As List(Of DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference) + 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(DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation + +#Region "Private fields" + Private _type As String + + Private _referenceNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property type() As String + Get + Return Me._type + End Get + Set + Me._type = Value + End Set + End Property + + + Public Property referenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision + +#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(DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference + +#Region "Private fields" + Private _sequenceNumber As String + + Private _accessViaATLAS As String + + Private _mRN As String + + Private _registrationNumber As String + + Private _goodsItemNumber As String + + Private _commodity As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._commodity = New DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity() + End Sub + + + Public Property sequenceNumber() As String + Get + Return Me._sequenceNumber + End Get + Set + Me._sequenceNumber = Value + End Set + End Property + + + Public Property accessViaATLAS() As String + Get + Return Me._accessViaATLAS + End Get + Set + Me._accessViaATLAS = Value + End Set + End Property + + + Public Property MRN() As String + Get + Return Me._mRN + End Get + Set + Me._mRN = Value + End Set + End Property + + + Public Property registrationNumber() As String + Get + Return Me._registrationNumber + End Get + Set + Me._registrationNumber = Value + End Set + End Property + + + Public Property goodsItemNumber() As String + Get + Return Me._goodsItemNumber + End Get + Set + Me._goodsItemNumber = Value + End Set + End Property + + Public Property Commodity() As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity + Get + Return Me._commodity + End Get + Set + Me._commodity = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity + +#Region "Private fields" + Private _goodsRelatedData As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property goodsRelatedData() As String + Get + Return Me._goodsRelatedData + End Get + Set + Me._goodsRelatedData = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object + ''' + ''' string to deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity + Return CType(SerializerXml.Deserialize(s), DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity) + End Function +#End Region + + ''' + ''' Serializes current DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object + ''' + ''' File to load and deserialize + ''' Output DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPRHConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class +End Namespace +#Enable Warning diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Ueberlassungsmeldung/e_dep_rel.xsd b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Ueberlassungsmeldung/e_dep_rel.xsd new file mode 100644 index 0000000..7bb2150 --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Ueberlassungsmeldung/e_dep_rel.xsd @@ -0,0 +1,6691 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DAKOSY_Worker/DAKOSY_Worker_lib.vbproj b/DAKOSY_Worker/DAKOSY_Worker_lib.vbproj index e79045d..5a6b430 100644 --- a/DAKOSY_Worker/DAKOSY_Worker_lib.vbproj +++ b/DAKOSY_Worker/DAKOSY_Worker_lib.vbproj @@ -134,6 +134,7 @@ + @@ -367,6 +368,9 @@ Designer + + Designer + Designer diff --git a/VERAGMonitoring/My Project/AssemblyInfo.vb b/VERAGMonitoring/My Project/AssemblyInfo.vb index 6985f15..a233817 100644 --- a/VERAGMonitoring/My Project/AssemblyInfo.vb +++ b/VERAGMonitoring/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/VERAGMonitoring/frmMain.vb b/VERAGMonitoring/frmMain.vb index e51fce2..1670e32 100644 --- a/VERAGMonitoring/frmMain.vb +++ b/VERAGMonitoring/frmMain.vb @@ -416,8 +416,10 @@ Public Class frmMain Dim AtWoche_zolaris As Double = BRG.getBrgSumFromFMZOLL_Zolaris(Now.AddDays(-6).ToShortDateString, Now.ToShortDateString, "50", "60", brg_AT_IMEX) 'TELOTEC AT WOCHE Dim AtWoche_TELOTEC As Double = BRG.getBrgSumFromFMZOLL_TELOTEC(Now.AddDays(-6).ToShortDateString, Now.ToShortDateString, "50", "60", brg_AT_IMEX) + 'NCTS FREMD AT WOCHE + Dim AtWoche_NCTS_TR As Double = BRG.getBrgSumFromFMZOLL_NCTS_TR(Now.AddDays(-6).ToShortDateString, Now.ToShortDateString, "50", "60", brg_AT_IMEX) 'AT WOCHE - Dim woche_at As Double = AtWoche_atlas + AtWoche_zolaris + AtWoche_TELOTEC + Dim woche_at As Double = AtWoche_atlas + AtWoche_zolaris + AtWoche_TELOTEC + AtWoche_NCTS_TR setLabel(lblAtWocheImex, String.Format("{0:C}", CDbl(woche_at))) 'ZOLARIS AT TAG @@ -426,8 +428,10 @@ Public Class frmMain Dim AtTag_atlas As Double = BRG.getBrgSumFromFMZOLL_Zabis(Now.AddMonths(-1).ToShortDateString, Now.ToShortDateString, "50", "50", brg_AT_IMEX) 'TELOTEC AT TAG Dim AtTag_telotec As Double = BRG.getBrgSumFromFMZOLL_TELOTEC(Now.AddMonths(-1).ToShortDateString, Now.ToShortDateString, "50", "50", brg_AT_IMEX) + 'NCTS FREMD AT TAG + Dim AtTag_NCTS_FREMD As Double = BRG.getBrgSumFromFMZOLL_NCTS_TR(Now.AddMonths(-1).ToShortDateString, Now.ToShortDateString, "50", "50", brg_AT_IMEX) 'AT TAG - Dim tag_at As Double = AtTag_zolaris + AtTag_atlas + AtTag_telotec + Dim tag_at As Double = AtTag_zolaris + AtTag_atlas + AtTag_telotec + AtTag_NCTS_FREMD setLabel(lblAtTagImex, String.Format("{0:C}", CDbl(tag_at))) Else setLabel(lblAtWocheImex, "0.0") diff --git a/initATLASAufschubkonten/cGetMsgType.vb b/initATLASAufschubkonten/cGetMsgType.vb index f977818..d057c8b 100644 --- a/initATLASAufschubkonten/cGetMsgType.vb +++ b/initATLASAufschubkonten/cGetMsgType.vb @@ -583,6 +583,15 @@ Public Class cGetMsgType Return False End Function + Shared Function isNCTS_VersandanmeldungXML_DETPRH(doc As XmlDocument) As Boolean + If doc.HasChildNodes Then + If doc.GetElementsByTagName("DETPRH").Count > 0 Then + Return True + End If + End If + Return False + End Function + Shared Function isNCTS_AnkunftsanzeigeXML(doc As XmlDocument) As Boolean If doc.HasChildNodes Then If doc.GetElementsByTagName("DETBAE").Count > 0 Then diff --git a/initATLASAufschubkonten/cWorker_NCTS.vb b/initATLASAufschubkonten/cWorker_NCTS.vb index fa0ef41..525911b 100644 --- a/initATLASAufschubkonten/cWorker_NCTS.vb +++ b/initATLASAufschubkonten/cWorker_NCTS.vb @@ -1130,6 +1130,98 @@ Public Class cWorker_NCTS End Try End Function + Public Shared Function readNCTS_VersandanmeldungXML_DETPRH(FORM As frmDYNachrichtenVerarbeitung, doc As XmlDocument, ByRef statusTMP As DAKOSY_Worker.cDakosy_Statusmeldungen) As String + Try + readNCTS_VersandanmeldungXML_DETPRH = "" + Dim sw = New StringWriter() + Dim xw = New XmlTextWriter(sw) + doc.WriteTo(xw) + Dim XmlString = sw.ToString() + If XmlString.Contains("") Then + Dim xmlDETPRH = XmlString.Substring(XmlString.IndexOf(""), XmlString.IndexOf("") + 9 - XmlString.IndexOf("")) + ' MsgBox(xmlDETPRH) + Dim p = Path.GetTempFileName + + Using outputFile As New StreamWriter(p, False, System.Text.Encoding.Default) + outputFile.Write(xmlDETPRH) + outputFile.Close() + + + Dim AnsprechpTMP_Email = "" + Dim DETPRH As DAKOSY_Worker.DETPRH.DETPRH = DAKOSY_Worker.DETPRH.DETPRH.LoadFromFile(p) + ' Dim NCTS As New DAKOSY_Worker.cDakosyNCTS + + + + If DETPRH IsNot Nothing AndAlso DETPRH.TransitOperation IsNot Nothing AndAlso DETPRH.TransitOperation.LRN IsNot Nothing AndAlso DETPRH.TransitOperation.LRN <> "" Then + readNCTS_VersandanmeldungXML_DETPRH = DETPRH.TransitOperation.LRN + Else + Return "" 'Keine Bezugsnummer + End If + + Dim DY_TMP As DAKOSY_Worker.cDakosy_Zollanmeldungen = frmDYNachrichtenVerarbeitung.saveDY_ZA(readNCTS_VersandanmeldungXML_DETPRH, "NCTS") + + Dim NCTS As DAKOSY_Worker.cDakosyNCTSOut004 = DAKOSY_Worker.cDakosyNCTSOut004.LOADByBezugsNr(readNCTS_VersandanmeldungXML_DETPRH, False) ' Falls schon ein DS mit dieser Bezugsnummer vorhanden ist. + + If NCTS Is Nothing Then NCTS = New DAKOSY_Worker.cDakosyNCTSOut004 + If DY_TMP IsNot Nothing Then NCTS.ncts_dyaAnmID = DY_TMP.dy_Id + + NCTS.ncts_ObjectName = readNCTS_VersandanmeldungXML_DETPRH + + If DY_TMP.dy_AvisoId Is Nothing Then + DY_TMP.tryFindAviso() + DY_TMP.SAVE() + End If + + If DETPRH IsNot Nothing Then + + + If DETPRH.TransitOperation IsNot Nothing Then + If getDatumXMLNothing(DETPRH.TransitOperation.limitDate.Date) IsNot Nothing Then + NCTS.ncts_LimitDate = CDate(getDatumXMLNothing(DETPRH.TransitOperation.limitDate.Date)) + End If + End If + End If + + + frmDYNachrichtenVerarbeitung.tryGetNCTS004BasicData(NCTS) 'Versuchen Daten aus der Vorerfassung zu laden - ansonsten werden diese überschrieben! + + frmDYNachrichtenVerarbeitung.tryGetFirmaNiederlassung(NCTS.ncts_firma, NCTS.ncts_niederlassung, If(AnsprechpTMP_Email, "").ToString, readNCTS_VersandanmeldungXML_DETPRH) + + + If If(NCTS.ncts_Status, 0) <= 50 Then NCTS.ncts_Status = DAKOSY_Worker.cDY_Statusliste.S_50 + ' If If(NCTS.ncts_Status_KEWILL_Equivalent, 0) <= 5 Then NCTS.ncts_Status_KEWILL_Equivalent = DAKOSY_Worker.cDY_Statusliste.S_05 + NCTS.ncts_Status_KEWILL_Equivalent = NCTS.ncts_Status + + + + + + If NCTS.SAVE_ALL() Then + If If(NCTS.ncts_Status, 0) <= 5 Then DAKOSY_Worker.cDakosy_Statusmeldungen.InsertStatusMeldung(DY_TMP, DAKOSY_Worker.cDY_Statusliste.S_50,,,, statusTMP) + Else + readNCTS_VersandanmeldungXML_DETPRH = "" + End If + + + Try + System.IO.File.Delete(p) + Catch ex As Exception + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace & vbNewLine & "Datei: " & Dateiname, System.Reflection.MethodInfo.GetCurrentMethod.Name) + End Try + + FORM.addDGVEinarbeitung("NCTS: Überlassungsmeldung ZOLL DETPRH", readNCTS_VersandanmeldungXML_DETPRH) + + End Using + + End If + + Catch ex As Exception + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace & vbNewLine & "Datei: " & Dateiname, System.Reflection.MethodInfo.GetCurrentMethod.Name) + readNCTS_VersandanmeldungXML_DETPRH = "" + End Try + End Function + Shared Function getDatumXMLNothing(dateTmp) As Object If dateTmp IsNot Nothing AndAlso dateTmp.ToString.Trim <> "" AndAlso IsDate(dateTmp) Then @@ -3786,7 +3878,24 @@ Public Class cWorker_NCTS ' If ATEZ.status IsNot Nothing Then 'If ATEZ.status < 40 Then Dim fio As New IO.FileInfo(filePath) - FileCopy(filePath, "\\ftps.verag.ag\FTP\ATEZ\OUT\" & fio.Name.Replace("lock_", "")) + FileCopy(filePath, "\\ftps.verag.ag\FTP\ATEZ\OUT\" & fio.Name.Replace("lock_", "")) + 'End If + ' End If + End If + End Sub + Shared Sub checkATEZ_Bereitstellung_VBD(dy_BezugsNr As String, filePath As String) + 'If DY_TMP Is Nothing Then Exit Sub + Dim ATEZ = VERAG_PROG_ALLGEMEIN.cATEZ_NCTS_DATA.LOAD_ByBezugsNr(dy_BezugsNr) + If ATEZ IsNot Nothing AndAlso ATEZ.hasEntry Then + ' If ATEZ.status IsNot Nothing Then + 'If ATEZ.status < 40 Then + + Dim NCTS = cDakosyNCTSOut004.LOADByBezugsNr(dy_BezugsNr, False) + If NCTS IsNot Nothing Then + + Dim fio As New IO.FileInfo(filePath) + FileCopy(filePath, "\\ftps.verag.ag\FTP\ATEZ\OUT\PDF\" & If(NCTS.ncts_MRN, fio.Name.Replace("lock_", ""))) + End If 'End If ' End If End If diff --git a/initATLASAufschubkonten/frmDYNachrichtenVerarbeitung.vb b/initATLASAufschubkonten/frmDYNachrichtenVerarbeitung.vb index 66ca7ff..2a76b4c 100644 --- a/initATLASAufschubkonten/frmDYNachrichtenVerarbeitung.vb +++ b/initATLASAufschubkonten/frmDYNachrichtenVerarbeitung.vb @@ -290,6 +290,10 @@ Public Class frmDYNachrichtenVerarbeitung If cWorker_NCTS.readNCTS_VersandanmeldungXML(Me, doc, statusTMP) <> "" Then found = True End If + 'NCTS: Überlassungsmeldung ATLAS 9.1 --> Limit + If Not found AndAlso cGetMsgType.isNCTS_VersandanmeldungXML_DETPRH(doc) Then + If cWorker_NCTS.readNCTS_VersandanmeldungXML_DETPRH(Me, doc, statusTMP) <> "" Then found = True + End If 'NCTS: Ankunftsanzeige diff --git a/initATLASAufschubkonten/frmStartOptions.vb b/initATLASAufschubkonten/frmStartOptions.vb index 6a494a6..bc5ab94 100644 --- a/initATLASAufschubkonten/frmStartOptions.vb +++ b/initATLASAufschubkonten/frmStartOptions.vb @@ -1849,6 +1849,14 @@ Public Class frmStartOptions End If End If + + + '=====ATEZ BEREITSTELLUNG========== + cWorker_NCTS.checkATEZ_Bereitstellung_VBD(betreff.ToString.Trim, destFull) + + '================================== + + ElseIf betreff.ToString.Contains("DAKOSY GE - Abgabenbescheid/Befund , Bezugsnr.: ") Then betreff = betreff.replace("WG: ", "") betreff = betreff.replace("FW: ", "")