From a9591ca6a746859527b9f5ea0fe455437c5b6f1f Mon Sep 17 00:00:00 2001 From: Andreas Luxbauer Date: Sat, 23 Sep 2023 01:18:32 +0200 Subject: [PATCH] ATLAS 9.1 NCTS --- ...nungReferenzbetraegeNCTSDE_002.Designer.vb | 1820 ++ .../AnrechnungReferenzbetraegeNCTSDE_002.xsd | 100 + .../EreignismitteilungNCTSDE_001.Designer.vb | 2870 +++ .../EreignismitteilungNCTSDE_001.xsd | 195 + .../ErledigungsmeldungNCTSDE_003.Designer.vb | 1832 ++ .../ErledigungsmeldungNCTSDE_003.xsd | 106 + .../StatusmeldungNCTSDE_003.Designer.vb | 3424 +++ .../Statusmeldung/StatusmeldungNCTSDE_003.xsd | 226 + ...UeberlassungsmeldungNCTSDE_008.Designer.vb | 15165 ++++++++++++ .../UeberlassungsmeldungNCTSDE_008.xsd | 917 + .../NCTS/Ueberlassungsmeldung/xsd2code.config | 17 + ...ltigkeitSicherheitenNCTSDE_004.Designer.vb | 3360 +++ .../UngueltigkeitSicherheitenNCTSDE_004.xsd | 226 + .../ATLAS_9.1/e_dep_dat.Designer.vb | 19766 ++++++++++++++++ .../Versandanmeldung/ATLAS_9.1/e_dep_dat.xsd | 6469 +++++ .../VersandanmeldungNCTSDE_004.Designer.vb | 10048 ++++++++ .../ATLAS/NCTS/VersandanmeldungNCTSDE_004.xsd | 661 + .../VersandbestaetigungNCTSDE_002.Designer.vb | 1808 ++ .../VersandbestaetigungNCTSDE_002.xsd | 104 + .../DAKOSY/ATLAS/NCTS/cDakosyNCTSOut004.vb | 2580 ++ .../DAKOSY/ATLAS/NCTS/xsd2code.config | 17 + DAKOSY_Worker/DAKOSY_Worker_lib.vbproj | 39 + initATLASAufschubkonten/cGetMsgType.vb | 41 +- initATLASAufschubkonten/cWorker_NCTS.vb | 1284 + .../frmDYNachrichtenVerarbeitung.vb | 54 +- .../frmStartOptions.Designer.vb | 20 +- 26 files changed, 73125 insertions(+), 24 deletions(-) create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/NCTS/AnrechnungReferenzbetraege/AnrechnungReferenzbetraegeNCTSDE_002.Designer.vb create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/NCTS/AnrechnungReferenzbetraege/AnrechnungReferenzbetraegeNCTSDE_002.xsd create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Ereignismitteilung/EreignismitteilungNCTSDE_001.Designer.vb create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Ereignismitteilung/EreignismitteilungNCTSDE_001.xsd create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Erledigungsmeldung/ErledigungsmeldungNCTSDE_003.Designer.vb create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Erledigungsmeldung/ErledigungsmeldungNCTSDE_003.xsd create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Statusmeldung/StatusmeldungNCTSDE_003.Designer.vb create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Statusmeldung/StatusmeldungNCTSDE_003.xsd create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Ueberlassungsmeldung/UeberlassungsmeldungNCTSDE_008.Designer.vb create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Ueberlassungsmeldung/UeberlassungsmeldungNCTSDE_008.xsd create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Ueberlassungsmeldung/xsd2code.config create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/NCTS/UngueltigkeitSicherheit/UngueltigkeitSicherheitenNCTSDE_004.Designer.vb create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/NCTS/UngueltigkeitSicherheit/UngueltigkeitSicherheitenNCTSDE_004.xsd create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Versandanmeldung/ATLAS_9.1/e_dep_dat.Designer.vb create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Versandanmeldung/ATLAS_9.1/e_dep_dat.xsd create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/NCTS/VersandanmeldungNCTSDE_004.Designer.vb create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/NCTS/VersandanmeldungNCTSDE_004.xsd create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Versandbestaetigung/VersandbestaetigungNCTSDE_002.Designer.vb create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Versandbestaetigung/VersandbestaetigungNCTSDE_002.xsd create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/NCTS/cDakosyNCTSOut004.vb create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/NCTS/xsd2code.config diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/AnrechnungReferenzbetraege/AnrechnungReferenzbetraegeNCTSDE_002.Designer.vb b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/AnrechnungReferenzbetraege/AnrechnungReferenzbetraegeNCTSDE_002.Designer.vb new file mode 100644 index 0000000..5a081a8 --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/AnrechnungReferenzbetraege/AnrechnungReferenzbetraegeNCTSDE_002.Designer.vb @@ -0,0 +1,1820 @@ +'' ------------------------------------------------------------------------------ +'' +'' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com +'' {"TargetFramework":"Net47","NameSpace":"AnrechnungReferenzbetraegeNCTSDE_002","Language":"VisualBasic","Properties":{},"XmlAttribute":{"Enabled":true},"ClassParams":{},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{},"JsonOutput":{},"Enabled":true},"Miscellaneous":{}} +'' +'' ------------------------------------------------------------------------------ +#Disable Warning +Imports System +Imports System.Diagnostics +Imports System.Xml.Serialization +Imports System.Runtime.Serialization +Imports System.Collections +Imports System.Xml.Schema +Imports System.ComponentModel +Imports System.Xml +Imports System.IO +Imports System.Text +Imports System.Collections.Generic + +Namespace AnrechnungReferenzbetraegeNCTSDE_002 + + + Partial Public Class AnrechnungReferenzbetraegeMATyp + Inherits DatenaustauschNCTSTyp + +#Region "Private fields" + Private _einzelAnrechnungReferenzbetraege As EinzelAnrechnungReferenzbetraegeTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._einzelAnrechnungReferenzbetraege = New EinzelAnrechnungReferenzbetraegeTyp() + End Sub + + + Public Property EinzelAnrechnungReferenzbetraege() As EinzelAnrechnungReferenzbetraegeTyp + Get + Return Me._einzelAnrechnungReferenzbetraege + End Get + Set + Me._einzelAnrechnungReferenzbetraege = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AnrechnungReferenzbetraegeMATyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AnrechnungReferenzbetraegeMATyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AnrechnungReferenzbetraegeMATyp object + ''' + ''' string to deserialize + ''' Output AnrechnungReferenzbetraegeMATyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AnrechnungReferenzbetraegeMATyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AnrechnungReferenzbetraegeMATyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AnrechnungReferenzbetraegeMATyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AnrechnungReferenzbetraegeMATyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AnrechnungReferenzbetraegeMATyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AnrechnungReferenzbetraegeMATyp + Return CType(SerializerXml.Deserialize(s), AnrechnungReferenzbetraegeMATyp) + End Function +#End Region + + ''' + ''' Serializes current AnrechnungReferenzbetraegeMATyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AnrechnungReferenzbetraegeMATyp object + ''' + ''' File to load and deserialize + ''' Output AnrechnungReferenzbetraegeMATyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AnrechnungReferenzbetraegeMATyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AnrechnungReferenzbetraegeMATyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AnrechnungReferenzbetraegeMATyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AnrechnungReferenzbetraegeMATyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class EinzelAnrechnungReferenzbetraegeTyp + +#Region "Private fields" + Private _objektIdentifizierung As ObjektIdentifizierungMATyp + + Private _kopfDaten As KopfDatenAnrechnungReferenzbetraegeTyp + + Private _transitOperation As TransitOperationMAType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._transitOperation = New TransitOperationMAType() + Me._kopfDaten = New KopfDatenAnrechnungReferenzbetraegeTyp() + Me._objektIdentifizierung = New ObjektIdentifizierungMATyp() + End Sub + + + Public Property ObjektIdentifizierung() As ObjektIdentifizierungMATyp + Get + Return Me._objektIdentifizierung + End Get + Set + Me._objektIdentifizierung = Value + End Set + End Property + + + Public Property KopfDaten() As KopfDatenAnrechnungReferenzbetraegeTyp + Get + Return Me._kopfDaten + End Get + Set + Me._kopfDaten = Value + End Set + End Property + + + Public Property TransitOperation() As TransitOperationMAType + Get + Return Me._transitOperation + End Get + Set + Me._transitOperation = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(EinzelAnrechnungReferenzbetraegeTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize EinzelAnrechnungReferenzbetraegeTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes EinzelAnrechnungReferenzbetraegeTyp object + ''' + ''' string to deserialize + ''' Output EinzelAnrechnungReferenzbetraegeTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelAnrechnungReferenzbetraegeTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EinzelAnrechnungReferenzbetraegeTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelAnrechnungReferenzbetraegeTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As EinzelAnrechnungReferenzbetraegeTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), EinzelAnrechnungReferenzbetraegeTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As EinzelAnrechnungReferenzbetraegeTyp + Return CType(SerializerXml.Deserialize(s), EinzelAnrechnungReferenzbetraegeTyp) + End Function +#End Region + + ''' + ''' Serializes current EinzelAnrechnungReferenzbetraegeTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an EinzelAnrechnungReferenzbetraegeTyp object + ''' + ''' File to load and deserialize + ''' Output EinzelAnrechnungReferenzbetraegeTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelAnrechnungReferenzbetraegeTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EinzelAnrechnungReferenzbetraegeTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelAnrechnungReferenzbetraegeTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As EinzelAnrechnungReferenzbetraegeTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ObjektIdentifizierungMATyp + +#Region "Private fields" + Private _objektName As String + + Private _objektAlias As String + + Private _eDIFACTNachrichtenNr As String + + Private _zeitpunktEingang As Date + + Private _shipmentReferenz As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property ObjektName() As String + Get + Return Me._objektName + End Get + Set + Me._objektName = Value + End Set + End Property + + + Public Property ObjektAlias() As String + Get + Return Me._objektAlias + End Get + Set + Me._objektAlias = Value + End Set + End Property + + + Public Property EDIFACTNachrichtenNr() As String + Get + Return Me._eDIFACTNachrichtenNr + End Get + Set + Me._eDIFACTNachrichtenNr = Value + End Set + End Property + + + Public Property ZeitpunktEingang() As Date + Get + Return Me._zeitpunktEingang + End Get + Set + Me._zeitpunktEingang = Value + End Set + End Property + + + Public Property ShipmentReferenz() As String + Get + Return Me._shipmentReferenz + End Get + Set + Me._shipmentReferenz = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ObjektIdentifizierungMATyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ObjektIdentifizierungMATyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ObjektIdentifizierungMATyp object + ''' + ''' string to deserialize + ''' Output ObjektIdentifizierungMATyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ObjektIdentifizierungMATyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ObjektIdentifizierungMATyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ObjektIdentifizierungMATyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ObjektIdentifizierungMATyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ObjektIdentifizierungMATyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ObjektIdentifizierungMATyp + Return CType(SerializerXml.Deserialize(s), ObjektIdentifizierungMATyp) + End Function +#End Region + + ''' + ''' Serializes current ObjektIdentifizierungMATyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ObjektIdentifizierungMATyp object + ''' + ''' File to load and deserialize + ''' Output ObjektIdentifizierungMATyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ObjektIdentifizierungMATyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ObjektIdentifizierungMATyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ObjektIdentifizierungMATyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ObjektIdentifizierungMATyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ApplicationInternalDataAdditionalDetailsDataType + +#Region "Private fields" + Private _key As String + + Private _value As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Key() As String + Get + Return Me._key + End Get + Set + Me._key = Value + End Set + End Property + + + Public Property Value() As String + Get + Return Me._value + End Get + Set + Me._value = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ApplicationInternalDataAdditionalDetailsDataType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' string to deserialize + ''' Output ApplicationInternalDataAdditionalDetailsDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsDataType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ApplicationInternalDataAdditionalDetailsDataType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ApplicationInternalDataAdditionalDetailsDataType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ApplicationInternalDataAdditionalDetailsDataType + Return CType(SerializerXml.Deserialize(s), ApplicationInternalDataAdditionalDetailsDataType) + End Function +#End Region + + ''' + ''' Serializes current ApplicationInternalDataAdditionalDetailsDataType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' File to load and deserialize + ''' Output ApplicationInternalDataAdditionalDetailsDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsDataType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ApplicationInternalDataAdditionalDetailsDataType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ApplicationInternalDataType + +#Region "Private fields" + Private _additionalDetails As List(Of ApplicationInternalDataAdditionalDetailsDataType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._additionalDetails = New List(Of ApplicationInternalDataAdditionalDetailsDataType)() + End Sub + + + Public Property AdditionalDetails() As List(Of ApplicationInternalDataAdditionalDetailsDataType) + Get + Return Me._additionalDetails + End Get + Set + Me._additionalDetails = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ApplicationInternalDataType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ApplicationInternalDataType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ApplicationInternalDataType object + ''' + ''' string to deserialize + ''' Output ApplicationInternalDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ApplicationInternalDataType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ApplicationInternalDataType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ApplicationInternalDataType + Return CType(SerializerXml.Deserialize(s), ApplicationInternalDataType) + End Function +#End Region + + ''' + ''' Serializes current ApplicationInternalDataType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ApplicationInternalDataType object + ''' + ''' File to load and deserialize + ''' Output ApplicationInternalDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ApplicationInternalDataType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransitOperationMAType + +#Region "Private fields" + Private _mRN As String + + Private _writeOffDateAndTime As Date + + Private _applicationInternalData As ApplicationInternalDataType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._applicationInternalData = New ApplicationInternalDataType() + End Sub + + + Public Property MRN() As String + Get + Return Me._mRN + End Get + Set + Me._mRN = Value + End Set + End Property + + + Public Property WriteOffDateAndTime() As Date + Get + Return Me._writeOffDateAndTime + End Get + Set + Me._writeOffDateAndTime = Value + End Set + End Property + + + Public Property ApplicationInternalData() As ApplicationInternalDataType + Get + Return Me._applicationInternalData + End Get + Set + Me._applicationInternalData = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransitOperationMAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransitOperationMAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransitOperationMAType object + ''' + ''' string to deserialize + ''' Output TransitOperationMAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransitOperationMAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransitOperationMAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransitOperationMAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransitOperationMAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransitOperationMAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransitOperationMAType + Return CType(SerializerXml.Deserialize(s), TransitOperationMAType) + End Function +#End Region + + ''' + ''' Serializes current TransitOperationMAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransitOperationMAType object + ''' + ''' File to load and deserialize + ''' Output TransitOperationMAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransitOperationMAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransitOperationMAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransitOperationMAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransitOperationMAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class KopfDatenAnrechnungReferenzbetraegeTyp + +#Region "Private fields" + Private _mRN As String + + Private _zeitpunktAnrechnungReferenzbetraege As Date + + 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 ZeitpunktAnrechnungReferenzbetraege() As Date + Get + Return Me._zeitpunktAnrechnungReferenzbetraege + End Get + Set + Me._zeitpunktAnrechnungReferenzbetraege = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(KopfDatenAnrechnungReferenzbetraegeTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize KopfDatenAnrechnungReferenzbetraegeTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes KopfDatenAnrechnungReferenzbetraegeTyp object + ''' + ''' string to deserialize + ''' Output KopfDatenAnrechnungReferenzbetraegeTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As KopfDatenAnrechnungReferenzbetraegeTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, KopfDatenAnrechnungReferenzbetraegeTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As KopfDatenAnrechnungReferenzbetraegeTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As KopfDatenAnrechnungReferenzbetraegeTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), KopfDatenAnrechnungReferenzbetraegeTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As KopfDatenAnrechnungReferenzbetraegeTyp + Return CType(SerializerXml.Deserialize(s), KopfDatenAnrechnungReferenzbetraegeTyp) + End Function +#End Region + + ''' + ''' Serializes current KopfDatenAnrechnungReferenzbetraegeTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an KopfDatenAnrechnungReferenzbetraegeTyp object + ''' + ''' File to load and deserialize + ''' Output KopfDatenAnrechnungReferenzbetraegeTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As KopfDatenAnrechnungReferenzbetraegeTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, KopfDatenAnrechnungReferenzbetraegeTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As KopfDatenAnrechnungReferenzbetraegeTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As KopfDatenAnrechnungReferenzbetraegeTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransaktionNCTSTyp + +#Region "Private fields" + Private _iOPartner As String + + Private _iODivision1 As String + + Private _iODivision2 As String + + Private _iODivision3 As String + + Private _iOReferenz As String + + Private _iODatumZeit As Date + + Private _version As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property IOPartner() As String + Get + Return Me._iOPartner + End Get + Set + Me._iOPartner = Value + End Set + End Property + + + Public Property IODivision1() As String + Get + Return Me._iODivision1 + End Get + Set + Me._iODivision1 = Value + End Set + End Property + + + Public Property IODivision2() As String + Get + Return Me._iODivision2 + End Get + Set + Me._iODivision2 = Value + End Set + End Property + + + Public Property IODivision3() As String + Get + Return Me._iODivision3 + End Get + Set + Me._iODivision3 = Value + End Set + End Property + + + Public Property IOReferenz() As String + Get + Return Me._iOReferenz + End Get + Set + Me._iOReferenz = Value + End Set + End Property + + + Public Property IODatumZeit() As Date + Get + Return Me._iODatumZeit + End Get + Set + Me._iODatumZeit = Value + End Set + End Property + + + Public Property Version() As String + Get + Return Me._version + End Get + Set + Me._version = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransaktionNCTSTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransaktionNCTSTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransaktionNCTSTyp object + ''' + ''' string to deserialize + ''' Output TransaktionNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransaktionNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransaktionNCTSTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransaktionNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransaktionNCTSTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransaktionNCTSTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransaktionNCTSTyp + Return CType(SerializerXml.Deserialize(s), TransaktionNCTSTyp) + End Function +#End Region + + ''' + ''' Serializes current TransaktionNCTSTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransaktionNCTSTyp object + ''' + ''' File to load and deserialize + ''' Output TransaktionNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransaktionNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransaktionNCTSTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransaktionNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransaktionNCTSTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DatenaustauschNCTSTyp + +#Region "Private fields" + Private _transaktion As TransaktionNCTSTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._transaktion = New TransaktionNCTSTyp() + End Sub + + + Public Property Transaktion() As TransaktionNCTSTyp + Get + Return Me._transaktion + End Get + Set + Me._transaktion = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DatenaustauschNCTSTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DatenaustauschNCTSTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DatenaustauschNCTSTyp object + ''' + ''' string to deserialize + ''' Output DatenaustauschNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DatenaustauschNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DatenaustauschNCTSTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DatenaustauschNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DatenaustauschNCTSTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DatenaustauschNCTSTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DatenaustauschNCTSTyp + Return CType(SerializerXml.Deserialize(s), DatenaustauschNCTSTyp) + End Function +#End Region + + ''' + ''' Serializes current DatenaustauschNCTSTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DatenaustauschNCTSTyp object + ''' + ''' File to load and deserialize + ''' Output DatenaustauschNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DatenaustauschNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DatenaustauschNCTSTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DatenaustauschNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DatenaustauschNCTSTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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/AnrechnungReferenzbetraege/AnrechnungReferenzbetraegeNCTSDE_002.xsd b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/AnrechnungReferenzbetraege/AnrechnungReferenzbetraegeNCTSDE_002.xsd new file mode 100644 index 0000000..0514258 --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/AnrechnungReferenzbetraege/AnrechnungReferenzbetraegeNCTSDE_002.xsd @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Ereignismitteilung/EreignismitteilungNCTSDE_001.Designer.vb b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Ereignismitteilung/EreignismitteilungNCTSDE_001.Designer.vb new file mode 100644 index 0000000..984aac4 --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Ereignismitteilung/EreignismitteilungNCTSDE_001.Designer.vb @@ -0,0 +1,2870 @@ +'' ------------------------------------------------------------------------------ +'' +'' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com +'' {"TargetFramework":"Net47","NameSpace":"EreignismitteilungNCTSDE_001","Language":"VisualBasic","Properties":{},"XmlAttribute":{"Enabled":true},"ClassParams":{},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{},"JsonOutput":{},"Enabled":true},"Miscellaneous":{}} +'' +'' ------------------------------------------------------------------------------ +#Disable Warning +Imports System +Imports System.Diagnostics +Imports System.Xml.Serialization +Imports System.Runtime.Serialization +Imports System.Collections +Imports System.Xml.Schema +Imports System.ComponentModel +Imports System.Xml +Imports System.IO +Imports System.Text +Imports System.Collections.Generic + +Namespace EreignismitteilungNCTSDE_001 + + + Partial Public Class EreignismitteilungMETyp + Inherits DatenaustauschNCTSTyp + +#Region "Private fields" + Private _einzelEreignismitteilung As EinzelEreignismitteilungTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._einzelEreignismitteilung = New EinzelEreignismitteilungTyp() + End Sub + + + Public Property EinzelEreignismitteilung() As EinzelEreignismitteilungTyp + Get + Return Me._einzelEreignismitteilung + End Get + Set + Me._einzelEreignismitteilung = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(EreignismitteilungMETyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize EreignismitteilungMETyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes EreignismitteilungMETyp object + ''' + ''' string to deserialize + ''' Output EreignismitteilungMETyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EreignismitteilungMETyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EreignismitteilungMETyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EreignismitteilungMETyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As EreignismitteilungMETyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), EreignismitteilungMETyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As EreignismitteilungMETyp + Return CType(SerializerXml.Deserialize(s), EreignismitteilungMETyp) + End Function +#End Region + + ''' + ''' Serializes current EreignismitteilungMETyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an EreignismitteilungMETyp object + ''' + ''' File to load and deserialize + ''' Output EreignismitteilungMETyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EreignismitteilungMETyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EreignismitteilungMETyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EreignismitteilungMETyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As EreignismitteilungMETyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class EinzelEreignismitteilungTyp + +#Region "Private fields" + Private _objektIdentifizierung As ObjektIdentifizierungMETyp + + Private _transitOperation As TransitOperationMEType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._transitOperation = New TransitOperationMEType() + Me._objektIdentifizierung = New ObjektIdentifizierungMETyp() + End Sub + + + Public Property ObjektIdentifizierung() As ObjektIdentifizierungMETyp + Get + Return Me._objektIdentifizierung + End Get + Set + Me._objektIdentifizierung = Value + End Set + End Property + + + Public Property TransitOperation() As TransitOperationMEType + Get + Return Me._transitOperation + End Get + Set + Me._transitOperation = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(EinzelEreignismitteilungTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize EinzelEreignismitteilungTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes EinzelEreignismitteilungTyp object + ''' + ''' string to deserialize + ''' Output EinzelEreignismitteilungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelEreignismitteilungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EinzelEreignismitteilungTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelEreignismitteilungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As EinzelEreignismitteilungTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), EinzelEreignismitteilungTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As EinzelEreignismitteilungTyp + Return CType(SerializerXml.Deserialize(s), EinzelEreignismitteilungTyp) + End Function +#End Region + + ''' + ''' Serializes current EinzelEreignismitteilungTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an EinzelEreignismitteilungTyp object + ''' + ''' File to load and deserialize + ''' Output EinzelEreignismitteilungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelEreignismitteilungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EinzelEreignismitteilungTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelEreignismitteilungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As EinzelEreignismitteilungTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ObjektIdentifizierungMETyp + +#Region "Private fields" + Private _objektName As String + + Private _eDIFACTNachrichtenNr As String + + Private _zeitpunktEingang As Date + + Private _shipmentReferenz As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property ObjektName() As String + Get + Return Me._objektName + End Get + Set + Me._objektName = Value + End Set + End Property + + + Public Property EDIFACTNachrichtenNr() As String + Get + Return Me._eDIFACTNachrichtenNr + End Get + Set + Me._eDIFACTNachrichtenNr = Value + End Set + End Property + + + Public Property ZeitpunktEingang() As Date + Get + Return Me._zeitpunktEingang + End Get + Set + Me._zeitpunktEingang = Value + End Set + End Property + + + Public Property ShipmentReferenz() As String + Get + Return Me._shipmentReferenz + End Get + Set + Me._shipmentReferenz = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ObjektIdentifizierungMETyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ObjektIdentifizierungMETyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ObjektIdentifizierungMETyp object + ''' + ''' string to deserialize + ''' Output ObjektIdentifizierungMETyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ObjektIdentifizierungMETyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ObjektIdentifizierungMETyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ObjektIdentifizierungMETyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ObjektIdentifizierungMETyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ObjektIdentifizierungMETyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ObjektIdentifizierungMETyp + Return CType(SerializerXml.Deserialize(s), ObjektIdentifizierungMETyp) + End Function +#End Region + + ''' + ''' Serializes current ObjektIdentifizierungMETyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ObjektIdentifizierungMETyp object + ''' + ''' File to load and deserialize + ''' Output ObjektIdentifizierungMETyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ObjektIdentifizierungMETyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ObjektIdentifizierungMETyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ObjektIdentifizierungMETyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ObjektIdentifizierungMETyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ApplicationInternalDataAdditionalDetailsDataType + +#Region "Private fields" + Private _key As String + + Private _value As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Key() As String + Get + Return Me._key + End Get + Set + Me._key = Value + End Set + End Property + + + Public Property Value() As String + Get + Return Me._value + End Get + Set + Me._value = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ApplicationInternalDataAdditionalDetailsDataType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' string to deserialize + ''' Output ApplicationInternalDataAdditionalDetailsDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsDataType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ApplicationInternalDataAdditionalDetailsDataType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ApplicationInternalDataAdditionalDetailsDataType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ApplicationInternalDataAdditionalDetailsDataType + Return CType(SerializerXml.Deserialize(s), ApplicationInternalDataAdditionalDetailsDataType) + End Function +#End Region + + ''' + ''' Serializes current ApplicationInternalDataAdditionalDetailsDataType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' File to load and deserialize + ''' Output ApplicationInternalDataAdditionalDetailsDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsDataType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ApplicationInternalDataAdditionalDetailsDataType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ApplicationInternalDataType + +#Region "Private fields" + Private _additionalDetails As List(Of ApplicationInternalDataAdditionalDetailsDataType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._additionalDetails = New List(Of ApplicationInternalDataAdditionalDetailsDataType)() + End Sub + + + Public Property AdditionalDetails() As List(Of ApplicationInternalDataAdditionalDetailsDataType) + Get + Return Me._additionalDetails + End Get + Set + Me._additionalDetails = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ApplicationInternalDataType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ApplicationInternalDataType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ApplicationInternalDataType object + ''' + ''' string to deserialize + ''' Output ApplicationInternalDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ApplicationInternalDataType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ApplicationInternalDataType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ApplicationInternalDataType + Return CType(SerializerXml.Deserialize(s), ApplicationInternalDataType) + End Function +#End Region + + ''' + ''' Serializes current ApplicationInternalDataType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ApplicationInternalDataType object + ''' + ''' File to load and deserialize + ''' Output ApplicationInternalDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ApplicationInternalDataType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TranshipmentMEType + +#Region "Private fields" + Private _containerIndicator As String + + Private _typeOfIdentificationOfTransportMeans As String + + Private _identificationNumberOfTransportMeans As String + + Private _nationalityOfTransportMeans As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property ContainerIndicator() As String + Get + Return Me._containerIndicator + End Get + Set + Me._containerIndicator = Value + End Set + End Property + + + Public Property TypeOfIdentificationOfTransportMeans() As String + Get + Return Me._typeOfIdentificationOfTransportMeans + End Get + Set + Me._typeOfIdentificationOfTransportMeans = Value + End Set + End Property + + + Public Property IdentificationNumberOfTransportMeans() As String + Get + Return Me._identificationNumberOfTransportMeans + End Get + Set + Me._identificationNumberOfTransportMeans = Value + End Set + End Property + + + Public Property NationalityOfTransportMeans() As String + Get + Return Me._nationalityOfTransportMeans + End Get + Set + Me._nationalityOfTransportMeans = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TranshipmentMEType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TranshipmentMEType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TranshipmentMEType object + ''' + ''' string to deserialize + ''' Output TranshipmentMEType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TranshipmentMEType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TranshipmentMEType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TranshipmentMEType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TranshipmentMEType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TranshipmentMEType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TranshipmentMEType + Return CType(SerializerXml.Deserialize(s), TranshipmentMEType) + End Function +#End Region + + ''' + ''' Serializes current TranshipmentMEType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TranshipmentMEType object + ''' + ''' File to load and deserialize + ''' Output TranshipmentMEType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TranshipmentMEType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TranshipmentMEType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TranshipmentMEType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TranshipmentMEType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransportEquipmentMEType + +#Region "Private fields" + Private _numberOfSeals As String + + Private _seal As List(Of String) + + Private _containerIdentificationNumber As String + + Private _goodsReference As List(Of String) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsReference = New List(Of String)() + Me._seal = New List(Of String)() + End Sub + + + Public Property NumberOfSeals() As String + Get + Return Me._numberOfSeals + End Get + Set + Me._numberOfSeals = Value + End Set + End Property + + + Public Property Seal() As List(Of String) + Get + Return Me._seal + End Get + Set + Me._seal = Value + End Set + End Property + + + Public Property ContainerIdentificationNumber() As String + Get + Return Me._containerIdentificationNumber + End Get + Set + Me._containerIdentificationNumber = Value + End Set + End Property + + + Public Property GoodsReference() As List(Of String) + Get + Return Me._goodsReference + End Get + Set + Me._goodsReference = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransportEquipmentMEType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransportEquipmentMEType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransportEquipmentMEType object + ''' + ''' string to deserialize + ''' Output TransportEquipmentMEType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransportEquipmentMEType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransportEquipmentMEType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransportEquipmentMEType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransportEquipmentMEType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransportEquipmentMEType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransportEquipmentMEType + Return CType(SerializerXml.Deserialize(s), TransportEquipmentMEType) + End Function +#End Region + + ''' + ''' Serializes current TransportEquipmentMEType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransportEquipmentMEType object + ''' + ''' File to load and deserialize + ''' Output TransportEquipmentMEType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransportEquipmentMEType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransportEquipmentMEType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransportEquipmentMEType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransportEquipmentMEType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class IncidentMEType + +#Region "Private fields" + Private _code As String + + Private _text As String + + Private _dateOfEndorsement As Date + + Private _authorityOfEndorsement As String + + Private _placeOfEndorsement As String + + Private _countryOfEndorsement As String + + Private _qualifierOfIdentificationOfLocation As String + + Private _countryOfLocation As String + + Private _uNLocode As String + + Private _latitude As String + + Private _longitude As String + + Private _streetAndNumberOfLocation As String + + Private _cityOfLocation As String + + Private _postcodeOfLocation As String + + Private _transportEquipment As List(Of TransportEquipmentMEType) + + Private _transhipment As TranshipmentMEType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._transhipment = New TranshipmentMEType() + Me._transportEquipment = New List(Of TransportEquipmentMEType)() + End Sub + + + 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 + + + Public Property DateOfEndorsement() As Date + Get + Return Me._dateOfEndorsement + End Get + Set + Me._dateOfEndorsement = Value + End Set + End Property + + + Public Property AuthorityOfEndorsement() As String + Get + Return Me._authorityOfEndorsement + End Get + Set + Me._authorityOfEndorsement = Value + End Set + End Property + + + Public Property PlaceOfEndorsement() As String + Get + Return Me._placeOfEndorsement + End Get + Set + Me._placeOfEndorsement = Value + End Set + End Property + + + Public Property CountryOfEndorsement() As String + Get + Return Me._countryOfEndorsement + End Get + Set + Me._countryOfEndorsement = Value + End Set + End Property + + + Public Property QualifierOfIdentificationOfLocation() As String + Get + Return Me._qualifierOfIdentificationOfLocation + End Get + Set + Me._qualifierOfIdentificationOfLocation = Value + End Set + End Property + + + Public Property CountryOfLocation() As String + Get + Return Me._countryOfLocation + End Get + Set + Me._countryOfLocation = Value + End Set + End Property + + + Public Property UNLocode() As String + Get + Return Me._uNLocode + End Get + Set + Me._uNLocode = Value + End Set + End Property + + + Public Property Latitude() As String + Get + Return Me._latitude + End Get + Set + Me._latitude = Value + End Set + End Property + + + Public Property Longitude() As String + Get + Return Me._longitude + End Get + Set + Me._longitude = Value + End Set + End Property + + + Public Property StreetAndNumberOfLocation() As String + Get + Return Me._streetAndNumberOfLocation + End Get + Set + Me._streetAndNumberOfLocation = Value + End Set + End Property + + + Public Property CityOfLocation() As String + Get + Return Me._cityOfLocation + End Get + Set + Me._cityOfLocation = Value + End Set + End Property + + + Public Property PostcodeOfLocation() As String + Get + Return Me._postcodeOfLocation + End Get + Set + Me._postcodeOfLocation = Value + End Set + End Property + + + Public Property TransportEquipment() As List(Of TransportEquipmentMEType) + Get + Return Me._transportEquipment + End Get + Set + Me._transportEquipment = Value + End Set + End Property + + + Public Property Transhipment() As TranshipmentMEType + Get + Return Me._transhipment + End Get + Set + Me._transhipment = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(IncidentMEType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize IncidentMEType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes IncidentMEType object + ''' + ''' string to deserialize + ''' Output IncidentMEType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As IncidentMEType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, IncidentMEType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As IncidentMEType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As IncidentMEType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), IncidentMEType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As IncidentMEType + Return CType(SerializerXml.Deserialize(s), IncidentMEType) + End Function +#End Region + + ''' + ''' Serializes current IncidentMEType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an IncidentMEType object + ''' + ''' File to load and deserialize + ''' Output IncidentMEType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As IncidentMEType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, IncidentMEType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As IncidentMEType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As IncidentMEType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class RepresentativeMEType + +#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(RepresentativeMEType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize RepresentativeMEType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes RepresentativeMEType object + ''' + ''' string to deserialize + ''' Output RepresentativeMEType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As RepresentativeMEType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, RepresentativeMEType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As RepresentativeMEType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As RepresentativeMEType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), RepresentativeMEType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As RepresentativeMEType + Return CType(SerializerXml.Deserialize(s), RepresentativeMEType) + End Function +#End Region + + ''' + ''' Serializes current RepresentativeMEType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an RepresentativeMEType object + ''' + ''' File to load and deserialize + ''' Output RepresentativeMEType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As RepresentativeMEType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, RepresentativeMEType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As RepresentativeMEType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As RepresentativeMEType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class HolderOfTheTransitProcedureMEType + +#Region "Private fields" + Private _identificationNumber As String + + Private _name As String + + Private _streetAndNumber As String + + Private _city As String + + Private _postcode As String + + Private _country As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property IdentificationNumber() As String + Get + Return Me._identificationNumber + End Get + Set + Me._identificationNumber = Value + End Set + End Property + + + Public Property Name() As String + Get + Return Me._name + End Get + Set + Me._name = Value + End Set + End Property + + + Public Property StreetAndNumber() As String + Get + Return Me._streetAndNumber + End Get + Set + Me._streetAndNumber = Value + End Set + End Property + + + Public Property City() As String + Get + Return Me._city + End Get + Set + Me._city = Value + End Set + End Property + + + Public Property Postcode() As String + Get + Return Me._postcode + End Get + Set + Me._postcode = Value + End Set + End Property + + + Public Property Country() As String + Get + Return Me._country + End Get + Set + Me._country = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(HolderOfTheTransitProcedureMEType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize HolderOfTheTransitProcedureMEType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes HolderOfTheTransitProcedureMEType object + ''' + ''' string to deserialize + ''' Output HolderOfTheTransitProcedureMEType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As HolderOfTheTransitProcedureMEType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, HolderOfTheTransitProcedureMEType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As HolderOfTheTransitProcedureMEType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As HolderOfTheTransitProcedureMEType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), HolderOfTheTransitProcedureMEType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As HolderOfTheTransitProcedureMEType + Return CType(SerializerXml.Deserialize(s), HolderOfTheTransitProcedureMEType) + End Function +#End Region + + ''' + ''' Serializes current HolderOfTheTransitProcedureMEType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an HolderOfTheTransitProcedureMEType object + ''' + ''' File to load and deserialize + ''' Output HolderOfTheTransitProcedureMEType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HolderOfTheTransitProcedureMEType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, HolderOfTheTransitProcedureMEType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HolderOfTheTransitProcedureMEType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As HolderOfTheTransitProcedureMEType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransitOperationMEType + +#Region "Private fields" + Private _mRN As String + + Private _incidentNotificationDateAndTime As Date + + Private _customsOfficeOfDeparture As String + + Private _customsOfficeOfIncidentRegistration As String + + Private _holderOfTheTransitProcedure As HolderOfTheTransitProcedureMEType + + Private _representative As RepresentativeMEType + + Private _incident As List(Of IncidentMEType) + + Private _applicationInternalData As ApplicationInternalDataType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._applicationInternalData = New ApplicationInternalDataType() + Me._incident = New List(Of IncidentMEType)() + Me._representative = New RepresentativeMEType() + Me._holderOfTheTransitProcedure = New HolderOfTheTransitProcedureMEType() + End Sub + + + Public Property MRN() As String + Get + Return Me._mRN + End Get + Set + Me._mRN = Value + End Set + End Property + + + Public Property IncidentNotificationDateAndTime() As Date + Get + Return Me._incidentNotificationDateAndTime + End Get + Set + Me._incidentNotificationDateAndTime = Value + End Set + End Property + + + Public Property CustomsOfficeOfDeparture() As String + Get + Return Me._customsOfficeOfDeparture + End Get + Set + Me._customsOfficeOfDeparture = Value + End Set + End Property + + + Public Property CustomsOfficeOfIncidentRegistration() As String + Get + Return Me._customsOfficeOfIncidentRegistration + End Get + Set + Me._customsOfficeOfIncidentRegistration = Value + End Set + End Property + + + Public Property HolderOfTheTransitProcedure() As HolderOfTheTransitProcedureMEType + Get + Return Me._holderOfTheTransitProcedure + End Get + Set + Me._holderOfTheTransitProcedure = Value + End Set + End Property + + + Public Property Representative() As RepresentativeMEType + Get + Return Me._representative + End Get + Set + Me._representative = Value + End Set + End Property + + + Public Property Incident() As List(Of IncidentMEType) + Get + Return Me._incident + End Get + Set + Me._incident = Value + End Set + End Property + + + Public Property ApplicationInternalData() As ApplicationInternalDataType + Get + Return Me._applicationInternalData + End Get + Set + Me._applicationInternalData = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransitOperationMEType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransitOperationMEType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransitOperationMEType object + ''' + ''' string to deserialize + ''' Output TransitOperationMEType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransitOperationMEType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransitOperationMEType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransitOperationMEType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransitOperationMEType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransitOperationMEType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransitOperationMEType + Return CType(SerializerXml.Deserialize(s), TransitOperationMEType) + End Function +#End Region + + ''' + ''' Serializes current TransitOperationMEType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransitOperationMEType object + ''' + ''' File to load and deserialize + ''' Output TransitOperationMEType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransitOperationMEType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransitOperationMEType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransitOperationMEType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransitOperationMEType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransaktionNCTSTyp + +#Region "Private fields" + Private _iOPartner As String + + Private _iODivision1 As String + + Private _iODivision2 As String + + Private _iODivision3 As String + + Private _iOReferenz As String + + Private _iODatumZeit As Date + + Private _version As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property IOPartner() As String + Get + Return Me._iOPartner + End Get + Set + Me._iOPartner = Value + End Set + End Property + + + Public Property IODivision1() As String + Get + Return Me._iODivision1 + End Get + Set + Me._iODivision1 = Value + End Set + End Property + + + Public Property IODivision2() As String + Get + Return Me._iODivision2 + End Get + Set + Me._iODivision2 = Value + End Set + End Property + + + Public Property IODivision3() As String + Get + Return Me._iODivision3 + End Get + Set + Me._iODivision3 = Value + End Set + End Property + + + Public Property IOReferenz() As String + Get + Return Me._iOReferenz + End Get + Set + Me._iOReferenz = Value + End Set + End Property + + + Public Property IODatumZeit() As Date + Get + Return Me._iODatumZeit + End Get + Set + Me._iODatumZeit = Value + End Set + End Property + + + Public Property Version() As String + Get + Return Me._version + End Get + Set + Me._version = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransaktionNCTSTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransaktionNCTSTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransaktionNCTSTyp object + ''' + ''' string to deserialize + ''' Output TransaktionNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransaktionNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransaktionNCTSTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransaktionNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransaktionNCTSTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransaktionNCTSTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransaktionNCTSTyp + Return CType(SerializerXml.Deserialize(s), TransaktionNCTSTyp) + End Function +#End Region + + ''' + ''' Serializes current TransaktionNCTSTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransaktionNCTSTyp object + ''' + ''' File to load and deserialize + ''' Output TransaktionNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransaktionNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransaktionNCTSTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransaktionNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransaktionNCTSTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DatenaustauschNCTSTyp + +#Region "Private fields" + Private _transaktion As TransaktionNCTSTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._transaktion = New TransaktionNCTSTyp() + End Sub + + + Public Property Transaktion() As TransaktionNCTSTyp + Get + Return Me._transaktion + End Get + Set + Me._transaktion = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DatenaustauschNCTSTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DatenaustauschNCTSTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DatenaustauschNCTSTyp object + ''' + ''' string to deserialize + ''' Output DatenaustauschNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DatenaustauschNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DatenaustauschNCTSTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DatenaustauschNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DatenaustauschNCTSTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DatenaustauschNCTSTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DatenaustauschNCTSTyp + Return CType(SerializerXml.Deserialize(s), DatenaustauschNCTSTyp) + End Function +#End Region + + ''' + ''' Serializes current DatenaustauschNCTSTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DatenaustauschNCTSTyp object + ''' + ''' File to load and deserialize + ''' Output DatenaustauschNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DatenaustauschNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DatenaustauschNCTSTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DatenaustauschNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DatenaustauschNCTSTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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/Ereignismitteilung/EreignismitteilungNCTSDE_001.xsd b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Ereignismitteilung/EreignismitteilungNCTSDE_001.xsd new file mode 100644 index 0000000..3bff425 --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Ereignismitteilung/EreignismitteilungNCTSDE_001.xsd @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Erledigungsmeldung/ErledigungsmeldungNCTSDE_003.Designer.vb b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Erledigungsmeldung/ErledigungsmeldungNCTSDE_003.Designer.vb new file mode 100644 index 0000000..de4c9a3 --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Erledigungsmeldung/ErledigungsmeldungNCTSDE_003.Designer.vb @@ -0,0 +1,1832 @@ +'' ------------------------------------------------------------------------------ +'' +'' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com +'' {"TargetFramework":"Net47","NameSpace":"ErledigungsmeldungNCTSDE_003","Language":"VisualBasic","Properties":{},"XmlAttribute":{"Enabled":true},"ClassParams":{},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{},"JsonOutput":{},"Enabled":true},"Miscellaneous":{}} +'' +'' ------------------------------------------------------------------------------ +#Disable Warning +Imports System +Imports System.Diagnostics +Imports System.Xml.Serialization +Imports System.Runtime.Serialization +Imports System.Collections +Imports System.Xml.Schema +Imports System.ComponentModel +Imports System.Xml +Imports System.IO +Imports System.Text +Imports System.Collections.Generic + +Namespace ErledigungsmeldungNCTSDE_003 + + + Partial Public Class ErledigungsmeldungMOTyp + Inherits DatenaustauschNCTSTyp + +#Region "Private fields" + Private _einzelErledigungsmeldung As EinzelErledigungsmeldungTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._einzelErledigungsmeldung = New EinzelErledigungsmeldungTyp() + End Sub + + + Public Property EinzelErledigungsmeldung() As EinzelErledigungsmeldungTyp + Get + Return Me._einzelErledigungsmeldung + End Get + Set + Me._einzelErledigungsmeldung = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ErledigungsmeldungMOTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ErledigungsmeldungMOTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ErledigungsmeldungMOTyp object + ''' + ''' string to deserialize + ''' Output ErledigungsmeldungMOTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ErledigungsmeldungMOTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ErledigungsmeldungMOTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ErledigungsmeldungMOTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ErledigungsmeldungMOTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ErledigungsmeldungMOTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ErledigungsmeldungMOTyp + Return CType(SerializerXml.Deserialize(s), ErledigungsmeldungMOTyp) + End Function +#End Region + + ''' + ''' Serializes current ErledigungsmeldungMOTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ErledigungsmeldungMOTyp object + ''' + ''' File to load and deserialize + ''' Output ErledigungsmeldungMOTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ErledigungsmeldungMOTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ErledigungsmeldungMOTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ErledigungsmeldungMOTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ErledigungsmeldungMOTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class EinzelErledigungsmeldungTyp + +#Region "Private fields" + Private _objektIdentifizierung As ObjektIdentifizierungMOTyp + + Private _kopfDaten As KopfDatenErledigungsmeldungTyp + + Private _transitOperation As TransitOperationMOType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._transitOperation = New TransitOperationMOType() + Me._kopfDaten = New KopfDatenErledigungsmeldungTyp() + Me._objektIdentifizierung = New ObjektIdentifizierungMOTyp() + End Sub + + + Public Property ObjektIdentifizierung() As ObjektIdentifizierungMOTyp + Get + Return Me._objektIdentifizierung + End Get + Set + Me._objektIdentifizierung = Value + End Set + End Property + + + Public Property KopfDaten() As KopfDatenErledigungsmeldungTyp + Get + Return Me._kopfDaten + End Get + Set + Me._kopfDaten = Value + End Set + End Property + + + Public Property TransitOperation() As TransitOperationMOType + Get + Return Me._transitOperation + End Get + Set + Me._transitOperation = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(EinzelErledigungsmeldungTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize EinzelErledigungsmeldungTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes EinzelErledigungsmeldungTyp object + ''' + ''' string to deserialize + ''' Output EinzelErledigungsmeldungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelErledigungsmeldungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EinzelErledigungsmeldungTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelErledigungsmeldungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As EinzelErledigungsmeldungTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), EinzelErledigungsmeldungTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As EinzelErledigungsmeldungTyp + Return CType(SerializerXml.Deserialize(s), EinzelErledigungsmeldungTyp) + End Function +#End Region + + ''' + ''' Serializes current EinzelErledigungsmeldungTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an EinzelErledigungsmeldungTyp object + ''' + ''' File to load and deserialize + ''' Output EinzelErledigungsmeldungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelErledigungsmeldungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EinzelErledigungsmeldungTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelErledigungsmeldungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As EinzelErledigungsmeldungTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ObjektIdentifizierungMOTyp + +#Region "Private fields" + Private _objektName As String + + Private _objektAlias As String + + Private _eDIFACTNachrichtenNr As String + + Private _zeitpunktEingang As Date + + Private _shipmentReferenz As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property ObjektName() As String + Get + Return Me._objektName + End Get + Set + Me._objektName = Value + End Set + End Property + + + Public Property ObjektAlias() As String + Get + Return Me._objektAlias + End Get + Set + Me._objektAlias = Value + End Set + End Property + + + Public Property EDIFACTNachrichtenNr() As String + Get + Return Me._eDIFACTNachrichtenNr + End Get + Set + Me._eDIFACTNachrichtenNr = Value + End Set + End Property + + + Public Property ZeitpunktEingang() As Date + Get + Return Me._zeitpunktEingang + End Get + Set + Me._zeitpunktEingang = Value + End Set + End Property + + + Public Property ShipmentReferenz() As String + Get + Return Me._shipmentReferenz + End Get + Set + Me._shipmentReferenz = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ObjektIdentifizierungMOTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ObjektIdentifizierungMOTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ObjektIdentifizierungMOTyp object + ''' + ''' string to deserialize + ''' Output ObjektIdentifizierungMOTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ObjektIdentifizierungMOTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ObjektIdentifizierungMOTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ObjektIdentifizierungMOTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ObjektIdentifizierungMOTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ObjektIdentifizierungMOTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ObjektIdentifizierungMOTyp + Return CType(SerializerXml.Deserialize(s), ObjektIdentifizierungMOTyp) + End Function +#End Region + + ''' + ''' Serializes current ObjektIdentifizierungMOTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ObjektIdentifizierungMOTyp object + ''' + ''' File to load and deserialize + ''' Output ObjektIdentifizierungMOTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ObjektIdentifizierungMOTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ObjektIdentifizierungMOTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ObjektIdentifizierungMOTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ObjektIdentifizierungMOTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ApplicationInternalDataAdditionalDetailsDataType + +#Region "Private fields" + Private _key As String + + Private _value As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Key() As String + Get + Return Me._key + End Get + Set + Me._key = Value + End Set + End Property + + + Public Property Value() As String + Get + Return Me._value + End Get + Set + Me._value = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ApplicationInternalDataAdditionalDetailsDataType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' string to deserialize + ''' Output ApplicationInternalDataAdditionalDetailsDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsDataType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ApplicationInternalDataAdditionalDetailsDataType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ApplicationInternalDataAdditionalDetailsDataType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ApplicationInternalDataAdditionalDetailsDataType + Return CType(SerializerXml.Deserialize(s), ApplicationInternalDataAdditionalDetailsDataType) + End Function +#End Region + + ''' + ''' Serializes current ApplicationInternalDataAdditionalDetailsDataType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' File to load and deserialize + ''' Output ApplicationInternalDataAdditionalDetailsDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsDataType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ApplicationInternalDataAdditionalDetailsDataType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ApplicationInternalDataType + +#Region "Private fields" + Private _additionalDetails As List(Of ApplicationInternalDataAdditionalDetailsDataType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._additionalDetails = New List(Of ApplicationInternalDataAdditionalDetailsDataType)() + End Sub + + + Public Property AdditionalDetails() As List(Of ApplicationInternalDataAdditionalDetailsDataType) + Get + Return Me._additionalDetails + End Get + Set + Me._additionalDetails = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ApplicationInternalDataType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ApplicationInternalDataType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ApplicationInternalDataType object + ''' + ''' string to deserialize + ''' Output ApplicationInternalDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ApplicationInternalDataType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ApplicationInternalDataType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ApplicationInternalDataType + Return CType(SerializerXml.Deserialize(s), ApplicationInternalDataType) + End Function +#End Region + + ''' + ''' Serializes current ApplicationInternalDataType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ApplicationInternalDataType object + ''' + ''' File to load and deserialize + ''' Output ApplicationInternalDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ApplicationInternalDataType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransitOperationMOType + +#Region "Private fields" + Private _departureStatus As String + + Private _mRN As String + + Private _completionDateAndTime As Date + + Private _applicationInternalData As ApplicationInternalDataType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._applicationInternalData = New ApplicationInternalDataType() + End Sub + + + Public Property DepartureStatus() As String + Get + Return Me._departureStatus + End Get + Set + Me._departureStatus = 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 CompletionDateAndTime() As Date + Get + Return Me._completionDateAndTime + End Get + Set + Me._completionDateAndTime = Value + End Set + End Property + + + Public Property ApplicationInternalData() As ApplicationInternalDataType + Get + Return Me._applicationInternalData + End Get + Set + Me._applicationInternalData = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransitOperationMOType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransitOperationMOType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransitOperationMOType object + ''' + ''' string to deserialize + ''' Output TransitOperationMOType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransitOperationMOType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransitOperationMOType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransitOperationMOType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransitOperationMOType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransitOperationMOType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransitOperationMOType + Return CType(SerializerXml.Deserialize(s), TransitOperationMOType) + End Function +#End Region + + ''' + ''' Serializes current TransitOperationMOType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransitOperationMOType object + ''' + ''' File to load and deserialize + ''' Output TransitOperationMOType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransitOperationMOType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransitOperationMOType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransitOperationMOType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransitOperationMOType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class KopfDatenErledigungsmeldungTyp + +#Region "Private fields" + Private _mRN As String + + Private _zeitpunktErledigung As Date + + 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 ZeitpunktErledigung() As Date + Get + Return Me._zeitpunktErledigung + End Get + Set + Me._zeitpunktErledigung = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(KopfDatenErledigungsmeldungTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize KopfDatenErledigungsmeldungTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes KopfDatenErledigungsmeldungTyp object + ''' + ''' string to deserialize + ''' Output KopfDatenErledigungsmeldungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As KopfDatenErledigungsmeldungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, KopfDatenErledigungsmeldungTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As KopfDatenErledigungsmeldungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As KopfDatenErledigungsmeldungTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), KopfDatenErledigungsmeldungTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As KopfDatenErledigungsmeldungTyp + Return CType(SerializerXml.Deserialize(s), KopfDatenErledigungsmeldungTyp) + End Function +#End Region + + ''' + ''' Serializes current KopfDatenErledigungsmeldungTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an KopfDatenErledigungsmeldungTyp object + ''' + ''' File to load and deserialize + ''' Output KopfDatenErledigungsmeldungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As KopfDatenErledigungsmeldungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, KopfDatenErledigungsmeldungTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As KopfDatenErledigungsmeldungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As KopfDatenErledigungsmeldungTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransaktionNCTSTyp + +#Region "Private fields" + Private _iOPartner As String + + Private _iODivision1 As String + + Private _iODivision2 As String + + Private _iODivision3 As String + + Private _iOReferenz As String + + Private _iODatumZeit As Date + + Private _version As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property IOPartner() As String + Get + Return Me._iOPartner + End Get + Set + Me._iOPartner = Value + End Set + End Property + + + Public Property IODivision1() As String + Get + Return Me._iODivision1 + End Get + Set + Me._iODivision1 = Value + End Set + End Property + + + Public Property IODivision2() As String + Get + Return Me._iODivision2 + End Get + Set + Me._iODivision2 = Value + End Set + End Property + + + Public Property IODivision3() As String + Get + Return Me._iODivision3 + End Get + Set + Me._iODivision3 = Value + End Set + End Property + + + Public Property IOReferenz() As String + Get + Return Me._iOReferenz + End Get + Set + Me._iOReferenz = Value + End Set + End Property + + + Public Property IODatumZeit() As Date + Get + Return Me._iODatumZeit + End Get + Set + Me._iODatumZeit = Value + End Set + End Property + + + Public Property Version() As String + Get + Return Me._version + End Get + Set + Me._version = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransaktionNCTSTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransaktionNCTSTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransaktionNCTSTyp object + ''' + ''' string to deserialize + ''' Output TransaktionNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransaktionNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransaktionNCTSTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransaktionNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransaktionNCTSTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransaktionNCTSTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransaktionNCTSTyp + Return CType(SerializerXml.Deserialize(s), TransaktionNCTSTyp) + End Function +#End Region + + ''' + ''' Serializes current TransaktionNCTSTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransaktionNCTSTyp object + ''' + ''' File to load and deserialize + ''' Output TransaktionNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransaktionNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransaktionNCTSTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransaktionNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransaktionNCTSTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DatenaustauschNCTSTyp + +#Region "Private fields" + Private _transaktion As TransaktionNCTSTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._transaktion = New TransaktionNCTSTyp() + End Sub + + + Public Property Transaktion() As TransaktionNCTSTyp + Get + Return Me._transaktion + End Get + Set + Me._transaktion = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DatenaustauschNCTSTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DatenaustauschNCTSTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DatenaustauschNCTSTyp object + ''' + ''' string to deserialize + ''' Output DatenaustauschNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DatenaustauschNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DatenaustauschNCTSTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DatenaustauschNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DatenaustauschNCTSTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DatenaustauschNCTSTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DatenaustauschNCTSTyp + Return CType(SerializerXml.Deserialize(s), DatenaustauschNCTSTyp) + End Function +#End Region + + ''' + ''' Serializes current DatenaustauschNCTSTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DatenaustauschNCTSTyp object + ''' + ''' File to load and deserialize + ''' Output DatenaustauschNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DatenaustauschNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DatenaustauschNCTSTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DatenaustauschNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DatenaustauschNCTSTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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/Erledigungsmeldung/ErledigungsmeldungNCTSDE_003.xsd b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Erledigungsmeldung/ErledigungsmeldungNCTSDE_003.xsd new file mode 100644 index 0000000..b428ad9 --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Erledigungsmeldung/ErledigungsmeldungNCTSDE_003.xsd @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Statusmeldung/StatusmeldungNCTSDE_003.Designer.vb b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Statusmeldung/StatusmeldungNCTSDE_003.Designer.vb new file mode 100644 index 0000000..d580f4d --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Statusmeldung/StatusmeldungNCTSDE_003.Designer.vb @@ -0,0 +1,3424 @@ +'' ------------------------------------------------------------------------------ +'' +'' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com +'' {"TargetFramework":"Net47","NameSpace":"StatusmeldungNCTSDE_003","Language":"VisualBasic","Properties":{},"XmlAttribute":{"Enabled":true},"ClassParams":{},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{},"JsonOutput":{},"Enabled":true},"Miscellaneous":{}} +'' +'' ------------------------------------------------------------------------------ +#Disable Warning +Imports System +Imports System.Diagnostics +Imports System.Xml.Serialization +Imports System.Runtime.Serialization +Imports System.Collections +Imports System.Xml.Schema +Imports System.ComponentModel +Imports System.Xml +Imports System.IO +Imports System.Text +Imports System.Collections.Generic + +Namespace StatusmeldungNCTSDE_003 + + + Partial Public Class StatusmeldungMSTyp + Inherits DatenaustauschNCTSTyp + +#Region "Private fields" + Private _einzelStatusmeldung As EinzelStatusmeldungTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._einzelStatusmeldung = New EinzelStatusmeldungTyp() + End Sub + + + Public Property EinzelStatusmeldung() As EinzelStatusmeldungTyp + Get + Return Me._einzelStatusmeldung + End Get + Set + Me._einzelStatusmeldung = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(StatusmeldungMSTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize StatusmeldungMSTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes StatusmeldungMSTyp object + ''' + ''' string to deserialize + ''' Output StatusmeldungMSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As StatusmeldungMSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, StatusmeldungMSTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As StatusmeldungMSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As StatusmeldungMSTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), StatusmeldungMSTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As StatusmeldungMSTyp + Return CType(SerializerXml.Deserialize(s), StatusmeldungMSTyp) + End Function +#End Region + + ''' + ''' Serializes current StatusmeldungMSTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an StatusmeldungMSTyp object + ''' + ''' File to load and deserialize + ''' Output StatusmeldungMSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As StatusmeldungMSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, StatusmeldungMSTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As StatusmeldungMSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As StatusmeldungMSTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class EinzelStatusmeldungTyp + +#Region "Private fields" + Private _objektIdentifizierung As ObjektIdentifizierungMSTyp + + Private _kopfDaten As KopfDatenStatusmeldungTyp + + Private _transitOperation As TransitOperationMSType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._transitOperation = New TransitOperationMSType() + Me._kopfDaten = New KopfDatenStatusmeldungTyp() + Me._objektIdentifizierung = New ObjektIdentifizierungMSTyp() + End Sub + + + Public Property ObjektIdentifizierung() As ObjektIdentifizierungMSTyp + Get + Return Me._objektIdentifizierung + End Get + Set + Me._objektIdentifizierung = Value + End Set + End Property + + + Public Property KopfDaten() As KopfDatenStatusmeldungTyp + Get + Return Me._kopfDaten + End Get + Set + Me._kopfDaten = Value + End Set + End Property + + + Public Property TransitOperation() As TransitOperationMSType + Get + Return Me._transitOperation + End Get + Set + Me._transitOperation = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(EinzelStatusmeldungTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize EinzelStatusmeldungTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes EinzelStatusmeldungTyp object + ''' + ''' string to deserialize + ''' Output EinzelStatusmeldungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelStatusmeldungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EinzelStatusmeldungTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelStatusmeldungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As EinzelStatusmeldungTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), EinzelStatusmeldungTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As EinzelStatusmeldungTyp + Return CType(SerializerXml.Deserialize(s), EinzelStatusmeldungTyp) + End Function +#End Region + + ''' + ''' Serializes current EinzelStatusmeldungTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an EinzelStatusmeldungTyp object + ''' + ''' File to load and deserialize + ''' Output EinzelStatusmeldungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelStatusmeldungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EinzelStatusmeldungTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelStatusmeldungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As EinzelStatusmeldungTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ObjektIdentifizierungMSTyp + +#Region "Private fields" + Private _objektName As String + + Private _objektAlias As String + + Private _eDIFACTNachrichtenNr As String + + Private _zeitpunktEingang As Date + + Private _shipmentReferenz As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property ObjektName() As String + Get + Return Me._objektName + End Get + Set + Me._objektName = Value + End Set + End Property + + + Public Property ObjektAlias() As String + Get + Return Me._objektAlias + End Get + Set + Me._objektAlias = Value + End Set + End Property + + + Public Property EDIFACTNachrichtenNr() As String + Get + Return Me._eDIFACTNachrichtenNr + End Get + Set + Me._eDIFACTNachrichtenNr = Value + End Set + End Property + + + Public Property ZeitpunktEingang() As Date + Get + Return Me._zeitpunktEingang + End Get + Set + Me._zeitpunktEingang = Value + End Set + End Property + + + Public Property ShipmentReferenz() As String + Get + Return Me._shipmentReferenz + End Get + Set + Me._shipmentReferenz = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ObjektIdentifizierungMSTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ObjektIdentifizierungMSTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ObjektIdentifizierungMSTyp object + ''' + ''' string to deserialize + ''' Output ObjektIdentifizierungMSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ObjektIdentifizierungMSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ObjektIdentifizierungMSTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ObjektIdentifizierungMSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ObjektIdentifizierungMSTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ObjektIdentifizierungMSTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ObjektIdentifizierungMSTyp + Return CType(SerializerXml.Deserialize(s), ObjektIdentifizierungMSTyp) + End Function +#End Region + + ''' + ''' Serializes current ObjektIdentifizierungMSTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ObjektIdentifizierungMSTyp object + ''' + ''' File to load and deserialize + ''' Output ObjektIdentifizierungMSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ObjektIdentifizierungMSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ObjektIdentifizierungMSTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ObjektIdentifizierungMSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ObjektIdentifizierungMSTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ApplicationInternalDataAdditionalDetailsDataType + +#Region "Private fields" + Private _key As String + + Private _value As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Key() As String + Get + Return Me._key + End Get + Set + Me._key = Value + End Set + End Property + + + Public Property Value() As String + Get + Return Me._value + End Get + Set + Me._value = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ApplicationInternalDataAdditionalDetailsDataType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' string to deserialize + ''' Output ApplicationInternalDataAdditionalDetailsDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsDataType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ApplicationInternalDataAdditionalDetailsDataType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ApplicationInternalDataAdditionalDetailsDataType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ApplicationInternalDataAdditionalDetailsDataType + Return CType(SerializerXml.Deserialize(s), ApplicationInternalDataAdditionalDetailsDataType) + End Function +#End Region + + ''' + ''' Serializes current ApplicationInternalDataAdditionalDetailsDataType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' File to load and deserialize + ''' Output ApplicationInternalDataAdditionalDetailsDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsDataType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ApplicationInternalDataAdditionalDetailsDataType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ApplicationInternalDataType + +#Region "Private fields" + Private _additionalDetails As List(Of ApplicationInternalDataAdditionalDetailsDataType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._additionalDetails = New List(Of ApplicationInternalDataAdditionalDetailsDataType)() + End Sub + + + Public Property AdditionalDetails() As List(Of ApplicationInternalDataAdditionalDetailsDataType) + Get + Return Me._additionalDetails + End Get + Set + Me._additionalDetails = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ApplicationInternalDataType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ApplicationInternalDataType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ApplicationInternalDataType object + ''' + ''' string to deserialize + ''' Output ApplicationInternalDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ApplicationInternalDataType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ApplicationInternalDataType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ApplicationInternalDataType + Return CType(SerializerXml.Deserialize(s), ApplicationInternalDataType) + End Function +#End Region + + ''' + ''' Serializes current ApplicationInternalDataType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ApplicationInternalDataType object + ''' + ''' File to load and deserialize + ''' Output ApplicationInternalDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ApplicationInternalDataType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ErrorMSType + +#Region "Private fields" + Private _errorCode As String + + Private _errorText As String + + Private _errorPointer As String + + Private _originalAttributeValue As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property ErrorCode() As String + Get + Return Me._errorCode + End Get + Set + Me._errorCode = Value + End Set + End Property + + + Public Property ErrorText() As String + Get + Return Me._errorText + End Get + Set + Me._errorText = Value + End Set + End Property + + + Public Property ErrorPointer() As String + Get + Return Me._errorPointer + End Get + Set + Me._errorPointer = Value + End Set + End Property + + + Public Property OriginalAttributeValue() As String + Get + Return Me._originalAttributeValue + End Get + Set + Me._originalAttributeValue = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ErrorMSType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ErrorMSType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ErrorMSType object + ''' + ''' string to deserialize + ''' Output ErrorMSType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ErrorMSType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ErrorMSType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ErrorMSType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ErrorMSType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ErrorMSType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ErrorMSType + Return CType(SerializerXml.Deserialize(s), ErrorMSType) + End Function +#End Region + + ''' + ''' Serializes current ErrorMSType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ErrorMSType object + ''' + ''' File to load and deserialize + ''' Output ErrorMSType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ErrorMSType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ErrorMSType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ErrorMSType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ErrorMSType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class RepresentativeMSType + +#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(RepresentativeMSType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize RepresentativeMSType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes RepresentativeMSType object + ''' + ''' string to deserialize + ''' Output RepresentativeMSType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As RepresentativeMSType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, RepresentativeMSType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As RepresentativeMSType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As RepresentativeMSType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), RepresentativeMSType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As RepresentativeMSType + Return CType(SerializerXml.Deserialize(s), RepresentativeMSType) + End Function +#End Region + + ''' + ''' Serializes current RepresentativeMSType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an RepresentativeMSType object + ''' + ''' File to load and deserialize + ''' Output RepresentativeMSType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As RepresentativeMSType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, RepresentativeMSType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As RepresentativeMSType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As RepresentativeMSType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class HolderOfTheTransitProcedureMSType + +#Region "Private fields" + Private _identificationNumber As String + + Private _name As String + + Private _streetAndNumber As String + + Private _city As String + + Private _postcode As String + + Private _country As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property IdentificationNumber() As String + Get + Return Me._identificationNumber + End Get + Set + Me._identificationNumber = Value + End Set + End Property + + + Public Property Name() As String + Get + Return Me._name + End Get + Set + Me._name = Value + End Set + End Property + + + Public Property StreetAndNumber() As String + Get + Return Me._streetAndNumber + End Get + Set + Me._streetAndNumber = Value + End Set + End Property + + + Public Property City() As String + Get + Return Me._city + End Get + Set + Me._city = Value + End Set + End Property + + + Public Property Postcode() As String + Get + Return Me._postcode + End Get + Set + Me._postcode = Value + End Set + End Property + + + Public Property Country() As String + Get + Return Me._country + End Get + Set + Me._country = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(HolderOfTheTransitProcedureMSType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize HolderOfTheTransitProcedureMSType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes HolderOfTheTransitProcedureMSType object + ''' + ''' string to deserialize + ''' Output HolderOfTheTransitProcedureMSType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As HolderOfTheTransitProcedureMSType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, HolderOfTheTransitProcedureMSType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As HolderOfTheTransitProcedureMSType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As HolderOfTheTransitProcedureMSType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), HolderOfTheTransitProcedureMSType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As HolderOfTheTransitProcedureMSType + Return CType(SerializerXml.Deserialize(s), HolderOfTheTransitProcedureMSType) + End Function +#End Region + + ''' + ''' Serializes current HolderOfTheTransitProcedureMSType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an HolderOfTheTransitProcedureMSType object + ''' + ''' File to load and deserialize + ''' Output HolderOfTheTransitProcedureMSType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HolderOfTheTransitProcedureMSType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, HolderOfTheTransitProcedureMSType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HolderOfTheTransitProcedureMSType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As HolderOfTheTransitProcedureMSType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransitOperationMSType + +#Region "Private fields" + Private _departureStatus As String + + Private _rejectionCode As String + + Private _mRN As String + + Private _receptionDateAndTime As Date + + Private _declarationAcceptanceDateAndTime As Date + + Private _releaseDateAndTime As Date + + Private _cancellationDecisionDateAndTime As Date + + Private _cessationDateAndTime As Date + + Private _rejectionDateAndTime As Date + + Private _reason As String + + Private _customsOfficeOfDeparture As String + + Private _holderOfTheTransitProcedure As HolderOfTheTransitProcedureMSType + + Private _representative As RepresentativeMSType + + Private _error As List(Of ErrorMSType) + + Private _applicationInternalData As ApplicationInternalDataType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._applicationInternalData = New ApplicationInternalDataType() + Me._error = New List(Of ErrorMSType)() + Me._representative = New RepresentativeMSType() + Me._holderOfTheTransitProcedure = New HolderOfTheTransitProcedureMSType() + End Sub + + + Public Property DepartureStatus() As String + Get + Return Me._departureStatus + End Get + Set + Me._departureStatus = Value + End Set + End Property + + + Public Property RejectionCode() As String + Get + Return Me._rejectionCode + End Get + Set + Me._rejectionCode = 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 ReceptionDateAndTime() As Date + Get + Return Me._receptionDateAndTime + End Get + Set + Me._receptionDateAndTime = 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 CancellationDecisionDateAndTime() As Date + Get + Return Me._cancellationDecisionDateAndTime + End Get + Set + Me._cancellationDecisionDateAndTime = Value + End Set + End Property + + + Public Property CessationDateAndTime() As Date + Get + Return Me._cessationDateAndTime + End Get + Set + Me._cessationDateAndTime = Value + End Set + End Property + + + Public Property RejectionDateAndTime() As Date + Get + Return Me._rejectionDateAndTime + End Get + Set + Me._rejectionDateAndTime = Value + End Set + End Property + + + Public Property Reason() As String + Get + Return Me._reason + End Get + Set + Me._reason = Value + End Set + End Property + + + Public Property CustomsOfficeOfDeparture() As String + Get + Return Me._customsOfficeOfDeparture + End Get + Set + Me._customsOfficeOfDeparture = Value + End Set + End Property + + + Public Property HolderOfTheTransitProcedure() As HolderOfTheTransitProcedureMSType + Get + Return Me._holderOfTheTransitProcedure + End Get + Set + Me._holderOfTheTransitProcedure = Value + End Set + End Property + + + Public Property Representative() As RepresentativeMSType + Get + Return Me._representative + End Get + Set + Me._representative = Value + End Set + End Property + + + Public Property [Error]() As List(Of ErrorMSType) + Get + Return Me._error + End Get + Set + Me._error = Value + End Set + End Property + + + Public Property ApplicationInternalData() As ApplicationInternalDataType + Get + Return Me._applicationInternalData + End Get + Set + Me._applicationInternalData = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransitOperationMSType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransitOperationMSType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransitOperationMSType object + ''' + ''' string to deserialize + ''' Output TransitOperationMSType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransitOperationMSType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransitOperationMSType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransitOperationMSType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransitOperationMSType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransitOperationMSType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransitOperationMSType + Return CType(SerializerXml.Deserialize(s), TransitOperationMSType) + End Function +#End Region + + ''' + ''' Serializes current TransitOperationMSType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransitOperationMSType object + ''' + ''' File to load and deserialize + ''' Output TransitOperationMSType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransitOperationMSType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransitOperationMSType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransitOperationMSType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransitOperationMSType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class FehlermeldungMSTyp + +#Region "Private fields" + Private _code As String + + Private _text As String + + Private _zeiger As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Code() As String + Get + Return Me._code + End Get + Set + Me._code = Value + End Set + End Property + + + Public Property Text() As String + Get + Return Me._text + End Get + Set + Me._text = Value + End Set + End Property + + + Public Property Zeiger() As String + Get + Return Me._zeiger + End Get + Set + Me._zeiger = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FehlermeldungMSTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FehlermeldungMSTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes FehlermeldungMSTyp object + ''' + ''' string to deserialize + ''' Output FehlermeldungMSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As FehlermeldungMSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FehlermeldungMSTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As FehlermeldungMSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As FehlermeldungMSTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FehlermeldungMSTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As FehlermeldungMSTyp + Return CType(SerializerXml.Deserialize(s), FehlermeldungMSTyp) + End Function +#End Region + + ''' + ''' Serializes current FehlermeldungMSTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an FehlermeldungMSTyp object + ''' + ''' File to load and deserialize + ''' Output FehlermeldungMSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FehlermeldungMSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FehlermeldungMSTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FehlermeldungMSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FehlermeldungMSTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AnsprechpartnerMSTyp + +#Region "Private fields" + Private _sachbearbeiter As String + + Private _stellung As String + + Private _telefonnummer As String + + Private _telefaxnummer As String + + Private _emailAdresse As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Sachbearbeiter() As String + Get + Return Me._sachbearbeiter + End Get + Set + Me._sachbearbeiter = Value + End Set + End Property + + + Public Property Stellung() As String + Get + Return Me._stellung + End Get + Set + Me._stellung = Value + End Set + End Property + + + Public Property Telefonnummer() As String + Get + Return Me._telefonnummer + End Get + Set + Me._telefonnummer = Value + End Set + End Property + + + Public Property Telefaxnummer() As String + Get + Return Me._telefaxnummer + End Get + Set + Me._telefaxnummer = Value + End Set + End Property + + + Public Property EmailAdresse() As String + Get + Return Me._emailAdresse + End Get + Set + Me._emailAdresse = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AnsprechpartnerMSTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AnsprechpartnerMSTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AnsprechpartnerMSTyp object + ''' + ''' string to deserialize + ''' Output AnsprechpartnerMSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AnsprechpartnerMSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AnsprechpartnerMSTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AnsprechpartnerMSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AnsprechpartnerMSTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AnsprechpartnerMSTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AnsprechpartnerMSTyp + Return CType(SerializerXml.Deserialize(s), AnsprechpartnerMSTyp) + End Function +#End Region + + ''' + ''' Serializes current AnsprechpartnerMSTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AnsprechpartnerMSTyp object + ''' + ''' File to load and deserialize + ''' Output AnsprechpartnerMSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AnsprechpartnerMSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AnsprechpartnerMSTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AnsprechpartnerMSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AnsprechpartnerMSTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AdresseTINKurzMSTyp + +#Region "Private fields" + Private _eORI As String + + Private _nLNR As String + + Private _iDCarnet As String + + Private _name As String + + Private _strasseHausnummer As String + + Private _land As String + + Private _pLZ As String + + Private _ort As String + + Private _ansprechpartner As AnsprechpartnerMSTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._ansprechpartner = New AnsprechpartnerMSTyp() + End Sub + + + Public Property EORI() As String + Get + Return Me._eORI + End Get + Set + Me._eORI = Value + End Set + End Property + + + Public Property NLNR() As String + Get + Return Me._nLNR + End Get + Set + Me._nLNR = Value + End Set + End Property + + + Public Property IDCarnet() As String + Get + Return Me._iDCarnet + End Get + Set + Me._iDCarnet = 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 StrasseHausnummer() As String + Get + Return Me._strasseHausnummer + End Get + Set + Me._strasseHausnummer = Value + End Set + End Property + + + Public Property Land() As String + Get + Return Me._land + End Get + Set + Me._land = Value + End Set + End Property + + + Public Property PLZ() As String + Get + Return Me._pLZ + End Get + Set + Me._pLZ = Value + End Set + End Property + + + Public Property Ort() As String + Get + Return Me._ort + End Get + Set + Me._ort = Value + End Set + End Property + + + Public Property Ansprechpartner() As AnsprechpartnerMSTyp + Get + Return Me._ansprechpartner + End Get + Set + Me._ansprechpartner = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdresseTINKurzMSTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AdresseTINKurzMSTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AdresseTINKurzMSTyp object + ''' + ''' string to deserialize + ''' Output AdresseTINKurzMSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdresseTINKurzMSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdresseTINKurzMSTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdresseTINKurzMSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AdresseTINKurzMSTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdresseTINKurzMSTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdresseTINKurzMSTyp + Return CType(SerializerXml.Deserialize(s), AdresseTINKurzMSTyp) + End Function +#End Region + + ''' + ''' Serializes current AdresseTINKurzMSTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AdresseTINKurzMSTyp object + ''' + ''' File to load and deserialize + ''' Output AdresseTINKurzMSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdresseTINKurzMSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdresseTINKurzMSTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdresseTINKurzMSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdresseTINKurzMSTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class KopfDatenStatusmeldungTyp + +#Region "Private fields" + Private _mRN As String + + Private _entgegennahmeDatumZeit As Date + + Private _entscheidungAnnahmeDatumZeit As Date + + Private _entscheidungUeberlassungDatumZeit As Date + + Private _entscheidungStornierungDatumZeit As Date + + Private _zeitpunktAnrechnungReferenzbetraege As Date + + Private _weiterverarbeitungAusserhalbATLASDatumZeit As Date + + Private _grund As String + + Private _statusUeberwachung As String + + Private _arbeitsnummer As String + + Private _abgangsstelle As String + + Private _hauptverpflichteter As AdresseTINKurzMSTyp + + Private _fehlermeldung As List(Of FehlermeldungMSTyp) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._fehlermeldung = New List(Of FehlermeldungMSTyp)() + Me._hauptverpflichteter = New AdresseTINKurzMSTyp() + End Sub + + + Public Property MRN() As String + Get + Return Me._mRN + End Get + Set + Me._mRN = Value + End Set + End Property + + + Public Property EntgegennahmeDatumZeit() As Date + Get + Return Me._entgegennahmeDatumZeit + End Get + Set + Me._entgegennahmeDatumZeit = Value + End Set + End Property + + + Public Property EntscheidungAnnahmeDatumZeit() As Date + Get + Return Me._entscheidungAnnahmeDatumZeit + End Get + Set + Me._entscheidungAnnahmeDatumZeit = Value + End Set + End Property + + + Public Property EntscheidungUeberlassungDatumZeit() As Date + Get + Return Me._entscheidungUeberlassungDatumZeit + End Get + Set + Me._entscheidungUeberlassungDatumZeit = Value + End Set + End Property + + + Public Property EntscheidungStornierungDatumZeit() As Date + Get + Return Me._entscheidungStornierungDatumZeit + End Get + Set + Me._entscheidungStornierungDatumZeit = Value + End Set + End Property + + + Public Property ZeitpunktAnrechnungReferenzbetraege() As Date + Get + Return Me._zeitpunktAnrechnungReferenzbetraege + End Get + Set + Me._zeitpunktAnrechnungReferenzbetraege = Value + End Set + End Property + + + Public Property WeiterverarbeitungAusserhalbATLASDatumZeit() As Date + Get + Return Me._weiterverarbeitungAusserhalbATLASDatumZeit + End Get + Set + Me._weiterverarbeitungAusserhalbATLASDatumZeit = Value + End Set + End Property + + + Public Property Grund() As String + Get + Return Me._grund + End Get + Set + Me._grund = Value + End Set + End Property + + + Public Property StatusUeberwachung() As String + Get + Return Me._statusUeberwachung + End Get + Set + Me._statusUeberwachung = Value + End Set + End Property + + + Public Property Arbeitsnummer() As String + Get + Return Me._arbeitsnummer + End Get + Set + Me._arbeitsnummer = Value + End Set + End Property + + + Public Property Abgangsstelle() As String + Get + Return Me._abgangsstelle + End Get + Set + Me._abgangsstelle = Value + End Set + End Property + + + Public Property Hauptverpflichteter() As AdresseTINKurzMSTyp + Get + Return Me._hauptverpflichteter + End Get + Set + Me._hauptverpflichteter = Value + End Set + End Property + + + Public Property Fehlermeldung() As List(Of FehlermeldungMSTyp) + Get + Return Me._fehlermeldung + End Get + Set + Me._fehlermeldung = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(KopfDatenStatusmeldungTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize KopfDatenStatusmeldungTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes KopfDatenStatusmeldungTyp object + ''' + ''' string to deserialize + ''' Output KopfDatenStatusmeldungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As KopfDatenStatusmeldungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, KopfDatenStatusmeldungTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As KopfDatenStatusmeldungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As KopfDatenStatusmeldungTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), KopfDatenStatusmeldungTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As KopfDatenStatusmeldungTyp + Return CType(SerializerXml.Deserialize(s), KopfDatenStatusmeldungTyp) + End Function +#End Region + + ''' + ''' Serializes current KopfDatenStatusmeldungTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an KopfDatenStatusmeldungTyp object + ''' + ''' File to load and deserialize + ''' Output KopfDatenStatusmeldungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As KopfDatenStatusmeldungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, KopfDatenStatusmeldungTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As KopfDatenStatusmeldungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As KopfDatenStatusmeldungTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransaktionNCTSTyp + +#Region "Private fields" + Private _iOPartner As String + + Private _iODivision1 As String + + Private _iODivision2 As String + + Private _iODivision3 As String + + Private _iOReferenz As String + + Private _iODatumZeit As Date + + Private _version As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property IOPartner() As String + Get + Return Me._iOPartner + End Get + Set + Me._iOPartner = Value + End Set + End Property + + + Public Property IODivision1() As String + Get + Return Me._iODivision1 + End Get + Set + Me._iODivision1 = Value + End Set + End Property + + + Public Property IODivision2() As String + Get + Return Me._iODivision2 + End Get + Set + Me._iODivision2 = Value + End Set + End Property + + + Public Property IODivision3() As String + Get + Return Me._iODivision3 + End Get + Set + Me._iODivision3 = Value + End Set + End Property + + + Public Property IOReferenz() As String + Get + Return Me._iOReferenz + End Get + Set + Me._iOReferenz = Value + End Set + End Property + + + Public Property IODatumZeit() As Date + Get + Return Me._iODatumZeit + End Get + Set + Me._iODatumZeit = Value + End Set + End Property + + + Public Property Version() As String + Get + Return Me._version + End Get + Set + Me._version = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransaktionNCTSTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransaktionNCTSTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransaktionNCTSTyp object + ''' + ''' string to deserialize + ''' Output TransaktionNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransaktionNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransaktionNCTSTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransaktionNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransaktionNCTSTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransaktionNCTSTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransaktionNCTSTyp + Return CType(SerializerXml.Deserialize(s), TransaktionNCTSTyp) + End Function +#End Region + + ''' + ''' Serializes current TransaktionNCTSTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransaktionNCTSTyp object + ''' + ''' File to load and deserialize + ''' Output TransaktionNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransaktionNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransaktionNCTSTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransaktionNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransaktionNCTSTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DatenaustauschNCTSTyp + +#Region "Private fields" + Private _transaktion As TransaktionNCTSTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._transaktion = New TransaktionNCTSTyp() + End Sub + + + Public Property Transaktion() As TransaktionNCTSTyp + Get + Return Me._transaktion + End Get + Set + Me._transaktion = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DatenaustauschNCTSTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DatenaustauschNCTSTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DatenaustauschNCTSTyp object + ''' + ''' string to deserialize + ''' Output DatenaustauschNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DatenaustauschNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DatenaustauschNCTSTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DatenaustauschNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DatenaustauschNCTSTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DatenaustauschNCTSTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DatenaustauschNCTSTyp + Return CType(SerializerXml.Deserialize(s), DatenaustauschNCTSTyp) + End Function +#End Region + + ''' + ''' Serializes current DatenaustauschNCTSTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DatenaustauschNCTSTyp object + ''' + ''' File to load and deserialize + ''' Output DatenaustauschNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DatenaustauschNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DatenaustauschNCTSTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DatenaustauschNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DatenaustauschNCTSTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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/Statusmeldung/StatusmeldungNCTSDE_003.xsd b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Statusmeldung/StatusmeldungNCTSDE_003.xsd new file mode 100644 index 0000000..555a0d0 --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Statusmeldung/StatusmeldungNCTSDE_003.xsd @@ -0,0 +1,226 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Ueberlassungsmeldung/UeberlassungsmeldungNCTSDE_008.Designer.vb b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Ueberlassungsmeldung/UeberlassungsmeldungNCTSDE_008.Designer.vb new file mode 100644 index 0000000..9734281 --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Ueberlassungsmeldung/UeberlassungsmeldungNCTSDE_008.Designer.vb @@ -0,0 +1,15165 @@ +'' ------------------------------------------------------------------------------ +'' +'' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com +'' {"TargetFramework":"Net47","NameSpace":"UeberlassungsmeldungNCTSDE_008","Language":"VisualBasic","Properties":{},"XmlAttribute":{"Enabled":true},"ClassParams":{},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{},"JsonOutput":{},"Enabled":true},"Miscellaneous":{}} +'' +'' ------------------------------------------------------------------------------ +#Disable Warning +Imports System +Imports System.Diagnostics +Imports System.Xml.Serialization +Imports System.Runtime.Serialization +Imports System.Collections +Imports System.Xml.Schema +Imports System.ComponentModel +Imports System.Xml +Imports System.IO +Imports System.Text +Imports System.Collections.Generic + +Namespace UeberlassungsmeldungNCTSDE_008 + + + Partial Public Class UeberlassungsmeldungMRTyp + Inherits DatenaustauschNCTSTyp + +#Region "Private fields" + Private _einzelUeberlassungsmeldung As EinzelUeberlassungsmeldungTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._einzelUeberlassungsmeldung = New EinzelUeberlassungsmeldungTyp() + End Sub + + + Public Property EinzelUeberlassungsmeldung() As EinzelUeberlassungsmeldungTyp + Get + Return Me._einzelUeberlassungsmeldung + End Get + Set + Me._einzelUeberlassungsmeldung = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(UeberlassungsmeldungMRTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize UeberlassungsmeldungMRTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes UeberlassungsmeldungMRTyp object + ''' + ''' string to deserialize + ''' Output UeberlassungsmeldungMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As UeberlassungsmeldungMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, UeberlassungsmeldungMRTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As UeberlassungsmeldungMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As UeberlassungsmeldungMRTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), UeberlassungsmeldungMRTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As UeberlassungsmeldungMRTyp + Return CType(SerializerXml.Deserialize(s), UeberlassungsmeldungMRTyp) + End Function +#End Region + + ''' + ''' Serializes current UeberlassungsmeldungMRTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an UeberlassungsmeldungMRTyp object + ''' + ''' File to load and deserialize + ''' Output UeberlassungsmeldungMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As UeberlassungsmeldungMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, UeberlassungsmeldungMRTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As UeberlassungsmeldungMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As UeberlassungsmeldungMRTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class EinzelUeberlassungsmeldungTyp + +#Region "Private fields" + Private _objektIdentifizierung As ObjektIdentifizierungMRTyp + + Private _kopfDaten As KopfDatenUeberlassungsmeldungTyp + + Private _warenPosition As List(Of WarenPositionUeberlassungsmeldungTyp) + + Private _transitOperation As TransitOperationMRType + + Private _attachments As List(Of AttachmentMRType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._attachments = New List(Of AttachmentMRType)() + Me._transitOperation = New TransitOperationMRType() + Me._warenPosition = New List(Of WarenPositionUeberlassungsmeldungTyp)() + Me._kopfDaten = New KopfDatenUeberlassungsmeldungTyp() + Me._objektIdentifizierung = New ObjektIdentifizierungMRTyp() + End Sub + + + Public Property ObjektIdentifizierung() As ObjektIdentifizierungMRTyp + Get + Return Me._objektIdentifizierung + End Get + Set + Me._objektIdentifizierung = Value + End Set + End Property + + + Public Property KopfDaten() As KopfDatenUeberlassungsmeldungTyp + Get + Return Me._kopfDaten + End Get + Set + Me._kopfDaten = Value + End Set + End Property + + + Public Property WarenPosition() As List(Of WarenPositionUeberlassungsmeldungTyp) + Get + Return Me._warenPosition + End Get + Set + Me._warenPosition = Value + End Set + End Property + + + Public Property TransitOperation() As TransitOperationMRType + Get + Return Me._transitOperation + End Get + Set + Me._transitOperation = Value + End Set + End Property + + + Public Property Attachments() As List(Of AttachmentMRType) + Get + Return Me._attachments + End Get + Set + Me._attachments = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(EinzelUeberlassungsmeldungTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize EinzelUeberlassungsmeldungTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes EinzelUeberlassungsmeldungTyp object + ''' + ''' string to deserialize + ''' Output EinzelUeberlassungsmeldungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelUeberlassungsmeldungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EinzelUeberlassungsmeldungTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelUeberlassungsmeldungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As EinzelUeberlassungsmeldungTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), EinzelUeberlassungsmeldungTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As EinzelUeberlassungsmeldungTyp + Return CType(SerializerXml.Deserialize(s), EinzelUeberlassungsmeldungTyp) + End Function +#End Region + + ''' + ''' Serializes current EinzelUeberlassungsmeldungTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an EinzelUeberlassungsmeldungTyp object + ''' + ''' File to load and deserialize + ''' Output EinzelUeberlassungsmeldungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelUeberlassungsmeldungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EinzelUeberlassungsmeldungTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelUeberlassungsmeldungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As EinzelUeberlassungsmeldungTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ObjektIdentifizierungMRTyp + +#Region "Private fields" + Private _objektName As String + + Private _objektAlias As String + + Private _eDIFACTNachrichtenNr As String + + Private _zeitpunktEingang As Date + + Private _shipmentReferenz As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property ObjektName() As String + Get + Return Me._objektName + End Get + Set + Me._objektName = Value + End Set + End Property + + + Public Property ObjektAlias() As String + Get + Return Me._objektAlias + End Get + Set + Me._objektAlias = Value + End Set + End Property + + + Public Property EDIFACTNachrichtenNr() As String + Get + Return Me._eDIFACTNachrichtenNr + End Get + Set + Me._eDIFACTNachrichtenNr = Value + End Set + End Property + + + Public Property ZeitpunktEingang() As Date + Get + Return Me._zeitpunktEingang + End Get + Set + Me._zeitpunktEingang = Value + End Set + End Property + + + Public Property ShipmentReferenz() As String + Get + Return Me._shipmentReferenz + End Get + Set + Me._shipmentReferenz = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ObjektIdentifizierungMRTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ObjektIdentifizierungMRTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ObjektIdentifizierungMRTyp object + ''' + ''' string to deserialize + ''' Output ObjektIdentifizierungMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ObjektIdentifizierungMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ObjektIdentifizierungMRTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ObjektIdentifizierungMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ObjektIdentifizierungMRTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ObjektIdentifizierungMRTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ObjektIdentifizierungMRTyp + Return CType(SerializerXml.Deserialize(s), ObjektIdentifizierungMRTyp) + End Function +#End Region + + ''' + ''' Serializes current ObjektIdentifizierungMRTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ObjektIdentifizierungMRTyp object + ''' + ''' File to load and deserialize + ''' Output ObjektIdentifizierungMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ObjektIdentifizierungMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ObjektIdentifizierungMRTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ObjektIdentifizierungMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ObjektIdentifizierungMRTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AttachmentMRType + +#Region "Private fields" + Private _technicalContent As String + + Private _originalFilename As String + + Private _fileFormat As String + + Private _dataEncoding As String + + Private _data As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property TechnicalContent() As String + Get + Return Me._technicalContent + End Get + Set + Me._technicalContent = Value + End Set + End Property + + + Public Property OriginalFilename() As String + Get + Return Me._originalFilename + End Get + Set + Me._originalFilename = Value + End Set + End Property + + + Public Property FileFormat() As String + Get + Return Me._fileFormat + End Get + Set + Me._fileFormat = Value + End Set + End Property + + + Public Property DataEncoding() As String + Get + Return Me._dataEncoding + End Get + Set + Me._dataEncoding = Value + End Set + End Property + + + Public Property Data() As String + Get + Return Me._data + End Get + Set + Me._data = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AttachmentMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AttachmentMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AttachmentMRType object + ''' + ''' string to deserialize + ''' Output AttachmentMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AttachmentMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AttachmentMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AttachmentMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AttachmentMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AttachmentMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AttachmentMRType + Return CType(SerializerXml.Deserialize(s), AttachmentMRType) + End Function +#End Region + + ''' + ''' Serializes current AttachmentMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AttachmentMRType object + ''' + ''' File to load and deserialize + ''' Output AttachmentMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AttachmentMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AttachmentMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AttachmentMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AttachmentMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class InwardProcessingGoodsReferenceMRType + +#Region "Private fields" + Private _sequenceNumber As String + + Private _accessViaATLAS As String + + Private _mRN As String + + Private _registrationNumber As String + + Private _goodsItemNumber As String + + Private _goodsRelatedData 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 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 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(InwardProcessingGoodsReferenceMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize InwardProcessingGoodsReferenceMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes InwardProcessingGoodsReferenceMRType object + ''' + ''' string to deserialize + ''' Output InwardProcessingGoodsReferenceMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As InwardProcessingGoodsReferenceMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, InwardProcessingGoodsReferenceMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As InwardProcessingGoodsReferenceMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As InwardProcessingGoodsReferenceMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), InwardProcessingGoodsReferenceMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As InwardProcessingGoodsReferenceMRType + Return CType(SerializerXml.Deserialize(s), InwardProcessingGoodsReferenceMRType) + End Function +#End Region + + ''' + ''' Serializes current InwardProcessingGoodsReferenceMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an InwardProcessingGoodsReferenceMRType object + ''' + ''' File to load and deserialize + ''' Output InwardProcessingGoodsReferenceMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As InwardProcessingGoodsReferenceMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, InwardProcessingGoodsReferenceMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As InwardProcessingGoodsReferenceMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As InwardProcessingGoodsReferenceMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class InwardProcessingMRType + +#Region "Private fields" + Private _transference As String + + Private _typeOfAuthorisation As String + + Private _referenceNumberOfAuthorisation As String + + Private _simplyGrantedAuthorisation As String + + Private _customsOfficeOfSupervision As String + + Private _inwardProcessingGoodsReference As List(Of InwardProcessingGoodsReferenceMRType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._inwardProcessingGoodsReference = New List(Of InwardProcessingGoodsReferenceMRType)() + End Sub + + + Public Property Transference() As String + Get + Return Me._transference + End Get + Set + Me._transference = Value + End Set + End Property + + + Public Property TypeOfAuthorisation() As String + Get + Return Me._typeOfAuthorisation + End Get + Set + Me._typeOfAuthorisation = Value + End Set + End Property + + + Public Property ReferenceNumberOfAuthorisation() As String + Get + Return Me._referenceNumberOfAuthorisation + End Get + Set + Me._referenceNumberOfAuthorisation = 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 CustomsOfficeOfSupervision() As String + Get + Return Me._customsOfficeOfSupervision + End Get + Set + Me._customsOfficeOfSupervision = Value + End Set + End Property + + + Public Property InwardProcessingGoodsReference() As List(Of InwardProcessingGoodsReferenceMRType) + Get + Return Me._inwardProcessingGoodsReference + End Get + Set + Me._inwardProcessingGoodsReference = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(InwardProcessingMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize InwardProcessingMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes InwardProcessingMRType object + ''' + ''' string to deserialize + ''' Output InwardProcessingMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As InwardProcessingMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, InwardProcessingMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As InwardProcessingMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As InwardProcessingMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), InwardProcessingMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As InwardProcessingMRType + Return CType(SerializerXml.Deserialize(s), InwardProcessingMRType) + End Function +#End Region + + ''' + ''' Serializes current InwardProcessingMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an InwardProcessingMRType object + ''' + ''' File to load and deserialize + ''' Output InwardProcessingMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As InwardProcessingMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, InwardProcessingMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As InwardProcessingMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As InwardProcessingMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class GoodsReductionAfterTreatmentMRType + +#Region "Private fields" + Private _quantityOfGoodsReductionAfterTreatment As Decimal + + Private _measurementUnitOfGoodsReductionAfterTreatment As String + + Private _qualifierOfGoodsReductionAfterTreatment As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property QuantityOfGoodsReductionAfterTreatment() As Decimal + Get + Return Me._quantityOfGoodsReductionAfterTreatment + End Get + Set + Me._quantityOfGoodsReductionAfterTreatment = Value + End Set + End Property + + + Public Property MeasurementUnitOfGoodsReductionAfterTreatment() As String + Get + Return Me._measurementUnitOfGoodsReductionAfterTreatment + End Get + Set + Me._measurementUnitOfGoodsReductionAfterTreatment = Value + End Set + End Property + + + Public Property QualifierOfGoodsReductionAfterTreatment() As String + Get + Return Me._qualifierOfGoodsReductionAfterTreatment + End Get + Set + Me._qualifierOfGoodsReductionAfterTreatment = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(GoodsReductionAfterTreatmentMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize GoodsReductionAfterTreatmentMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes GoodsReductionAfterTreatmentMRType object + ''' + ''' string to deserialize + ''' Output GoodsReductionAfterTreatmentMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GoodsReductionAfterTreatmentMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, GoodsReductionAfterTreatmentMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GoodsReductionAfterTreatmentMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As GoodsReductionAfterTreatmentMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), GoodsReductionAfterTreatmentMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As GoodsReductionAfterTreatmentMRType + Return CType(SerializerXml.Deserialize(s), GoodsReductionAfterTreatmentMRType) + End Function +#End Region + + ''' + ''' Serializes current GoodsReductionAfterTreatmentMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an GoodsReductionAfterTreatmentMRType object + ''' + ''' File to load and deserialize + ''' Output GoodsReductionAfterTreatmentMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GoodsReductionAfterTreatmentMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, GoodsReductionAfterTreatmentMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GoodsReductionAfterTreatmentMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As GoodsReductionAfterTreatmentMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class GoodsReductionMRType + +#Region "Private fields" + Private _quantityOfGoodsReduction As Decimal + + Private _measurementUnitOfGoodsReduction As String + + Private _qualifierOfGoodsReduction As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property QuantityOfGoodsReduction() As Decimal + Get + Return Me._quantityOfGoodsReduction + End Get + Set + Me._quantityOfGoodsReduction = Value + End Set + End Property + + + Public Property MeasurementUnitOfGoodsReduction() As String + Get + Return Me._measurementUnitOfGoodsReduction + End Get + Set + Me._measurementUnitOfGoodsReduction = Value + End Set + End Property + + + Public Property QualifierOfGoodsReduction() As String + Get + Return Me._qualifierOfGoodsReduction + End Get + Set + Me._qualifierOfGoodsReduction = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(GoodsReductionMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize GoodsReductionMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes GoodsReductionMRType object + ''' + ''' string to deserialize + ''' Output GoodsReductionMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GoodsReductionMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, GoodsReductionMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GoodsReductionMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As GoodsReductionMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), GoodsReductionMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As GoodsReductionMRType + Return CType(SerializerXml.Deserialize(s), GoodsReductionMRType) + End Function +#End Region + + ''' + ''' Serializes current GoodsReductionMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an GoodsReductionMRType object + ''' + ''' File to load and deserialize + ''' Output GoodsReductionMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GoodsReductionMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, GoodsReductionMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GoodsReductionMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As GoodsReductionMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class CustomsWarehousingGoodsReferenceMRType + +#Region "Private fields" + Private _sequenceNumber As String + + Private _commodityCode As String + + Private _accessViaATLAS As String + + Private _usualTreatment As String + + Private _mRN As String + + Private _registrationNumber As String + + Private _goodsItemNumber As String + + Private _complement As String + + Private _goodsReduction As GoodsReductionMRType + + Private _goodsReductionAfterTreatment As GoodsReductionAfterTreatmentMRType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsReductionAfterTreatment = New GoodsReductionAfterTreatmentMRType() + Me._goodsReduction = New GoodsReductionMRType() + End Sub + + + Public Property SequenceNumber() As String + Get + Return Me._sequenceNumber + End Get + Set + Me._sequenceNumber = Value + End Set + End Property + + + Public Property CommodityCode() As String + Get + Return Me._commodityCode + End Get + Set + Me._commodityCode = Value + End Set + End Property + + + Public Property AccessViaATLAS() As String + Get + Return Me._accessViaATLAS + End Get + Set + Me._accessViaATLAS = 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 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 Complement() As String + Get + Return Me._complement + End Get + Set + Me._complement = Value + End Set + End Property + + + Public Property GoodsReduction() As GoodsReductionMRType + Get + Return Me._goodsReduction + End Get + Set + Me._goodsReduction = Value + End Set + End Property + + + Public Property GoodsReductionAfterTreatment() As GoodsReductionAfterTreatmentMRType + 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(CustomsWarehousingGoodsReferenceMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize CustomsWarehousingGoodsReferenceMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes CustomsWarehousingGoodsReferenceMRType object + ''' + ''' string to deserialize + ''' Output CustomsWarehousingGoodsReferenceMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CustomsWarehousingGoodsReferenceMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, CustomsWarehousingGoodsReferenceMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CustomsWarehousingGoodsReferenceMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As CustomsWarehousingGoodsReferenceMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CustomsWarehousingGoodsReferenceMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As CustomsWarehousingGoodsReferenceMRType + Return CType(SerializerXml.Deserialize(s), CustomsWarehousingGoodsReferenceMRType) + End Function +#End Region + + ''' + ''' Serializes current CustomsWarehousingGoodsReferenceMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an CustomsWarehousingGoodsReferenceMRType object + ''' + ''' File to load and deserialize + ''' Output CustomsWarehousingGoodsReferenceMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CustomsWarehousingGoodsReferenceMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, CustomsWarehousingGoodsReferenceMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CustomsWarehousingGoodsReferenceMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As CustomsWarehousingGoodsReferenceMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class CustomsWarehousingMRType + +#Region "Private fields" + Private _lRN As String + + Private _transference As String + + Private _typeOfAuthorisation As String + + Private _referenceNumberOfAuthorisation As String + + Private _customsWarehousingGoodsReference As List(Of CustomsWarehousingGoodsReferenceMRType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._customsWarehousingGoodsReference = New List(Of CustomsWarehousingGoodsReferenceMRType)() + End Sub + + + Public Property LRN() As String + Get + Return Me._lRN + End Get + Set + Me._lRN = Value + End Set + End Property + + + Public Property Transference() As String + Get + Return Me._transference + End Get + Set + Me._transference = Value + End Set + End Property + + + Public Property TypeOfAuthorisation() As String + Get + Return Me._typeOfAuthorisation + End Get + Set + Me._typeOfAuthorisation = Value + End Set + End Property + + + Public Property ReferenceNumberOfAuthorisation() As String + Get + Return Me._referenceNumberOfAuthorisation + End Get + Set + Me._referenceNumberOfAuthorisation = Value + End Set + End Property + + + Public Property CustomsWarehousingGoodsReference() As List(Of CustomsWarehousingGoodsReferenceMRType) + Get + Return Me._customsWarehousingGoodsReference + End Get + Set + Me._customsWarehousingGoodsReference = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(CustomsWarehousingMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize CustomsWarehousingMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes CustomsWarehousingMRType object + ''' + ''' string to deserialize + ''' Output CustomsWarehousingMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CustomsWarehousingMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, CustomsWarehousingMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CustomsWarehousingMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As CustomsWarehousingMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CustomsWarehousingMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As CustomsWarehousingMRType + Return CType(SerializerXml.Deserialize(s), CustomsWarehousingMRType) + End Function +#End Region + + ''' + ''' Serializes current CustomsWarehousingMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an CustomsWarehousingMRType object + ''' + ''' File to load and deserialize + ''' Output CustomsWarehousingMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CustomsWarehousingMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, CustomsWarehousingMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CustomsWarehousingMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As CustomsWarehousingMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class SummaryDeclarationGoodsReferenceMRType + +#Region "Private fields" + Private _sequenceNumber As String + + Private _numberOfPackages As String + + Private _registrationNumber As String + + Private _mRN As String + + Private _goodsItemNumber As String + + Private _identificationNumberOfCustodian As String + + Private _typeOfIdentificationByKey As String + + Private _referenceNumberOfIdentificationByKey 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 NumberOfPackages() As String + Get + Return Me._numberOfPackages + End Get + Set + Me._numberOfPackages = 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 MRN() As String + Get + Return Me._mRN + End Get + Set + Me._mRN = 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 IdentificationNumberOfCustodian() As String + Get + Return Me._identificationNumberOfCustodian + End Get + Set + Me._identificationNumberOfCustodian = Value + End Set + End Property + + + Public Property TypeOfIdentificationByKey() As String + Get + Return Me._typeOfIdentificationByKey + End Get + Set + Me._typeOfIdentificationByKey = Value + End Set + End Property + + + Public Property ReferenceNumberOfIdentificationByKey() As String + Get + Return Me._referenceNumberOfIdentificationByKey + End Get + Set + Me._referenceNumberOfIdentificationByKey = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(SummaryDeclarationGoodsReferenceMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize SummaryDeclarationGoodsReferenceMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes SummaryDeclarationGoodsReferenceMRType object + ''' + ''' string to deserialize + ''' Output SummaryDeclarationGoodsReferenceMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SummaryDeclarationGoodsReferenceMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SummaryDeclarationGoodsReferenceMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SummaryDeclarationGoodsReferenceMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As SummaryDeclarationGoodsReferenceMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), SummaryDeclarationGoodsReferenceMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As SummaryDeclarationGoodsReferenceMRType + Return CType(SerializerXml.Deserialize(s), SummaryDeclarationGoodsReferenceMRType) + End Function +#End Region + + ''' + ''' Serializes current SummaryDeclarationGoodsReferenceMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an SummaryDeclarationGoodsReferenceMRType object + ''' + ''' File to load and deserialize + ''' Output SummaryDeclarationGoodsReferenceMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SummaryDeclarationGoodsReferenceMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SummaryDeclarationGoodsReferenceMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SummaryDeclarationGoodsReferenceMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As SummaryDeclarationGoodsReferenceMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class SummaryDeclarationMRType + +#Region "Private fields" + Private _transference As String + + Private _identificationType As String + + Private _summaryDeclarationGoodsReference As List(Of SummaryDeclarationGoodsReferenceMRType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._summaryDeclarationGoodsReference = New List(Of SummaryDeclarationGoodsReferenceMRType)() + 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 SummaryDeclarationGoodsReference() As List(Of SummaryDeclarationGoodsReferenceMRType) + Get + Return Me._summaryDeclarationGoodsReference + End Get + Set + Me._summaryDeclarationGoodsReference = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(SummaryDeclarationMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize SummaryDeclarationMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes SummaryDeclarationMRType object + ''' + ''' string to deserialize + ''' Output SummaryDeclarationMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SummaryDeclarationMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SummaryDeclarationMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SummaryDeclarationMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As SummaryDeclarationMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), SummaryDeclarationMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As SummaryDeclarationMRType + Return CType(SerializerXml.Deserialize(s), SummaryDeclarationMRType) + End Function +#End Region + + ''' + ''' Serializes current SummaryDeclarationMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an SummaryDeclarationMRType object + ''' + ''' File to load and deserialize + ''' Output SummaryDeclarationMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SummaryDeclarationMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SummaryDeclarationMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SummaryDeclarationMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As SummaryDeclarationMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ProcedureTransferenceMRType + +#Region "Private fields" + Private _summaryDeclaration As SummaryDeclarationMRType + + Private _customsWarehousing As CustomsWarehousingMRType + + Private _inwardProcessing As InwardProcessingMRType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._inwardProcessing = New InwardProcessingMRType() + Me._customsWarehousing = New CustomsWarehousingMRType() + Me._summaryDeclaration = New SummaryDeclarationMRType() + End Sub + + + Public Property SummaryDeclaration() As SummaryDeclarationMRType + Get + Return Me._summaryDeclaration + End Get + Set + Me._summaryDeclaration = Value + End Set + End Property + + + Public Property CustomsWarehousing() As CustomsWarehousingMRType + Get + Return Me._customsWarehousing + End Get + Set + Me._customsWarehousing = Value + End Set + End Property + + + Public Property InwardProcessing() As InwardProcessingMRType + 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(ProcedureTransferenceMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ProcedureTransferenceMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ProcedureTransferenceMRType object + ''' + ''' string to deserialize + ''' Output ProcedureTransferenceMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ProcedureTransferenceMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ProcedureTransferenceMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ProcedureTransferenceMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ProcedureTransferenceMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ProcedureTransferenceMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ProcedureTransferenceMRType + Return CType(SerializerXml.Deserialize(s), ProcedureTransferenceMRType) + End Function +#End Region + + ''' + ''' Serializes current ProcedureTransferenceMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ProcedureTransferenceMRType object + ''' + ''' File to load and deserialize + ''' Output ProcedureTransferenceMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ProcedureTransferenceMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ProcedureTransferenceMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ProcedureTransferenceMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ProcedureTransferenceMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class PackagingMRType + +#Region "Private fields" + Private _numberOfPackages As String + + Private _typeOfPackages As String + + Private _shippingMarks As String + + Private _goodsItemNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property NumberOfPackages() As String + Get + Return Me._numberOfPackages + End Get + Set + Me._numberOfPackages = Value + End Set + End Property + + + Public Property TypeOfPackages() As String + Get + Return Me._typeOfPackages + End Get + Set + Me._typeOfPackages = Value + End Set + End Property + + + Public Property ShippingMarks() As String + Get + Return Me._shippingMarks + End Get + Set + Me._shippingMarks = Value + End Set + End Property + + + Public Property 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(PackagingMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize PackagingMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes PackagingMRType object + ''' + ''' string to deserialize + ''' Output PackagingMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PackagingMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PackagingMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PackagingMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As PackagingMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PackagingMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As PackagingMRType + Return CType(SerializerXml.Deserialize(s), PackagingMRType) + End Function +#End Region + + ''' + ''' Serializes current PackagingMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an PackagingMRType object + ''' + ''' File to load and deserialize + ''' Output PackagingMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PackagingMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PackagingMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PackagingMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PackagingMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class PreviousDocumentItemMRType + +#Region "Private fields" + 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 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(PreviousDocumentItemMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize PreviousDocumentItemMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes PreviousDocumentItemMRType object + ''' + ''' string to deserialize + ''' Output PreviousDocumentItemMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PreviousDocumentItemMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PreviousDocumentItemMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PreviousDocumentItemMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As PreviousDocumentItemMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PreviousDocumentItemMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As PreviousDocumentItemMRType + Return CType(SerializerXml.Deserialize(s), PreviousDocumentItemMRType) + End Function +#End Region + + ''' + ''' Serializes current PreviousDocumentItemMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an PreviousDocumentItemMRType object + ''' + ''' File to load and deserialize + ''' Output PreviousDocumentItemMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PreviousDocumentItemMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PreviousDocumentItemMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PreviousDocumentItemMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PreviousDocumentItemMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ConsignmentItemMRType + +#Region "Private fields" + Private _goodsItemNumber As String + + Private _declarationGoodsItemNumber As String + + Private _declarationType As String + + Private _countryOfDispatch As String + + Private _countryOfDestination As String + + Private _commodityCode As String + + Private _commodityCodeCombinedNomenclature As String + + Private _referenceNumberUCR As String + + Private _methodOfPayment As String + + Private _uNNumber As List(Of String) + + Private _descriptionOfGoods As String + + Private _cusCode As String + + Private _grossMass As Decimal + + Private _netMass As Decimal + + Private _consignee As AddressMRType + + Private _additionalSupplyChainActor As List(Of AdditionalSupplyChainActorMRType) + + Private _previousDocument As List(Of PreviousDocumentItemMRType) + + Private _packaging As List(Of PackagingMRType) + + Private _supportingDocument As List(Of SupportingDocumentMRType) + + Private _transportDocument As List(Of TransportDocumentMRType) + + Private _additionalReference As List(Of AdditionalReferenceMRType) + + Private _additionalInformation As List(Of AdditionalInformationMRType) + + Private _procedureTransference As ProcedureTransferenceMRType + + Private _applicationInternalData As ApplicationInternalDataType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._applicationInternalData = New ApplicationInternalDataType() + Me._procedureTransference = New ProcedureTransferenceMRType() + Me._additionalInformation = New List(Of AdditionalInformationMRType)() + Me._additionalReference = New List(Of AdditionalReferenceMRType)() + Me._transportDocument = New List(Of TransportDocumentMRType)() + Me._supportingDocument = New List(Of SupportingDocumentMRType)() + Me._packaging = New List(Of PackagingMRType)() + Me._previousDocument = New List(Of PreviousDocumentItemMRType)() + Me._additionalSupplyChainActor = New List(Of AdditionalSupplyChainActorMRType)() + Me._consignee = New AddressMRType() + Me._uNNumber = New List(Of String)() + End Sub + + + 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 CommodityCode() As String + Get + Return Me._commodityCode + End Get + Set + Me._commodityCode = Value + End Set + End Property + + + Public Property CommodityCodeCombinedNomenclature() As String + Get + Return Me._commodityCodeCombinedNomenclature + End Get + Set + Me._commodityCodeCombinedNomenclature = 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 MethodOfPayment() As String + Get + Return Me._methodOfPayment + End Get + Set + Me._methodOfPayment = Value + End Set + End Property + + + Public Property UNNumber() As List(Of String) + Get + Return Me._uNNumber + End Get + Set + Me._uNNumber = Value + End Set + End Property + + + Public Property 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 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 + + + Public Property Consignee() As AddressMRType + Get + Return Me._consignee + End Get + Set + Me._consignee = Value + End Set + End Property + + + Public Property AdditionalSupplyChainActor() As List(Of AdditionalSupplyChainActorMRType) + Get + Return Me._additionalSupplyChainActor + End Get + Set + Me._additionalSupplyChainActor = Value + End Set + End Property + + + Public Property PreviousDocument() As List(Of PreviousDocumentItemMRType) + Get + Return Me._previousDocument + End Get + Set + Me._previousDocument = Value + End Set + End Property + + + Public Property Packaging() As List(Of PackagingMRType) + Get + Return Me._packaging + End Get + Set + Me._packaging = Value + End Set + End Property + + + Public Property SupportingDocument() As List(Of SupportingDocumentMRType) + Get + Return Me._supportingDocument + End Get + Set + Me._supportingDocument = Value + End Set + End Property + + + Public Property TransportDocument() As List(Of TransportDocumentMRType) + Get + Return Me._transportDocument + End Get + Set + Me._transportDocument = Value + End Set + End Property + + + Public Property AdditionalReference() As List(Of AdditionalReferenceMRType) + Get + Return Me._additionalReference + End Get + Set + Me._additionalReference = Value + End Set + End Property + + + Public Property AdditionalInformation() As List(Of AdditionalInformationMRType) + Get + Return Me._additionalInformation + End Get + Set + Me._additionalInformation = Value + End Set + End Property + + + Public Property ProcedureTransference() As ProcedureTransferenceMRType + Get + Return Me._procedureTransference + End Get + Set + Me._procedureTransference = Value + End Set + End Property + + + Public Property ApplicationInternalData() As ApplicationInternalDataType + Get + Return Me._applicationInternalData + End Get + Set + Me._applicationInternalData = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ConsignmentItemMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ConsignmentItemMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ConsignmentItemMRType object + ''' + ''' string to deserialize + ''' Output ConsignmentItemMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ConsignmentItemMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ConsignmentItemMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ConsignmentItemMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ConsignmentItemMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ConsignmentItemMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ConsignmentItemMRType + Return CType(SerializerXml.Deserialize(s), ConsignmentItemMRType) + End Function +#End Region + + ''' + ''' Serializes current ConsignmentItemMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ConsignmentItemMRType object + ''' + ''' File to load and deserialize + ''' Output ConsignmentItemMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ConsignmentItemMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ConsignmentItemMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ConsignmentItemMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ConsignmentItemMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AddressMRType + +#Region "Private fields" + Private _identificationNumber As String + + Private _subsidiaryNumber As String + + Private _name As String + + Private _streetAndNumber As String + + Private _city As String + + Private _postcode As String + + Private _country As String + + Private _contactPerson As ContactPersonMRType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contactPerson = New ContactPersonMRType() + 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 StreetAndNumber() As String + Get + Return Me._streetAndNumber + End Get + Set + Me._streetAndNumber = Value + End Set + End Property + + + Public Property City() As String + Get + Return Me._city + End Get + Set + Me._city = Value + End Set + End Property + + + Public Property Postcode() As String + Get + Return Me._postcode + End Get + Set + Me._postcode = Value + End Set + End Property + + + Public Property Country() As String + Get + Return Me._country + End Get + Set + Me._country = Value + End Set + End Property + + + Public Property ContactPerson() As ContactPersonMRType + 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(AddressMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AddressMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AddressMRType object + ''' + ''' string to deserialize + ''' Output AddressMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AddressMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AddressMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AddressMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AddressMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AddressMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AddressMRType + Return CType(SerializerXml.Deserialize(s), AddressMRType) + End Function +#End Region + + ''' + ''' Serializes current AddressMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AddressMRType object + ''' + ''' File to load and deserialize + ''' Output AddressMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AddressMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AddressMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AddressMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AddressMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ContactPersonMRType + +#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(ContactPersonMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ContactPersonMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ContactPersonMRType object + ''' + ''' string to deserialize + ''' Output ContactPersonMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ContactPersonMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ContactPersonMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ContactPersonMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ContactPersonMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ContactPersonMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ContactPersonMRType + Return CType(SerializerXml.Deserialize(s), ContactPersonMRType) + End Function +#End Region + + ''' + ''' Serializes current ContactPersonMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ContactPersonMRType object + ''' + ''' File to load and deserialize + ''' Output ContactPersonMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ContactPersonMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ContactPersonMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ContactPersonMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ContactPersonMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AdditionalSupplyChainActorMRType + +#Region "Private fields" + Private _role As String + + Private _identificationNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Role() As String + Get + Return Me._role + End Get + Set + Me._role = Value + End Set + End Property + + + Public Property IdentificationNumber() As String + Get + Return Me._identificationNumber + End Get + Set + Me._identificationNumber = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdditionalSupplyChainActorMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AdditionalSupplyChainActorMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AdditionalSupplyChainActorMRType object + ''' + ''' string to deserialize + ''' Output AdditionalSupplyChainActorMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalSupplyChainActorMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalSupplyChainActorMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalSupplyChainActorMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AdditionalSupplyChainActorMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalSupplyChainActorMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdditionalSupplyChainActorMRType + Return CType(SerializerXml.Deserialize(s), AdditionalSupplyChainActorMRType) + End Function +#End Region + + ''' + ''' Serializes current AdditionalSupplyChainActorMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AdditionalSupplyChainActorMRType object + ''' + ''' File to load and deserialize + ''' Output AdditionalSupplyChainActorMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalSupplyChainActorMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalSupplyChainActorMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalSupplyChainActorMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdditionalSupplyChainActorMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class SupportingDocumentMRType + +#Region "Private fields" + 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 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(SupportingDocumentMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize SupportingDocumentMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes SupportingDocumentMRType object + ''' + ''' string to deserialize + ''' Output SupportingDocumentMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SupportingDocumentMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SupportingDocumentMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SupportingDocumentMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As SupportingDocumentMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), SupportingDocumentMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As SupportingDocumentMRType + Return CType(SerializerXml.Deserialize(s), SupportingDocumentMRType) + End Function +#End Region + + ''' + ''' Serializes current SupportingDocumentMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an SupportingDocumentMRType object + ''' + ''' File to load and deserialize + ''' Output SupportingDocumentMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SupportingDocumentMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SupportingDocumentMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SupportingDocumentMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As SupportingDocumentMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransportDocumentMRType + +#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(TransportDocumentMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransportDocumentMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransportDocumentMRType object + ''' + ''' string to deserialize + ''' Output TransportDocumentMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransportDocumentMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransportDocumentMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransportDocumentMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransportDocumentMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransportDocumentMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransportDocumentMRType + Return CType(SerializerXml.Deserialize(s), TransportDocumentMRType) + End Function +#End Region + + ''' + ''' Serializes current TransportDocumentMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransportDocumentMRType object + ''' + ''' File to load and deserialize + ''' Output TransportDocumentMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransportDocumentMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransportDocumentMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransportDocumentMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransportDocumentMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AdditionalReferenceMRType + +#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(AdditionalReferenceMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AdditionalReferenceMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AdditionalReferenceMRType object + ''' + ''' string to deserialize + ''' Output AdditionalReferenceMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalReferenceMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalReferenceMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalReferenceMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AdditionalReferenceMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalReferenceMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdditionalReferenceMRType + Return CType(SerializerXml.Deserialize(s), AdditionalReferenceMRType) + End Function +#End Region + + ''' + ''' Serializes current AdditionalReferenceMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AdditionalReferenceMRType object + ''' + ''' File to load and deserialize + ''' Output AdditionalReferenceMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalReferenceMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalReferenceMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalReferenceMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdditionalReferenceMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AdditionalInformationMRType + +#Region "Private fields" + Private _code As String + + Private _text As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Code() As String + Get + Return Me._code + End Get + Set + Me._code = Value + End Set + End Property + + + Public Property Text() As String + Get + Return Me._text + End Get + Set + Me._text = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdditionalInformationMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AdditionalInformationMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AdditionalInformationMRType object + ''' + ''' string to deserialize + ''' Output AdditionalInformationMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalInformationMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalInformationMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalInformationMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AdditionalInformationMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalInformationMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdditionalInformationMRType + Return CType(SerializerXml.Deserialize(s), AdditionalInformationMRType) + End Function +#End Region + + ''' + ''' Serializes current AdditionalInformationMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AdditionalInformationMRType object + ''' + ''' File to load and deserialize + ''' Output AdditionalInformationMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalInformationMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalInformationMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalInformationMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdditionalInformationMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ApplicationInternalDataType + +#Region "Private fields" + Private _additionalDetails As List(Of ApplicationInternalDataAdditionalDetailsDataType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._additionalDetails = New List(Of ApplicationInternalDataAdditionalDetailsDataType)() + End Sub + + + Public Property AdditionalDetails() As List(Of ApplicationInternalDataAdditionalDetailsDataType) + Get + Return Me._additionalDetails + End Get + Set + Me._additionalDetails = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ApplicationInternalDataType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ApplicationInternalDataType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ApplicationInternalDataType object + ''' + ''' string to deserialize + ''' Output ApplicationInternalDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ApplicationInternalDataType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ApplicationInternalDataType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ApplicationInternalDataType + Return CType(SerializerXml.Deserialize(s), ApplicationInternalDataType) + End Function +#End Region + + ''' + ''' Serializes current ApplicationInternalDataType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ApplicationInternalDataType object + ''' + ''' File to load and deserialize + ''' Output ApplicationInternalDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ApplicationInternalDataType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ApplicationInternalDataAdditionalDetailsDataType + +#Region "Private fields" + Private _key As String + + Private _value As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Key() As String + Get + Return Me._key + End Get + Set + Me._key = Value + End Set + End Property + + + Public Property Value() As String + Get + Return Me._value + End Get + Set + Me._value = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ApplicationInternalDataAdditionalDetailsDataType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' string to deserialize + ''' Output ApplicationInternalDataAdditionalDetailsDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsDataType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ApplicationInternalDataAdditionalDetailsDataType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ApplicationInternalDataAdditionalDetailsDataType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ApplicationInternalDataAdditionalDetailsDataType + Return CType(SerializerXml.Deserialize(s), ApplicationInternalDataAdditionalDetailsDataType) + End Function +#End Region + + ''' + ''' Serializes current ApplicationInternalDataAdditionalDetailsDataType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' File to load and deserialize + ''' Output ApplicationInternalDataAdditionalDetailsDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsDataType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ApplicationInternalDataAdditionalDetailsDataType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class HouseConsignmentMRType + +#Region "Private fields" + Private _houseConsignmentNumber As String + + Private _countryOfDispatch As String + + Private _countryOfDestination As String + + Private _grossMass As Decimal + + Private _referenceNumberUCR As String + + Private _consignor As AddressMRType + + Private _consignee As AddressMRType + + Private _additionalSupplyChainActor As List(Of AdditionalSupplyChainActorMRType) + + Private _previousDocument As List(Of PreviousDocumentMRType) + + Private _supportingDocument As List(Of SupportingDocumentMRType) + + Private _transportDocument As List(Of TransportDocumentMRType) + + Private _additionalReference As List(Of AdditionalReferenceMRType) + + Private _additionalInformation As List(Of AdditionalInformationMRType) + + Private _transportCharges As String + + Private _applicationInternalData As ApplicationInternalDataType + + Private _consignmentItem As List(Of ConsignmentItemMRType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._consignmentItem = New List(Of ConsignmentItemMRType)() + Me._applicationInternalData = New ApplicationInternalDataType() + Me._additionalInformation = New List(Of AdditionalInformationMRType)() + Me._additionalReference = New List(Of AdditionalReferenceMRType)() + Me._transportDocument = New List(Of TransportDocumentMRType)() + Me._supportingDocument = New List(Of SupportingDocumentMRType)() + Me._previousDocument = New List(Of PreviousDocumentMRType)() + Me._additionalSupplyChainActor = New List(Of AdditionalSupplyChainActorMRType)() + Me._consignee = New AddressMRType() + Me._consignor = New AddressMRType() + End Sub + + + Public Property HouseConsignmentNumber() As String + Get + Return Me._houseConsignmentNumber + End Get + Set + Me._houseConsignmentNumber = 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 AddressMRType + Get + Return Me._consignor + End Get + Set + Me._consignor = Value + End Set + End Property + + + Public Property Consignee() As AddressMRType + Get + Return Me._consignee + End Get + Set + Me._consignee = Value + End Set + End Property + + + Public Property AdditionalSupplyChainActor() As List(Of AdditionalSupplyChainActorMRType) + Get + Return Me._additionalSupplyChainActor + End Get + Set + Me._additionalSupplyChainActor = Value + End Set + End Property + + + Public Property PreviousDocument() As List(Of PreviousDocumentMRType) + Get + Return Me._previousDocument + End Get + Set + Me._previousDocument = Value + End Set + End Property + + + Public Property SupportingDocument() As List(Of SupportingDocumentMRType) + Get + Return Me._supportingDocument + End Get + Set + Me._supportingDocument = Value + End Set + End Property + + + Public Property TransportDocument() As List(Of TransportDocumentMRType) + Get + Return Me._transportDocument + End Get + Set + Me._transportDocument = Value + End Set + End Property + + + Public Property AdditionalReference() As List(Of AdditionalReferenceMRType) + Get + Return Me._additionalReference + End Get + Set + Me._additionalReference = Value + End Set + End Property + + + Public Property AdditionalInformation() As List(Of AdditionalInformationMRType) + Get + Return Me._additionalInformation + End Get + Set + Me._additionalInformation = Value + End Set + End Property + + + Public Property TransportCharges() As String + Get + Return Me._transportCharges + End Get + Set + Me._transportCharges = Value + End Set + End Property + + + Public Property ApplicationInternalData() As ApplicationInternalDataType + Get + Return Me._applicationInternalData + End Get + Set + Me._applicationInternalData = Value + End Set + End Property + + + Public Property ConsignmentItem() As List(Of ConsignmentItemMRType) + 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(HouseConsignmentMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize HouseConsignmentMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes HouseConsignmentMRType object + ''' + ''' string to deserialize + ''' Output HouseConsignmentMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As HouseConsignmentMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, HouseConsignmentMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As HouseConsignmentMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As HouseConsignmentMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), HouseConsignmentMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As HouseConsignmentMRType + Return CType(SerializerXml.Deserialize(s), HouseConsignmentMRType) + End Function +#End Region + + ''' + ''' Serializes current HouseConsignmentMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an HouseConsignmentMRType object + ''' + ''' File to load and deserialize + ''' Output HouseConsignmentMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HouseConsignmentMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, HouseConsignmentMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HouseConsignmentMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As HouseConsignmentMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class PreviousDocumentMRType + +#Region "Private fields" + Private _type As String + + Private _referenceNumber As String + + Private _complementOfInformation As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Type() As String + Get + Return Me._type + End Get + Set + Me._type = Value + End Set + End Property + + + Public Property 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(PreviousDocumentMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize PreviousDocumentMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes PreviousDocumentMRType object + ''' + ''' string to deserialize + ''' Output PreviousDocumentMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PreviousDocumentMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PreviousDocumentMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PreviousDocumentMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As PreviousDocumentMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PreviousDocumentMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As PreviousDocumentMRType + Return CType(SerializerXml.Deserialize(s), PreviousDocumentMRType) + End Function +#End Region + + ''' + ''' Serializes current PreviousDocumentMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an PreviousDocumentMRType object + ''' + ''' File to load and deserialize + ''' Output PreviousDocumentMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PreviousDocumentMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PreviousDocumentMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PreviousDocumentMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PreviousDocumentMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class LocationOfGoodsMRType + +#Region "Private fields" + Private _typeOfLocation As String + + Private _qualifierOfIdentification As String + + Private _additionalIdentifier As String + + Private _contactPerson As ContactPersonMRType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contactPerson = New ContactPersonMRType() + 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 ContactPersonMRType + 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(LocationOfGoodsMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize LocationOfGoodsMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes LocationOfGoodsMRType object + ''' + ''' string to deserialize + ''' Output LocationOfGoodsMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As LocationOfGoodsMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, LocationOfGoodsMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As LocationOfGoodsMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As LocationOfGoodsMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), LocationOfGoodsMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As LocationOfGoodsMRType + Return CType(SerializerXml.Deserialize(s), LocationOfGoodsMRType) + End Function +#End Region + + ''' + ''' Serializes current LocationOfGoodsMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an LocationOfGoodsMRType object + ''' + ''' File to load and deserialize + ''' Output LocationOfGoodsMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As LocationOfGoodsMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, LocationOfGoodsMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As LocationOfGoodsMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As LocationOfGoodsMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AuthorisationMRType + +#Region "Private fields" + Private _referenceNumber As String + + Private _type As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property ReferenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + + Public Property Type() As String + Get + Return Me._type + End Get + Set + Me._type = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AuthorisationMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AuthorisationMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AuthorisationMRType object + ''' + ''' string to deserialize + ''' Output AuthorisationMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AuthorisationMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AuthorisationMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AuthorisationMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AuthorisationMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AuthorisationMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AuthorisationMRType + Return CType(SerializerXml.Deserialize(s), AuthorisationMRType) + End Function +#End Region + + ''' + ''' Serializes current AuthorisationMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AuthorisationMRType object + ''' + ''' File to load and deserialize + ''' Output AuthorisationMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AuthorisationMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AuthorisationMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AuthorisationMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AuthorisationMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransportEquipmentMRType + +#Region "Private fields" + Private _numberOfSeals As String + + Private _seal As List(Of String) + + Private _containerIdentificationNumber As String + + Private _goodsReference As List(Of String) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsReference = New List(Of String)() + Me._seal = New List(Of String)() + End Sub + + + Public Property NumberOfSeals() As String + Get + Return Me._numberOfSeals + End Get + Set + Me._numberOfSeals = Value + End Set + End Property + + + Public Property Seal() As List(Of String) + Get + Return Me._seal + End Get + Set + Me._seal = Value + End Set + End Property + + + Public Property ContainerIdentificationNumber() As String + Get + Return Me._containerIdentificationNumber + End Get + Set + Me._containerIdentificationNumber = Value + End Set + End Property + + + Public Property GoodsReference() As List(Of String) + Get + Return Me._goodsReference + End Get + Set + Me._goodsReference = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransportEquipmentMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransportEquipmentMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransportEquipmentMRType object + ''' + ''' string to deserialize + ''' Output TransportEquipmentMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransportEquipmentMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransportEquipmentMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransportEquipmentMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransportEquipmentMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransportEquipmentMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransportEquipmentMRType + Return CType(SerializerXml.Deserialize(s), TransportEquipmentMRType) + End Function +#End Region + + ''' + ''' Serializes current TransportEquipmentMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransportEquipmentMRType object + ''' + ''' File to load and deserialize + ''' Output TransportEquipmentMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransportEquipmentMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransportEquipmentMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransportEquipmentMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransportEquipmentMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class CarrierMRType + +#Region "Private fields" + Private _identificationNumber As String + + Private _subsidiaryNumber As String + + Private _contactPerson As ContactPersonMRType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contactPerson = New ContactPersonMRType() + 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 ContactPersonMRType + 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(CarrierMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize CarrierMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes CarrierMRType object + ''' + ''' string to deserialize + ''' Output CarrierMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CarrierMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, CarrierMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CarrierMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As CarrierMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CarrierMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As CarrierMRType + Return CType(SerializerXml.Deserialize(s), CarrierMRType) + End Function +#End Region + + ''' + ''' Serializes current CarrierMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an CarrierMRType object + ''' + ''' File to load and deserialize + ''' Output CarrierMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CarrierMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, CarrierMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CarrierMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As CarrierMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class RepresentativeMRType + +#Region "Private fields" + Private _identificationNumber As String + + Private _name As String + + Private _streetAndNumber As String + + Private _city As String + + Private _postcode As String + + Private _country As String + + Private _contactPerson As ContactPersonMRType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contactPerson = New ContactPersonMRType() + 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 StreetAndNumber() As String + Get + Return Me._streetAndNumber + End Get + Set + Me._streetAndNumber = Value + End Set + End Property + + + Public Property City() As String + Get + Return Me._city + End Get + Set + Me._city = Value + End Set + End Property + + + Public Property Postcode() As String + Get + Return Me._postcode + End Get + Set + Me._postcode = Value + End Set + End Property + + + Public Property Country() As String + Get + Return Me._country + End Get + Set + Me._country = Value + End Set + End Property + + + Public Property ContactPerson() As ContactPersonMRType + 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(RepresentativeMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize RepresentativeMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes RepresentativeMRType object + ''' + ''' string to deserialize + ''' Output RepresentativeMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As RepresentativeMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, RepresentativeMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As RepresentativeMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As RepresentativeMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), RepresentativeMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As RepresentativeMRType + Return CType(SerializerXml.Deserialize(s), RepresentativeMRType) + End Function +#End Region + + ''' + ''' Serializes current RepresentativeMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an RepresentativeMRType object + ''' + ''' File to load and deserialize + ''' Output RepresentativeMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As RepresentativeMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, RepresentativeMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As RepresentativeMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As RepresentativeMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class HolderOfTheTransitProcedureMRType + +#Region "Private fields" + Private _identificationNumber As String + + Private _tIRHolderIdentificationNumber As String + + Private _name As String + + Private _streetAndNumber As String + + Private _city As String + + Private _postcode As String + + Private _country As String + + Private _contactPerson As ContactPersonMRType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contactPerson = New ContactPersonMRType() + 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 StreetAndNumber() As String + Get + Return Me._streetAndNumber + End Get + Set + Me._streetAndNumber = Value + End Set + End Property + + + Public Property City() As String + Get + Return Me._city + End Get + Set + Me._city = Value + End Set + End Property + + + Public Property Postcode() As String + Get + Return Me._postcode + End Get + Set + Me._postcode = Value + End Set + End Property + + + Public Property Country() As String + Get + Return Me._country + End Get + Set + Me._country = Value + End Set + End Property + + + Public Property ContactPerson() As ContactPersonMRType + 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(HolderOfTheTransitProcedureMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize HolderOfTheTransitProcedureMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes HolderOfTheTransitProcedureMRType object + ''' + ''' string to deserialize + ''' Output HolderOfTheTransitProcedureMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As HolderOfTheTransitProcedureMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, HolderOfTheTransitProcedureMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As HolderOfTheTransitProcedureMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As HolderOfTheTransitProcedureMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), HolderOfTheTransitProcedureMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As HolderOfTheTransitProcedureMRType + Return CType(SerializerXml.Deserialize(s), HolderOfTheTransitProcedureMRType) + End Function +#End Region + + ''' + ''' Serializes current HolderOfTheTransitProcedureMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an HolderOfTheTransitProcedureMRType object + ''' + ''' File to load and deserialize + ''' Output HolderOfTheTransitProcedureMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HolderOfTheTransitProcedureMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, HolderOfTheTransitProcedureMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HolderOfTheTransitProcedureMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As HolderOfTheTransitProcedureMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class CustomsOfficeOfTransitDeclaredMRType + +#Region "Private fields" + Private _referenceNumber As String + + Private _arrivalDateAndTimeEstimated As Date + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property ReferenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + + Public Property 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(CustomsOfficeOfTransitDeclaredMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize CustomsOfficeOfTransitDeclaredMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes CustomsOfficeOfTransitDeclaredMRType object + ''' + ''' string to deserialize + ''' Output CustomsOfficeOfTransitDeclaredMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CustomsOfficeOfTransitDeclaredMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, CustomsOfficeOfTransitDeclaredMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CustomsOfficeOfTransitDeclaredMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As CustomsOfficeOfTransitDeclaredMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CustomsOfficeOfTransitDeclaredMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As CustomsOfficeOfTransitDeclaredMRType + Return CType(SerializerXml.Deserialize(s), CustomsOfficeOfTransitDeclaredMRType) + End Function +#End Region + + ''' + ''' Serializes current CustomsOfficeOfTransitDeclaredMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an CustomsOfficeOfTransitDeclaredMRType object + ''' + ''' File to load and deserialize + ''' Output CustomsOfficeOfTransitDeclaredMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CustomsOfficeOfTransitDeclaredMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, CustomsOfficeOfTransitDeclaredMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CustomsOfficeOfTransitDeclaredMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As CustomsOfficeOfTransitDeclaredMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DepartureTransportMeansMRType + +#Region "Private fields" + Private _nationality As String + + Private _typeOfIdentification As String + + Private _identificationNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Nationality() As String + Get + Return Me._nationality + End Get + Set + Me._nationality = 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 + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DepartureTransportMeansMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DepartureTransportMeansMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DepartureTransportMeansMRType object + ''' + ''' string to deserialize + ''' Output DepartureTransportMeansMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DepartureTransportMeansMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DepartureTransportMeansMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DepartureTransportMeansMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DepartureTransportMeansMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DepartureTransportMeansMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DepartureTransportMeansMRType + Return CType(SerializerXml.Deserialize(s), DepartureTransportMeansMRType) + End Function +#End Region + + ''' + ''' Serializes current DepartureTransportMeansMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DepartureTransportMeansMRType object + ''' + ''' File to load and deserialize + ''' Output DepartureTransportMeansMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DepartureTransportMeansMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DepartureTransportMeansMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DepartureTransportMeansMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DepartureTransportMeansMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class PlaceOfLoadingMRType + +#Region "Private fields" + Private _location As String + + Private _country As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Location() As String + Get + Return Me._location + End Get + Set + Me._location = Value + End Set + End Property + + + Public Property Country() As String + Get + Return Me._country + End Get + Set + Me._country = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PlaceOfLoadingMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize PlaceOfLoadingMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes PlaceOfLoadingMRType object + ''' + ''' string to deserialize + ''' Output PlaceOfLoadingMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PlaceOfLoadingMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PlaceOfLoadingMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PlaceOfLoadingMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As PlaceOfLoadingMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PlaceOfLoadingMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As PlaceOfLoadingMRType + Return CType(SerializerXml.Deserialize(s), PlaceOfLoadingMRType) + End Function +#End Region + + ''' + ''' Serializes current PlaceOfLoadingMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an PlaceOfLoadingMRType object + ''' + ''' File to load and deserialize + ''' Output PlaceOfLoadingMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PlaceOfLoadingMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PlaceOfLoadingMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PlaceOfLoadingMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PlaceOfLoadingMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ActiveBorderTransportMeansMRType + +#Region "Private fields" + Private _nationality As String + + Private _typeOfIdentification As String + + Private _identificationNumber As String + + Private _conveyanceReferenceNumber As String + + Private _customsOfficeAtBorderDeclared As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Nationality() As String + Get + Return Me._nationality + End Get + Set + Me._nationality = 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 ConveyanceReferenceNumber() As String + Get + Return Me._conveyanceReferenceNumber + End Get + Set + Me._conveyanceReferenceNumber = Value + End Set + End Property + + + Public Property CustomsOfficeAtBorderDeclared() As String + 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(ActiveBorderTransportMeansMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ActiveBorderTransportMeansMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ActiveBorderTransportMeansMRType object + ''' + ''' string to deserialize + ''' Output ActiveBorderTransportMeansMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ActiveBorderTransportMeansMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ActiveBorderTransportMeansMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ActiveBorderTransportMeansMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ActiveBorderTransportMeansMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ActiveBorderTransportMeansMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ActiveBorderTransportMeansMRType + Return CType(SerializerXml.Deserialize(s), ActiveBorderTransportMeansMRType) + End Function +#End Region + + ''' + ''' Serializes current ActiveBorderTransportMeansMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ActiveBorderTransportMeansMRType object + ''' + ''' File to load and deserialize + ''' Output ActiveBorderTransportMeansMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ActiveBorderTransportMeansMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ActiveBorderTransportMeansMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ActiveBorderTransportMeansMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ActiveBorderTransportMeansMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class GuaranteeReferenceMRType + +#Region "Private fields" + Private _gRN As String + + Private _amountToBeCovered As Decimal + + Private _currency As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + 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 String + 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(GuaranteeReferenceMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize GuaranteeReferenceMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes GuaranteeReferenceMRType object + ''' + ''' string to deserialize + ''' Output GuaranteeReferenceMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GuaranteeReferenceMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, GuaranteeReferenceMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GuaranteeReferenceMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As GuaranteeReferenceMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), GuaranteeReferenceMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As GuaranteeReferenceMRType + Return CType(SerializerXml.Deserialize(s), GuaranteeReferenceMRType) + End Function +#End Region + + ''' + ''' Serializes current GuaranteeReferenceMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an GuaranteeReferenceMRType object + ''' + ''' File to load and deserialize + ''' Output GuaranteeReferenceMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GuaranteeReferenceMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, GuaranteeReferenceMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GuaranteeReferenceMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As GuaranteeReferenceMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class GuaranteeMRType + +#Region "Private fields" + Private _guaranteeType As String + + Private _otherGuaranteeReference As String + + Private _guaranteeReference As List(Of GuaranteeReferenceMRType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._guaranteeReference = New List(Of GuaranteeReferenceMRType)() + End Sub + + + 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 GuaranteeReferenceMRType) + 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(GuaranteeMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize GuaranteeMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes GuaranteeMRType object + ''' + ''' string to deserialize + ''' Output GuaranteeMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GuaranteeMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, GuaranteeMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GuaranteeMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As GuaranteeMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), GuaranteeMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As GuaranteeMRType + Return CType(SerializerXml.Deserialize(s), GuaranteeMRType) + End Function +#End Region + + ''' + ''' Serializes current GuaranteeMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an GuaranteeMRType object + ''' + ''' File to load and deserialize + ''' Output GuaranteeMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GuaranteeMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, GuaranteeMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GuaranteeMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As GuaranteeMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransitOperationMRType + +#Region "Private fields" + Private _mRN As String + + Private _customsOfficeOfDeparture As String + + Private _declarationAcceptanceDateAndTime As Date + + Private _releaseDateAndTime As Date + + Private _guarantee As List(Of GuaranteeMRType) + + Private _customsOfficeOfDestinationDeclared As String + + Private _nameOfAccompanyingDocument As String + + Private _security As String + + Private _referenceNumberUCR As String + + Private _activeBorderTransportMeans As List(Of ActiveBorderTransportMeansMRType) + + Private _specificCircumstanceIndicator As String + + Private _placeOfLoading As PlaceOfLoadingMRType + + Private _placeOfUnloading As PlaceOfLoadingMRType + + Private _transportCharges As String + + Private _declarationType As String + + Private _transitDeclarationType As String + + Private _tIRCarnetNumber As String + + Private _reducedDatasetIndicator As String + + Private _bindingItinerary As String + + Private _countryOfDispatch As String + + Private _countryOfDestination As String + + Private _grossMass As Decimal + + Private _containerIndicator As String + + Private _inlandModeOfTransport As String + + Private _modeOfTransportAtTheBorder As String + + Private _departureTransportMeans As List(Of DepartureTransportMeansMRType) + + Private _customsOfficeOfTransitDeclared As List(Of CustomsOfficeOfTransitDeclaredMRType) + + Private _customsOfficeOfExitForTransitDeclared As List(Of String) + + Private _countryOfRoutingOfConsignment As List(Of String) + + Private _consignor As AddressMRType + + Private _consignee As AddressMRType + + Private _holderOfTheTransitProcedure As HolderOfTheTransitProcedureMRType + + Private _representative As RepresentativeMRType + + Private _carrier As CarrierMRType + + Private _additionalSupplyChainActor As List(Of AdditionalSupplyChainActorMRType) + + Private _transportEquipment As List(Of TransportEquipmentMRType) + + Private _authorisation As List(Of AuthorisationMRType) + + Private _locationOfGoods As LocationOfGoodsMRType + + Private _previousDocument As List(Of PreviousDocumentMRType) + + Private _supportingDocument As List(Of SupportingDocumentMRType) + + Private _transportDocument As List(Of TransportDocumentMRType) + + Private _additionalReference As List(Of AdditionalReferenceMRType) + + Private _additionalInformation As List(Of AdditionalInformationMRType) + + Private _applicationInternalData As ApplicationInternalDataType + + Private _houseConsignment As List(Of HouseConsignmentMRType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._houseConsignment = New List(Of HouseConsignmentMRType)() + Me._applicationInternalData = New ApplicationInternalDataType() + Me._additionalInformation = New List(Of AdditionalInformationMRType)() + Me._additionalReference = New List(Of AdditionalReferenceMRType)() + Me._transportDocument = New List(Of TransportDocumentMRType)() + Me._supportingDocument = New List(Of SupportingDocumentMRType)() + Me._previousDocument = New List(Of PreviousDocumentMRType)() + Me._locationOfGoods = New LocationOfGoodsMRType() + Me._authorisation = New List(Of AuthorisationMRType)() + Me._transportEquipment = New List(Of TransportEquipmentMRType)() + Me._additionalSupplyChainActor = New List(Of AdditionalSupplyChainActorMRType)() + Me._carrier = New CarrierMRType() + Me._representative = New RepresentativeMRType() + Me._holderOfTheTransitProcedure = New HolderOfTheTransitProcedureMRType() + Me._consignee = New AddressMRType() + Me._consignor = New AddressMRType() + Me._countryOfRoutingOfConsignment = New List(Of String)() + Me._customsOfficeOfExitForTransitDeclared = New List(Of String)() + Me._customsOfficeOfTransitDeclared = New List(Of CustomsOfficeOfTransitDeclaredMRType)() + Me._departureTransportMeans = New List(Of DepartureTransportMeansMRType)() + Me._placeOfUnloading = New PlaceOfLoadingMRType() + Me._placeOfLoading = New PlaceOfLoadingMRType() + Me._activeBorderTransportMeans = New List(Of ActiveBorderTransportMeansMRType)() + Me._guarantee = New List(Of GuaranteeMRType)() + End Sub + + + Public Property MRN() As String + Get + Return Me._mRN + End Get + Set + Me._mRN = Value + End Set + End Property + + + Public Property CustomsOfficeOfDeparture() As String + Get + Return Me._customsOfficeOfDeparture + End Get + Set + Me._customsOfficeOfDeparture = 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 Guarantee() As List(Of GuaranteeMRType) + Get + Return Me._guarantee + End Get + Set + Me._guarantee = Value + End Set + End Property + + + Public Property CustomsOfficeOfDestinationDeclared() As String + Get + Return Me._customsOfficeOfDestinationDeclared + End Get + Set + Me._customsOfficeOfDestinationDeclared = Value + End Set + End Property + + + Public Property NameOfAccompanyingDocument() As String + Get + Return Me._nameOfAccompanyingDocument + End Get + Set + Me._nameOfAccompanyingDocument = 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 ReferenceNumberUCR() As String + Get + Return Me._referenceNumberUCR + End Get + Set + Me._referenceNumberUCR = Value + End Set + End Property + + + Public Property ActiveBorderTransportMeans() As List(Of ActiveBorderTransportMeansMRType) + Get + Return Me._activeBorderTransportMeans + End Get + Set + Me._activeBorderTransportMeans = 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 PlaceOfLoading() As PlaceOfLoadingMRType + Get + Return Me._placeOfLoading + End Get + Set + Me._placeOfLoading = Value + End Set + End Property + + + Public Property PlaceOfUnloading() As PlaceOfLoadingMRType + Get + Return Me._placeOfUnloading + End Get + Set + Me._placeOfUnloading = Value + End Set + End Property + + + Public Property TransportCharges() As String + Get + Return Me._transportCharges + End Get + Set + Me._transportCharges = Value + End Set + End Property + + + Public Property 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 ReducedDatasetIndicator() As String + Get + Return Me._reducedDatasetIndicator + End Get + Set + Me._reducedDatasetIndicator = Value + End Set + End Property + + + Public Property BindingItinerary() As String + Get + Return Me._bindingItinerary + End Get + Set + Me._bindingItinerary = 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 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 DepartureTransportMeans() As List(Of DepartureTransportMeansMRType) + Get + Return Me._departureTransportMeans + End Get + Set + Me._departureTransportMeans = Value + End Set + End Property + + + Public Property CustomsOfficeOfTransitDeclared() As List(Of CustomsOfficeOfTransitDeclaredMRType) + Get + Return Me._customsOfficeOfTransitDeclared + End Get + Set + Me._customsOfficeOfTransitDeclared = Value + End Set + End Property + + + Public Property CustomsOfficeOfExitForTransitDeclared() As List(Of String) + Get + Return Me._customsOfficeOfExitForTransitDeclared + End Get + Set + Me._customsOfficeOfExitForTransitDeclared = Value + End Set + End Property + + + Public Property CountryOfRoutingOfConsignment() As List(Of String) + Get + Return Me._countryOfRoutingOfConsignment + End Get + Set + Me._countryOfRoutingOfConsignment = Value + End Set + End Property + + + Public Property Consignor() As AddressMRType + Get + Return Me._consignor + End Get + Set + Me._consignor = Value + End Set + End Property + + + Public Property Consignee() As AddressMRType + Get + Return Me._consignee + End Get + Set + Me._consignee = Value + End Set + End Property + + + Public Property HolderOfTheTransitProcedure() As HolderOfTheTransitProcedureMRType + Get + Return Me._holderOfTheTransitProcedure + End Get + Set + Me._holderOfTheTransitProcedure = Value + End Set + End Property + + + Public Property Representative() As RepresentativeMRType + Get + Return Me._representative + End Get + Set + Me._representative = Value + End Set + End Property + + + Public Property Carrier() As CarrierMRType + Get + Return Me._carrier + End Get + Set + Me._carrier = Value + End Set + End Property + + + Public Property AdditionalSupplyChainActor() As List(Of AdditionalSupplyChainActorMRType) + Get + Return Me._additionalSupplyChainActor + End Get + Set + Me._additionalSupplyChainActor = Value + End Set + End Property + + + Public Property TransportEquipment() As List(Of TransportEquipmentMRType) + Get + Return Me._transportEquipment + End Get + Set + Me._transportEquipment = Value + End Set + End Property + + + Public Property Authorisation() As List(Of AuthorisationMRType) + Get + Return Me._authorisation + End Get + Set + Me._authorisation = Value + End Set + End Property + + + Public Property LocationOfGoods() As LocationOfGoodsMRType + Get + Return Me._locationOfGoods + End Get + Set + Me._locationOfGoods = Value + End Set + End Property + + + Public Property PreviousDocument() As List(Of PreviousDocumentMRType) + Get + Return Me._previousDocument + End Get + Set + Me._previousDocument = Value + End Set + End Property + + + Public Property SupportingDocument() As List(Of SupportingDocumentMRType) + Get + Return Me._supportingDocument + End Get + Set + Me._supportingDocument = Value + End Set + End Property + + + Public Property TransportDocument() As List(Of TransportDocumentMRType) + Get + Return Me._transportDocument + End Get + Set + Me._transportDocument = Value + End Set + End Property + + + Public Property AdditionalReference() As List(Of AdditionalReferenceMRType) + Get + Return Me._additionalReference + End Get + Set + Me._additionalReference = Value + End Set + End Property + + + Public Property AdditionalInformation() As List(Of AdditionalInformationMRType) + Get + Return Me._additionalInformation + End Get + Set + Me._additionalInformation = Value + End Set + End Property + + + Public Property ApplicationInternalData() As ApplicationInternalDataType + Get + Return Me._applicationInternalData + End Get + Set + Me._applicationInternalData = Value + End Set + End Property + + + Public Property HouseConsignment() As List(Of HouseConsignmentMRType) + 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(TransitOperationMRType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransitOperationMRType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransitOperationMRType object + ''' + ''' string to deserialize + ''' Output TransitOperationMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransitOperationMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransitOperationMRType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransitOperationMRType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransitOperationMRType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransitOperationMRType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransitOperationMRType + Return CType(SerializerXml.Deserialize(s), TransitOperationMRType) + End Function +#End Region + + ''' + ''' Serializes current TransitOperationMRType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransitOperationMRType object + ''' + ''' File to load and deserialize + ''' Output TransitOperationMRType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransitOperationMRType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransitOperationMRType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransitOperationMRType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransitOperationMRType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class PositionAVUVMRTyp + +#Region "Private fields" + Private _satznummer As String + + Private _kzZugangATLAS As String + + Private _registriernummer As String + + Private _positionsnummer As String + + Private _warenbezogeneAngaben As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Satznummer() As String + Get + Return Me._satznummer + End Get + Set + Me._satznummer = Value + End Set + End Property + + + Public Property KzZugangATLAS() As String + Get + Return Me._kzZugangATLAS + End Get + Set + Me._kzZugangATLAS = Value + End Set + End Property + + + Public Property Registriernummer() As String + Get + Return Me._registriernummer + End Get + Set + Me._registriernummer = Value + End Set + End Property + + + Public Property Positionsnummer() As String + Get + Return Me._positionsnummer + End Get + Set + Me._positionsnummer = Value + End Set + End Property + + + Public Property WarenbezogeneAngaben() As String + Get + Return Me._warenbezogeneAngaben + End Get + Set + Me._warenbezogeneAngaben = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PositionAVUVMRTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize PositionAVUVMRTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes PositionAVUVMRTyp object + ''' + ''' string to deserialize + ''' Output PositionAVUVMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PositionAVUVMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PositionAVUVMRTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PositionAVUVMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As PositionAVUVMRTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PositionAVUVMRTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As PositionAVUVMRTyp + Return CType(SerializerXml.Deserialize(s), PositionAVUVMRTyp) + End Function +#End Region + + ''' + ''' Serializes current PositionAVUVMRTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an PositionAVUVMRTyp object + ''' + ''' File to load and deserialize + ''' Output PositionAVUVMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PositionAVUVMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PositionAVUVMRTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PositionAVUVMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PositionAVUVMRTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class BeendigungAVUVMRTyp + +#Region "Private fields" + Private _kennzeichenAbgleichErfolgt As String + + Private _bewilligungsnummer As String + + Private _kzVereinfBewillAntrgAV As String + + Private _deutschesUeHZAbeiAV As String + + Private _positionAVUV As List(Of PositionAVUVMRTyp) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._positionAVUV = New List(Of PositionAVUVMRTyp)() + End Sub + + + Public Property KennzeichenAbgleichErfolgt() As String + Get + Return Me._kennzeichenAbgleichErfolgt + End Get + Set + Me._kennzeichenAbgleichErfolgt = Value + End Set + End Property + + + Public Property Bewilligungsnummer() As String + Get + Return Me._bewilligungsnummer + End Get + Set + Me._bewilligungsnummer = Value + End Set + End Property + + + Public Property KzVereinfBewillAntrgAV() As String + Get + Return Me._kzVereinfBewillAntrgAV + End Get + Set + Me._kzVereinfBewillAntrgAV = Value + End Set + End Property + + + Public Property DeutschesUeHZAbeiAV() As String + Get + Return Me._deutschesUeHZAbeiAV + End Get + Set + Me._deutschesUeHZAbeiAV = Value + End Set + End Property + + + Public Property PositionAVUV() As List(Of PositionAVUVMRTyp) + Get + Return Me._positionAVUV + End Get + Set + Me._positionAVUV = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(BeendigungAVUVMRTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize BeendigungAVUVMRTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes BeendigungAVUVMRTyp object + ''' + ''' string to deserialize + ''' Output BeendigungAVUVMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BeendigungAVUVMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BeendigungAVUVMRTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BeendigungAVUVMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As BeendigungAVUVMRTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), BeendigungAVUVMRTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As BeendigungAVUVMRTyp + Return CType(SerializerXml.Deserialize(s), BeendigungAVUVMRTyp) + End Function +#End Region + + ''' + ''' Serializes current BeendigungAVUVMRTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an BeendigungAVUVMRTyp object + ''' + ''' File to load and deserialize + ''' Output BeendigungAVUVMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BeendigungAVUVMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BeendigungAVUVMRTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BeendigungAVUVMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As BeendigungAVUVMRTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class HandelsmengeMRTyp + +#Region "Private fields" + Private _wert As Decimal + + Private _masseinheit As String + + Private _qualifikator As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Wert() As Decimal + Get + Return Me._wert + End Get + Set + Me._wert = Value + End Set + End Property + + + Public Property Masseinheit() As String + Get + Return Me._masseinheit + End Get + Set + Me._masseinheit = Value + End Set + End Property + + + Public Property Qualifikator() As String + Get + Return Me._qualifikator + End Get + Set + Me._qualifikator = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(HandelsmengeMRTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize HandelsmengeMRTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes HandelsmengeMRTyp object + ''' + ''' string to deserialize + ''' Output HandelsmengeMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As HandelsmengeMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, HandelsmengeMRTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As HandelsmengeMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As HandelsmengeMRTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), HandelsmengeMRTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As HandelsmengeMRTyp + Return CType(SerializerXml.Deserialize(s), HandelsmengeMRTyp) + End Function +#End Region + + ''' + ''' Serializes current HandelsmengeMRTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an HandelsmengeMRTyp object + ''' + ''' File to load and deserialize + ''' Output HandelsmengeMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HandelsmengeMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, HandelsmengeMRTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HandelsmengeMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As HandelsmengeMRTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AbgangsmengeMRTyp + +#Region "Private fields" + Private _wert As Decimal + + Private _masseinheit As String + + Private _qualifikator As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Wert() As Decimal + Get + Return Me._wert + End Get + Set + Me._wert = Value + End Set + End Property + + + Public Property Masseinheit() As String + Get + Return Me._masseinheit + End Get + Set + Me._masseinheit = Value + End Set + End Property + + + Public Property Qualifikator() As String + Get + Return Me._qualifikator + End Get + Set + Me._qualifikator = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AbgangsmengeMRTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AbgangsmengeMRTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AbgangsmengeMRTyp object + ''' + ''' string to deserialize + ''' Output AbgangsmengeMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AbgangsmengeMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AbgangsmengeMRTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AbgangsmengeMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AbgangsmengeMRTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AbgangsmengeMRTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AbgangsmengeMRTyp + Return CType(SerializerXml.Deserialize(s), AbgangsmengeMRTyp) + End Function +#End Region + + ''' + ''' Serializes current AbgangsmengeMRTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AbgangsmengeMRTyp object + ''' + ''' File to load and deserialize + ''' Output AbgangsmengeMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AbgangsmengeMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AbgangsmengeMRTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AbgangsmengeMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AbgangsmengeMRTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class PositionZLMRTyp + +#Region "Private fields" + Private _satznummer As String + + Private _warennummer As String + + Private _kzZugangATLAS As String + + Private _kzUeblicheBehandlung As String + + Private _registriernummer As String + + Private _positionsnummer As String + + Private _zusatz As String + + Private _abgangsmenge As AbgangsmengeMRTyp + + Private _handelsmenge As HandelsmengeMRTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._handelsmenge = New HandelsmengeMRTyp() + Me._abgangsmenge = New AbgangsmengeMRTyp() + End Sub + + + Public Property Satznummer() As String + Get + Return Me._satznummer + End Get + Set + Me._satznummer = Value + End Set + End Property + + + Public Property Warennummer() As String + Get + Return Me._warennummer + End Get + Set + Me._warennummer = Value + End Set + End Property + + + Public Property KzZugangATLAS() As String + Get + Return Me._kzZugangATLAS + End Get + Set + Me._kzZugangATLAS = Value + End Set + End Property + + + Public Property KzUeblicheBehandlung() As String + Get + Return Me._kzUeblicheBehandlung + End Get + Set + Me._kzUeblicheBehandlung = Value + End Set + End Property + + + Public Property Registriernummer() As String + Get + Return Me._registriernummer + End Get + Set + Me._registriernummer = Value + End Set + End Property + + + Public Property Positionsnummer() As String + Get + Return Me._positionsnummer + End Get + Set + Me._positionsnummer = Value + End Set + End Property + + + Public Property Zusatz() As String + Get + Return Me._zusatz + End Get + Set + Me._zusatz = Value + End Set + End Property + + + Public Property Abgangsmenge() As AbgangsmengeMRTyp + Get + Return Me._abgangsmenge + End Get + Set + Me._abgangsmenge = Value + End Set + End Property + + + Public Property Handelsmenge() As HandelsmengeMRTyp + Get + Return Me._handelsmenge + End Get + Set + Me._handelsmenge = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PositionZLMRTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize PositionZLMRTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes PositionZLMRTyp object + ''' + ''' string to deserialize + ''' Output PositionZLMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PositionZLMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PositionZLMRTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PositionZLMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As PositionZLMRTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PositionZLMRTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As PositionZLMRTyp + Return CType(SerializerXml.Deserialize(s), PositionZLMRTyp) + End Function +#End Region + + ''' + ''' Serializes current PositionZLMRTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an PositionZLMRTyp object + ''' + ''' File to load and deserialize + ''' Output PositionZLMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PositionZLMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PositionZLMRTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PositionZLMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PositionZLMRTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class BeendigungZLMRTyp + +#Region "Private fields" + Private _bezugsnummer As String + + Private _kennzeichenAbgleichErfolgt As String + + Private _bewilligungsnummer As String + + Private _positionZL As List(Of PositionZLMRTyp) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._positionZL = New List(Of PositionZLMRTyp)() + End Sub + + + Public Property Bezugsnummer() As String + Get + Return Me._bezugsnummer + End Get + Set + Me._bezugsnummer = Value + End Set + End Property + + + Public Property KennzeichenAbgleichErfolgt() As String + Get + Return Me._kennzeichenAbgleichErfolgt + End Get + Set + Me._kennzeichenAbgleichErfolgt = Value + End Set + End Property + + + Public Property Bewilligungsnummer() As String + Get + Return Me._bewilligungsnummer + End Get + Set + Me._bewilligungsnummer = Value + End Set + End Property + + + Public Property PositionZL() As List(Of PositionZLMRTyp) + Get + Return Me._positionZL + End Get + Set + Me._positionZL = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(BeendigungZLMRTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize BeendigungZLMRTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes BeendigungZLMRTyp object + ''' + ''' string to deserialize + ''' Output BeendigungZLMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BeendigungZLMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BeendigungZLMRTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BeendigungZLMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As BeendigungZLMRTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), BeendigungZLMRTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As BeendigungZLMRTyp + Return CType(SerializerXml.Deserialize(s), BeendigungZLMRTyp) + End Function +#End Region + + ''' + ''' Serializes current BeendigungZLMRTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an BeendigungZLMRTyp object + ''' + ''' File to load and deserialize + ''' Output BeendigungZLMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BeendigungZLMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BeendigungZLMRTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BeendigungZLMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As BeendigungZLMRTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class PositionSumAMRTyp + +#Region "Private fields" + Private _satznummer As String + + Private _stueckzahl As String + + Private _registriernummer As String + + Private _positionsnummer As String + + Private _verwahrerEORI As String + + Private _spOArt As String + + Private _spONummer As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Satznummer() As String + Get + Return Me._satznummer + End Get + Set + Me._satznummer = Value + End Set + End Property + + + Public Property Stueckzahl() As String + Get + Return Me._stueckzahl + End Get + Set + Me._stueckzahl = Value + End Set + End Property + + + Public Property Registriernummer() As String + Get + Return Me._registriernummer + End Get + Set + Me._registriernummer = Value + End Set + End Property + + + Public Property Positionsnummer() As String + Get + Return Me._positionsnummer + End Get + Set + Me._positionsnummer = Value + End Set + End Property + + + Public Property VerwahrerEORI() As String + Get + Return Me._verwahrerEORI + End Get + Set + Me._verwahrerEORI = Value + End Set + End Property + + + Public Property SpOArt() As String + Get + Return Me._spOArt + End Get + Set + Me._spOArt = Value + End Set + End Property + + + Public Property SpONummer() As String + Get + Return Me._spONummer + End Get + Set + Me._spONummer = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PositionSumAMRTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize PositionSumAMRTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes PositionSumAMRTyp object + ''' + ''' string to deserialize + ''' Output PositionSumAMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PositionSumAMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PositionSumAMRTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PositionSumAMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As PositionSumAMRTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PositionSumAMRTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As PositionSumAMRTyp + Return CType(SerializerXml.Deserialize(s), PositionSumAMRTyp) + End Function +#End Region + + ''' + ''' Serializes current PositionSumAMRTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an PositionSumAMRTyp object + ''' + ''' File to load and deserialize + ''' Output PositionSumAMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PositionSumAMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PositionSumAMRTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PositionSumAMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PositionSumAMRTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class BeendigungSumAMRTyp + +#Region "Private fields" + Private _kennzeichenAbgleichErfolgt As String + + Private _artIdentifikation As String + + Private _positionSumA As List(Of PositionSumAMRTyp) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._positionSumA = New List(Of PositionSumAMRTyp)() + End Sub + + + Public Property KennzeichenAbgleichErfolgt() As String + Get + Return Me._kennzeichenAbgleichErfolgt + End Get + Set + Me._kennzeichenAbgleichErfolgt = Value + End Set + End Property + + + Public Property ArtIdentifikation() As String + Get + Return Me._artIdentifikation + End Get + Set + Me._artIdentifikation = Value + End Set + End Property + + + Public Property PositionSumA() As List(Of PositionSumAMRTyp) + Get + Return Me._positionSumA + End Get + Set + Me._positionSumA = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(BeendigungSumAMRTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize BeendigungSumAMRTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes BeendigungSumAMRTyp object + ''' + ''' string to deserialize + ''' Output BeendigungSumAMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BeendigungSumAMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BeendigungSumAMRTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BeendigungSumAMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As BeendigungSumAMRTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), BeendigungSumAMRTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As BeendigungSumAMRTyp + Return CType(SerializerXml.Deserialize(s), BeendigungSumAMRTyp) + End Function +#End Region + + ''' + ''' Serializes current BeendigungSumAMRTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an BeendigungSumAMRTyp object + ''' + ''' File to load and deserialize + ''' Output BeendigungSumAMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BeendigungSumAMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BeendigungSumAMRTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BeendigungSumAMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As BeendigungSumAMRTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class BesondereVermerkeMRTyp + +#Region "Private fields" + Private _exportBeschraenkung As String + + Private _exportAbgaben As String + + Private _export As String + + Private _exportAusEU As String + + Private _exportAusLand As String + + Private _kz10600 As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property ExportBeschraenkung() As String + Get + Return Me._exportBeschraenkung + End Get + Set + Me._exportBeschraenkung = Value + End Set + End Property + + + Public Property ExportAbgaben() As String + Get + Return Me._exportAbgaben + End Get + Set + Me._exportAbgaben = Value + End Set + End Property + + + Public Property Export() As String + Get + Return Me._export + End Get + Set + Me._export = Value + End Set + End Property + + + Public Property ExportAusEU() As String + Get + Return Me._exportAusEU + End Get + Set + Me._exportAusEU = Value + End Set + End Property + + + Public Property ExportAusLand() As String + Get + Return Me._exportAusLand + End Get + Set + Me._exportAusLand = Value + End Set + End Property + + + Public Property Kz10600() As String + Get + Return Me._kz10600 + End Get + Set + Me._kz10600 = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(BesondereVermerkeMRTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize BesondereVermerkeMRTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes BesondereVermerkeMRTyp object + ''' + ''' string to deserialize + ''' Output BesondereVermerkeMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BesondereVermerkeMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BesondereVermerkeMRTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BesondereVermerkeMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As BesondereVermerkeMRTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), BesondereVermerkeMRTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As BesondereVermerkeMRTyp + Return CType(SerializerXml.Deserialize(s), BesondereVermerkeMRTyp) + End Function +#End Region + + ''' + ''' Serializes current BesondereVermerkeMRTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an BesondereVermerkeMRTyp object + ''' + ''' File to load and deserialize + ''' Output BesondereVermerkeMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BesondereVermerkeMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BesondereVermerkeMRTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BesondereVermerkeMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As BesondereVermerkeMRTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class VorgelegteUnterlBeschGenehmMRTyp + +#Region "Private fields" + Private _typ As String + + Private _referenz As String + + Private _zusatz As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Typ() As String + Get + Return Me._typ + End Get + Set + Me._typ = Value + End Set + End Property + + + Public Property Referenz() As String + Get + Return Me._referenz + End Get + Set + Me._referenz = Value + End Set + End Property + + + Public Property Zusatz() As String + Get + Return Me._zusatz + End Get + Set + Me._zusatz = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(VorgelegteUnterlBeschGenehmMRTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize VorgelegteUnterlBeschGenehmMRTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes VorgelegteUnterlBeschGenehmMRTyp object + ''' + ''' string to deserialize + ''' Output VorgelegteUnterlBeschGenehmMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VorgelegteUnterlBeschGenehmMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VorgelegteUnterlBeschGenehmMRTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VorgelegteUnterlBeschGenehmMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As VorgelegteUnterlBeschGenehmMRTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), VorgelegteUnterlBeschGenehmMRTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As VorgelegteUnterlBeschGenehmMRTyp + Return CType(SerializerXml.Deserialize(s), VorgelegteUnterlBeschGenehmMRTyp) + End Function +#End Region + + ''' + ''' Serializes current VorgelegteUnterlBeschGenehmMRTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an VorgelegteUnterlBeschGenehmMRTyp object + ''' + ''' File to load and deserialize + ''' Output VorgelegteUnterlBeschGenehmMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VorgelegteUnterlBeschGenehmMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VorgelegteUnterlBeschGenehmMRTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VorgelegteUnterlBeschGenehmMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As VorgelegteUnterlBeschGenehmMRTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class PackstueckMRTyp + +#Region "Private fields" + Private _anzahl As String + + Private _verpackungsart As String + + Private _zeichenNummern As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Anzahl() As String + Get + Return Me._anzahl + End Get + Set + Me._anzahl = Value + End Set + End Property + + + Public Property Verpackungsart() As String + Get + Return Me._verpackungsart + End Get + Set + Me._verpackungsart = Value + End Set + End Property + + + Public Property ZeichenNummern() As String + Get + Return Me._zeichenNummern + End Get + Set + Me._zeichenNummern = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PackstueckMRTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize PackstueckMRTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes PackstueckMRTyp object + ''' + ''' string to deserialize + ''' Output PackstueckMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PackstueckMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PackstueckMRTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PackstueckMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As PackstueckMRTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PackstueckMRTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As PackstueckMRTyp + Return CType(SerializerXml.Deserialize(s), PackstueckMRTyp) + End Function +#End Region + + ''' + ''' Serializes current PackstueckMRTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an PackstueckMRTyp object + ''' + ''' File to load and deserialize + ''' Output PackstueckMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PackstueckMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PackstueckMRTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PackstueckMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PackstueckMRTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class VorpapierMRTyp + +#Region "Private fields" + Private _referenz As String + + Private _zusatz As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Referenz() As String + Get + Return Me._referenz + End Get + Set + Me._referenz = Value + End Set + End Property + + + Public Property Zusatz() As String + Get + Return Me._zusatz + End Get + Set + Me._zusatz = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(VorpapierMRTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize VorpapierMRTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes VorpapierMRTyp object + ''' + ''' string to deserialize + ''' Output VorpapierMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VorpapierMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VorpapierMRTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VorpapierMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As VorpapierMRTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), VorpapierMRTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As VorpapierMRTyp + Return CType(SerializerXml.Deserialize(s), VorpapierMRTyp) + End Function +#End Region + + ''' + ''' Serializes current VorpapierMRTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an VorpapierMRTyp object + ''' + ''' File to load and deserialize + ''' Output VorpapierMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VorpapierMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VorpapierMRTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VorpapierMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As VorpapierMRTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class WarenPositionUeberlassungsmeldungTyp + +#Region "Private fields" + Private _positionsnummer As String + + Private _artAnmeldungPosition As String + + Private _versendungsAusfuhrlandPosition As String + + Private _bestimmungslandPosition As String + + Private _warennummer As String + + Private _kennnummerSendungPosition As String + + Private _befoerderungskostenZahlungsweisePosition As String + + Private _uNGefahrgutnummer As String + + Private _warenbezeichnung As String + + Private _rohmasse As Decimal + + Private _eigenmasse As Decimal + + Private _versenderPosition As AdresseMRTyp + + Private _versenderSumASicherheitPosition As AdresseMRTyp + + Private _empfaenger As AdresseMRTyp + + Private _empfaengerSumASicherheitPosition As AdresseMRTyp + + Private _vorpapiereTyp As String + + Private _vorpapier As List(Of VorpapierMRTyp) + + Private _packstuecke As List(Of PackstueckMRTyp) + + Private _containernummer As List(Of String) + + Private _vorgelegteUnterlagenBescheinigungenGenehmigungen As List(Of VorgelegteUnterlBeschGenehmMRTyp) + + Private _besondereVermerke As BesondereVermerkeMRTyp + + Private _beendigungSumA As BeendigungSumAMRTyp + + Private _beendigungZL As BeendigungZLMRTyp + + Private _beendigungAVUV As BeendigungAVUVMRTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._beendigungAVUV = New BeendigungAVUVMRTyp() + Me._beendigungZL = New BeendigungZLMRTyp() + Me._beendigungSumA = New BeendigungSumAMRTyp() + Me._besondereVermerke = New BesondereVermerkeMRTyp() + Me._vorgelegteUnterlagenBescheinigungenGenehmigungen = New List(Of VorgelegteUnterlBeschGenehmMRTyp)() + Me._containernummer = New List(Of String)() + Me._packstuecke = New List(Of PackstueckMRTyp)() + Me._vorpapier = New List(Of VorpapierMRTyp)() + Me._empfaengerSumASicherheitPosition = New AdresseMRTyp() + Me._empfaenger = New AdresseMRTyp() + Me._versenderSumASicherheitPosition = New AdresseMRTyp() + Me._versenderPosition = New AdresseMRTyp() + End Sub + + + Public Property Positionsnummer() As String + Get + Return Me._positionsnummer + End Get + Set + Me._positionsnummer = Value + End Set + End Property + + + Public Property ArtAnmeldungPosition() As String + Get + Return Me._artAnmeldungPosition + End Get + Set + Me._artAnmeldungPosition = Value + End Set + End Property + + + Public Property VersendungsAusfuhrlandPosition() As String + Get + Return Me._versendungsAusfuhrlandPosition + End Get + Set + Me._versendungsAusfuhrlandPosition = Value + End Set + End Property + + + Public Property BestimmungslandPosition() As String + Get + Return Me._bestimmungslandPosition + End Get + Set + Me._bestimmungslandPosition = Value + End Set + End Property + + + Public Property Warennummer() As String + Get + Return Me._warennummer + End Get + Set + Me._warennummer = Value + End Set + End Property + + + Public Property KennnummerSendungPosition() As String + Get + Return Me._kennnummerSendungPosition + End Get + Set + Me._kennnummerSendungPosition = Value + End Set + End Property + + + Public Property BefoerderungskostenZahlungsweisePosition() As String + Get + Return Me._befoerderungskostenZahlungsweisePosition + End Get + Set + Me._befoerderungskostenZahlungsweisePosition = Value + End Set + End Property + + + Public Property UNGefahrgutnummer() As String + Get + Return Me._uNGefahrgutnummer + End Get + Set + Me._uNGefahrgutnummer = Value + End Set + End Property + + + Public Property Warenbezeichnung() As String + Get + Return Me._warenbezeichnung + End Get + Set + Me._warenbezeichnung = Value + End Set + End Property + + + Public Property Rohmasse() As Decimal + Get + Return Me._rohmasse + End Get + Set + Me._rohmasse = Value + End Set + End Property + + + Public Property Eigenmasse() As Decimal + Get + Return Me._eigenmasse + End Get + Set + Me._eigenmasse = Value + End Set + End Property + + + Public Property VersenderPosition() As AdresseMRTyp + Get + Return Me._versenderPosition + End Get + Set + Me._versenderPosition = Value + End Set + End Property + + + Public Property VersenderSumASicherheitPosition() As AdresseMRTyp + Get + Return Me._versenderSumASicherheitPosition + End Get + Set + Me._versenderSumASicherheitPosition = Value + End Set + End Property + + + Public Property Empfaenger() As AdresseMRTyp + Get + Return Me._empfaenger + End Get + Set + Me._empfaenger = Value + End Set + End Property + + + Public Property EmpfaengerSumASicherheitPosition() As AdresseMRTyp + Get + Return Me._empfaengerSumASicherheitPosition + End Get + Set + Me._empfaengerSumASicherheitPosition = Value + End Set + End Property + + + Public Property VorpapiereTyp() As String + Get + Return Me._vorpapiereTyp + End Get + Set + Me._vorpapiereTyp = Value + End Set + End Property + + + Public Property Vorpapier() As List(Of VorpapierMRTyp) + Get + Return Me._vorpapier + End Get + Set + Me._vorpapier = Value + End Set + End Property + + + Public Property Packstuecke() As List(Of PackstueckMRTyp) + Get + Return Me._packstuecke + End Get + Set + Me._packstuecke = Value + End Set + End Property + + + Public Property Containernummer() As List(Of String) + Get + Return Me._containernummer + End Get + Set + Me._containernummer = Value + End Set + End Property + + + Public Property VorgelegteUnterlagenBescheinigungenGenehmigungen() As List(Of VorgelegteUnterlBeschGenehmMRTyp) + Get + Return Me._vorgelegteUnterlagenBescheinigungenGenehmigungen + End Get + Set + Me._vorgelegteUnterlagenBescheinigungenGenehmigungen = Value + End Set + End Property + + + Public Property BesondereVermerke() As BesondereVermerkeMRTyp + Get + Return Me._besondereVermerke + End Get + Set + Me._besondereVermerke = Value + End Set + End Property + + + Public Property BeendigungSumA() As BeendigungSumAMRTyp + Get + Return Me._beendigungSumA + End Get + Set + Me._beendigungSumA = Value + End Set + End Property + + + Public Property BeendigungZL() As BeendigungZLMRTyp + Get + Return Me._beendigungZL + End Get + Set + Me._beendigungZL = Value + End Set + End Property + + + Public Property BeendigungAVUV() As BeendigungAVUVMRTyp + Get + Return Me._beendigungAVUV + End Get + Set + Me._beendigungAVUV = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(WarenPositionUeberlassungsmeldungTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize WarenPositionUeberlassungsmeldungTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes WarenPositionUeberlassungsmeldungTyp object + ''' + ''' string to deserialize + ''' Output WarenPositionUeberlassungsmeldungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As WarenPositionUeberlassungsmeldungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, WarenPositionUeberlassungsmeldungTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As WarenPositionUeberlassungsmeldungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As WarenPositionUeberlassungsmeldungTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), WarenPositionUeberlassungsmeldungTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As WarenPositionUeberlassungsmeldungTyp + Return CType(SerializerXml.Deserialize(s), WarenPositionUeberlassungsmeldungTyp) + End Function +#End Region + + ''' + ''' Serializes current WarenPositionUeberlassungsmeldungTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an WarenPositionUeberlassungsmeldungTyp object + ''' + ''' File to load and deserialize + ''' Output WarenPositionUeberlassungsmeldungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As WarenPositionUeberlassungsmeldungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, WarenPositionUeberlassungsmeldungTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As WarenPositionUeberlassungsmeldungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As WarenPositionUeberlassungsmeldungTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AdresseMRTyp + +#Region "Private fields" + Private _eORI As String + + Private _identifikationsart As String + + Private _nLNR As String + + Private _name As String + + Private _strasseHausnummer As String + + Private _land As String + + Private _pLZ As String + + Private _ort As String + + Private _ansprechpartner As AnsprechpartnerMRTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._ansprechpartner = New AnsprechpartnerMRTyp() + End Sub + + + Public Property EORI() As String + Get + Return Me._eORI + End Get + Set + Me._eORI = Value + End Set + End Property + + + Public Property Identifikationsart() As String + Get + Return Me._identifikationsart + End Get + Set + Me._identifikationsart = Value + End Set + End Property + + + Public Property NLNR() As String + Get + Return Me._nLNR + End Get + Set + Me._nLNR = 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 StrasseHausnummer() As String + Get + Return Me._strasseHausnummer + End Get + Set + Me._strasseHausnummer = Value + End Set + End Property + + + Public Property Land() As String + Get + Return Me._land + End Get + Set + Me._land = Value + End Set + End Property + + + Public Property PLZ() As String + Get + Return Me._pLZ + End Get + Set + Me._pLZ = Value + End Set + End Property + + + Public Property Ort() As String + Get + Return Me._ort + End Get + Set + Me._ort = Value + End Set + End Property + + + Public Property Ansprechpartner() As AnsprechpartnerMRTyp + Get + Return Me._ansprechpartner + End Get + Set + Me._ansprechpartner = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdresseMRTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AdresseMRTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AdresseMRTyp object + ''' + ''' string to deserialize + ''' Output AdresseMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdresseMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdresseMRTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdresseMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AdresseMRTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdresseMRTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdresseMRTyp + Return CType(SerializerXml.Deserialize(s), AdresseMRTyp) + End Function +#End Region + + ''' + ''' Serializes current AdresseMRTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AdresseMRTyp object + ''' + ''' File to load and deserialize + ''' Output AdresseMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdresseMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdresseMRTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdresseMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdresseMRTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AnsprechpartnerMRTyp + +#Region "Private fields" + Private _sachbearbeiter As String + + Private _stellung As String + + Private _telefonnummer As String + + Private _telefaxnummer As String + + Private _emailAdresse As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Sachbearbeiter() As String + Get + Return Me._sachbearbeiter + End Get + Set + Me._sachbearbeiter = Value + End Set + End Property + + + Public Property Stellung() As String + Get + Return Me._stellung + End Get + Set + Me._stellung = Value + End Set + End Property + + + Public Property Telefonnummer() As String + Get + Return Me._telefonnummer + End Get + Set + Me._telefonnummer = Value + End Set + End Property + + + Public Property Telefaxnummer() As String + Get + Return Me._telefaxnummer + End Get + Set + Me._telefaxnummer = Value + End Set + End Property + + + Public Property EmailAdresse() As String + Get + Return Me._emailAdresse + End Get + Set + Me._emailAdresse = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AnsprechpartnerMRTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AnsprechpartnerMRTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AnsprechpartnerMRTyp object + ''' + ''' string to deserialize + ''' Output AnsprechpartnerMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AnsprechpartnerMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AnsprechpartnerMRTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AnsprechpartnerMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AnsprechpartnerMRTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AnsprechpartnerMRTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AnsprechpartnerMRTyp + Return CType(SerializerXml.Deserialize(s), AnsprechpartnerMRTyp) + End Function +#End Region + + ''' + ''' Serializes current AnsprechpartnerMRTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AnsprechpartnerMRTyp object + ''' + ''' File to load and deserialize + ''' Output AnsprechpartnerMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AnsprechpartnerMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AnsprechpartnerMRTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AnsprechpartnerMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AnsprechpartnerMRTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class VerschluesseMRTyp + +#Region "Private fields" + Private _art As String + + Private _anzahl As String + + Private _zeichen As List(Of String) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._zeichen = New List(Of String)() + End Sub + + + Public Property Art() As String + Get + Return Me._art + End Get + Set + Me._art = Value + End Set + End Property + + + Public Property Anzahl() As String + Get + Return Me._anzahl + End Get + Set + Me._anzahl = Value + End Set + End Property + + + Public Property Zeichen() As List(Of String) + Get + Return Me._zeichen + End Get + Set + Me._zeichen = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(VerschluesseMRTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize VerschluesseMRTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes VerschluesseMRTyp object + ''' + ''' string to deserialize + ''' Output VerschluesseMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VerschluesseMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VerschluesseMRTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VerschluesseMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As VerschluesseMRTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), VerschluesseMRTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As VerschluesseMRTyp + Return CType(SerializerXml.Deserialize(s), VerschluesseMRTyp) + End Function +#End Region + + ''' + ''' Serializes current VerschluesseMRTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an VerschluesseMRTyp object + ''' + ''' File to load and deserialize + ''' Output VerschluesseMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VerschluesseMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VerschluesseMRTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VerschluesseMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As VerschluesseMRTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AdresseTINKurzMRTyp + +#Region "Private fields" + Private _eORI As String + + Private _nLNR As String + + Private _iDCarnet As String + + Private _name As String + + Private _strasseHausnummer As String + + Private _land As String + + Private _pLZ As String + + Private _ort As String + + Private _ansprechpartner As AnsprechpartnerMRTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._ansprechpartner = New AnsprechpartnerMRTyp() + End Sub + + + Public Property EORI() As String + Get + Return Me._eORI + End Get + Set + Me._eORI = Value + End Set + End Property + + + Public Property NLNR() As String + Get + Return Me._nLNR + End Get + Set + Me._nLNR = Value + End Set + End Property + + + Public Property IDCarnet() As String + Get + Return Me._iDCarnet + End Get + Set + Me._iDCarnet = 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 StrasseHausnummer() As String + Get + Return Me._strasseHausnummer + End Get + Set + Me._strasseHausnummer = Value + End Set + End Property + + + Public Property Land() As String + Get + Return Me._land + End Get + Set + Me._land = Value + End Set + End Property + + + Public Property PLZ() As String + Get + Return Me._pLZ + End Get + Set + Me._pLZ = Value + End Set + End Property + + + Public Property Ort() As String + Get + Return Me._ort + End Get + Set + Me._ort = Value + End Set + End Property + + + Public Property Ansprechpartner() As AnsprechpartnerMRTyp + Get + Return Me._ansprechpartner + End Get + Set + Me._ansprechpartner = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdresseTINKurzMRTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AdresseTINKurzMRTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AdresseTINKurzMRTyp object + ''' + ''' string to deserialize + ''' Output AdresseTINKurzMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdresseTINKurzMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdresseTINKurzMRTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdresseTINKurzMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AdresseTINKurzMRTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdresseTINKurzMRTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdresseTINKurzMRTyp + Return CType(SerializerXml.Deserialize(s), AdresseTINKurzMRTyp) + End Function +#End Region + + ''' + ''' Serializes current AdresseTINKurzMRTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AdresseTINKurzMRTyp object + ''' + ''' File to load and deserialize + ''' Output AdresseTINKurzMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdresseTINKurzMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdresseTINKurzMRTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdresseTINKurzMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdresseTINKurzMRTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class BefoerderungsmittelAbgangMRTyp + +#Region "Private fields" + Private _staatszugehoerigkeit As String + + Private _kennzeichen As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Staatszugehoerigkeit() As String + Get + Return Me._staatszugehoerigkeit + End Get + Set + Me._staatszugehoerigkeit = Value + End Set + End Property + + + Public Property Kennzeichen() As String + Get + Return Me._kennzeichen + End Get + Set + Me._kennzeichen = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(BefoerderungsmittelAbgangMRTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize BefoerderungsmittelAbgangMRTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes BefoerderungsmittelAbgangMRTyp object + ''' + ''' string to deserialize + ''' Output BefoerderungsmittelAbgangMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BefoerderungsmittelAbgangMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BefoerderungsmittelAbgangMRTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BefoerderungsmittelAbgangMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As BefoerderungsmittelAbgangMRTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), BefoerderungsmittelAbgangMRTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As BefoerderungsmittelAbgangMRTyp + Return CType(SerializerXml.Deserialize(s), BefoerderungsmittelAbgangMRTyp) + End Function +#End Region + + ''' + ''' Serializes current BefoerderungsmittelAbgangMRTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an BefoerderungsmittelAbgangMRTyp object + ''' + ''' File to load and deserialize + ''' Output BefoerderungsmittelAbgangMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BefoerderungsmittelAbgangMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BefoerderungsmittelAbgangMRTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BefoerderungsmittelAbgangMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As BefoerderungsmittelAbgangMRTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class VerbindlicheBefoerderungsrouteMRTyp + +#Region "Private fields" + Private _beschreibung As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Beschreibung() As String + Get + Return Me._beschreibung + End Get + Set + Me._beschreibung = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(VerbindlicheBefoerderungsrouteMRTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize VerbindlicheBefoerderungsrouteMRTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes VerbindlicheBefoerderungsrouteMRTyp object + ''' + ''' string to deserialize + ''' Output VerbindlicheBefoerderungsrouteMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VerbindlicheBefoerderungsrouteMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VerbindlicheBefoerderungsrouteMRTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VerbindlicheBefoerderungsrouteMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As VerbindlicheBefoerderungsrouteMRTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), VerbindlicheBefoerderungsrouteMRTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As VerbindlicheBefoerderungsrouteMRTyp + Return CType(SerializerXml.Deserialize(s), VerbindlicheBefoerderungsrouteMRTyp) + End Function +#End Region + + ''' + ''' Serializes current VerbindlicheBefoerderungsrouteMRTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an VerbindlicheBefoerderungsrouteMRTyp object + ''' + ''' File to load and deserialize + ''' Output VerbindlicheBefoerderungsrouteMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VerbindlicheBefoerderungsrouteMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VerbindlicheBefoerderungsrouteMRTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VerbindlicheBefoerderungsrouteMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As VerbindlicheBefoerderungsrouteMRTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class SicherheitMRTyp + +#Region "Private fields" + Private _art As String + + Private _bezeichnung As String + + Private _betrag As Decimal + + Private _sicherheitengeberTIN As String + + Private _waehrung As String + + Private _bescheinigung As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Art() As String + Get + Return Me._art + End Get + Set + Me._art = Value + End Set + End Property + + + Public Property Bezeichnung() As String + Get + Return Me._bezeichnung + End Get + Set + Me._bezeichnung = Value + End Set + End Property + + + Public Property Betrag() As Decimal + Get + Return Me._betrag + End Get + Set + Me._betrag = Value + End Set + End Property + + + Public Property SicherheitengeberTIN() As String + Get + Return Me._sicherheitengeberTIN + End Get + Set + Me._sicherheitengeberTIN = Value + End Set + End Property + + + Public Property Waehrung() As String + Get + Return Me._waehrung + End Get + Set + Me._waehrung = Value + End Set + End Property + + + Public Property Bescheinigung() As String + Get + Return Me._bescheinigung + End Get + Set + Me._bescheinigung = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(SicherheitMRTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize SicherheitMRTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes SicherheitMRTyp object + ''' + ''' string to deserialize + ''' Output SicherheitMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SicherheitMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SicherheitMRTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SicherheitMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As SicherheitMRTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), SicherheitMRTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As SicherheitMRTyp + Return CType(SerializerXml.Deserialize(s), SicherheitMRTyp) + End Function +#End Region + + ''' + ''' Serializes current SicherheitMRTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an SicherheitMRTyp object + ''' + ''' File to load and deserialize + ''' Output SicherheitMRTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SicherheitMRTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SicherheitMRTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SicherheitMRTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As SicherheitMRTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class KopfDatenUeberlassungsmeldungTyp + +#Region "Private fields" + Private _mRN As String + + Private _abgangszollstelle As String + + Private _annahmedatum As Date + + Private _ueberlassungsdatum As Date + + Private _wiedergestellungsdatum As Date + + Private _sicherheit As List(Of SicherheitMRTyp) + + Private _bestimmungszollstelle As String + + Private _vBDName As String + + Private _arbeitsnummer As String + + Private _kzSumASicherheit As String + + Private _kennnummerSendung As String + + Private _nummerBefoerderung As String + + Private _besondereUmstaende As String + + Private _ladeort As String + + Private _entladeort As String + + Private _befoerderungskostenZahlungsweise As String + + Private _artAnmeldung As String + + Private _anzahlPositionen As String + + Private _packstueckeGesamt As String + + Private _versendungsAusfuhrland As String + + Private _bestimmungsland As String + + Private _gesamtRohmasse As Decimal + + Private _kontrollErgebnis As String + + Private _verbindlicheBefoerderungsroute As VerbindlicheBefoerderungsrouteMRTyp + + Private _befoerderungsmittelAbgang As BefoerderungsmittelAbgangMRTyp + + Private _durchgangszollstelleNCTS As List(Of String) + + Private _befoerderungsrouteSumASicherheitLand As List(Of String) + + Private _versender As AdresseMRTyp + + Private _versenderSumASicherheit As AdresseMRTyp + + Private _empfaenger As AdresseMRTyp + + Private _empfaengerSumASicherheit As AdresseMRTyp + + Private _hauptverpflichteter As AdresseTINKurzMRTyp + + Private _befoerderer As AdresseMRTyp + + Private _zugelassenerEmpfaengerEORI As String + + Private _verschluesse As VerschluesseMRTyp + + Private _bewilligungZV As String + + Private _bewilligungBV As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._verschluesse = New VerschluesseMRTyp() + Me._befoerderer = New AdresseMRTyp() + Me._hauptverpflichteter = New AdresseTINKurzMRTyp() + Me._empfaengerSumASicherheit = New AdresseMRTyp() + Me._empfaenger = New AdresseMRTyp() + Me._versenderSumASicherheit = New AdresseMRTyp() + Me._versender = New AdresseMRTyp() + Me._befoerderungsrouteSumASicherheitLand = New List(Of String)() + Me._durchgangszollstelleNCTS = New List(Of String)() + Me._befoerderungsmittelAbgang = New BefoerderungsmittelAbgangMRTyp() + Me._verbindlicheBefoerderungsroute = New VerbindlicheBefoerderungsrouteMRTyp() + Me._sicherheit = New List(Of SicherheitMRTyp)() + End Sub + + + Public Property MRN() As String + Get + Return Me._mRN + End Get + Set + Me._mRN = Value + End Set + End Property + + + Public Property Abgangszollstelle() As String + Get + Return Me._abgangszollstelle + End Get + Set + Me._abgangszollstelle = Value + End Set + End Property + + + Public Property Annahmedatum() As Date + Get + Return Me._annahmedatum + End Get + Set + Me._annahmedatum = Value + End Set + End Property + + + Public Property Ueberlassungsdatum() As Date + Get + Return Me._ueberlassungsdatum + End Get + Set + Me._ueberlassungsdatum = Value + End Set + End Property + + + Public Property Wiedergestellungsdatum() As Date + Get + Return Me._wiedergestellungsdatum + End Get + Set + Me._wiedergestellungsdatum = Value + End Set + End Property + + + Public Property Sicherheit() As List(Of SicherheitMRTyp) + Get + Return Me._sicherheit + End Get + Set + Me._sicherheit = Value + End Set + End Property + + + Public Property Bestimmungszollstelle() As String + Get + Return Me._bestimmungszollstelle + End Get + Set + Me._bestimmungszollstelle = Value + End Set + End Property + + + Public Property VBDName() As String + Get + Return Me._vBDName + End Get + Set + Me._vBDName = Value + End Set + End Property + + + Public Property Arbeitsnummer() As String + Get + Return Me._arbeitsnummer + End Get + Set + Me._arbeitsnummer = Value + End Set + End Property + + + Public Property KzSumASicherheit() As String + Get + Return Me._kzSumASicherheit + End Get + Set + Me._kzSumASicherheit = Value + End Set + End Property + + + Public Property KennnummerSendung() As String + Get + Return Me._kennnummerSendung + End Get + Set + Me._kennnummerSendung = Value + End Set + End Property + + + Public Property NummerBefoerderung() As String + Get + Return Me._nummerBefoerderung + End Get + Set + Me._nummerBefoerderung = Value + End Set + End Property + + + Public Property BesondereUmstaende() As String + Get + Return Me._besondereUmstaende + End Get + Set + Me._besondereUmstaende = Value + End Set + End Property + + + Public Property Ladeort() As String + Get + Return Me._ladeort + End Get + Set + Me._ladeort = Value + End Set + End Property + + + Public Property Entladeort() As String + Get + Return Me._entladeort + End Get + Set + Me._entladeort = Value + End Set + End Property + + + Public Property BefoerderungskostenZahlungsweise() As String + Get + Return Me._befoerderungskostenZahlungsweise + End Get + Set + Me._befoerderungskostenZahlungsweise = Value + End Set + End Property + + + Public Property ArtAnmeldung() As String + Get + Return Me._artAnmeldung + End Get + Set + Me._artAnmeldung = Value + End Set + End Property + + + Public Property AnzahlPositionen() As String + Get + Return Me._anzahlPositionen + End Get + Set + Me._anzahlPositionen = Value + End Set + End Property + + + Public Property PackstueckeGesamt() As String + Get + Return Me._packstueckeGesamt + End Get + Set + Me._packstueckeGesamt = Value + End Set + End Property + + + Public Property VersendungsAusfuhrland() As String + Get + Return Me._versendungsAusfuhrland + End Get + Set + Me._versendungsAusfuhrland = Value + End Set + End Property + + + Public Property Bestimmungsland() As String + Get + Return Me._bestimmungsland + End Get + Set + Me._bestimmungsland = Value + End Set + End Property + + + Public Property GesamtRohmasse() As Decimal + Get + Return Me._gesamtRohmasse + End Get + Set + Me._gesamtRohmasse = Value + End Set + End Property + + + Public Property KontrollErgebnis() As String + Get + Return Me._kontrollErgebnis + End Get + Set + Me._kontrollErgebnis = Value + End Set + End Property + + + Public Property VerbindlicheBefoerderungsroute() As VerbindlicheBefoerderungsrouteMRTyp + Get + Return Me._verbindlicheBefoerderungsroute + End Get + Set + Me._verbindlicheBefoerderungsroute = Value + End Set + End Property + + + Public Property BefoerderungsmittelAbgang() As BefoerderungsmittelAbgangMRTyp + Get + Return Me._befoerderungsmittelAbgang + End Get + Set + Me._befoerderungsmittelAbgang = Value + End Set + End Property + + + Public Property DurchgangszollstelleNCTS() As List(Of String) + Get + Return Me._durchgangszollstelleNCTS + End Get + Set + Me._durchgangszollstelleNCTS = Value + End Set + End Property + + + Public Property BefoerderungsrouteSumASicherheitLand() As List(Of String) + Get + Return Me._befoerderungsrouteSumASicherheitLand + End Get + Set + Me._befoerderungsrouteSumASicherheitLand = Value + End Set + End Property + + + Public Property Versender() As AdresseMRTyp + Get + Return Me._versender + End Get + Set + Me._versender = Value + End Set + End Property + + + Public Property VersenderSumASicherheit() As AdresseMRTyp + Get + Return Me._versenderSumASicherheit + End Get + Set + Me._versenderSumASicherheit = Value + End Set + End Property + + + Public Property Empfaenger() As AdresseMRTyp + Get + Return Me._empfaenger + End Get + Set + Me._empfaenger = Value + End Set + End Property + + + Public Property EmpfaengerSumASicherheit() As AdresseMRTyp + Get + Return Me._empfaengerSumASicherheit + End Get + Set + Me._empfaengerSumASicherheit = Value + End Set + End Property + + + Public Property Hauptverpflichteter() As AdresseTINKurzMRTyp + Get + Return Me._hauptverpflichteter + End Get + Set + Me._hauptverpflichteter = Value + End Set + End Property + + + Public Property Befoerderer() As AdresseMRTyp + Get + Return Me._befoerderer + End Get + Set + Me._befoerderer = Value + End Set + End Property + + + Public Property ZugelassenerEmpfaengerEORI() As String + Get + Return Me._zugelassenerEmpfaengerEORI + End Get + Set + Me._zugelassenerEmpfaengerEORI = Value + End Set + End Property + + + Public Property Verschluesse() As VerschluesseMRTyp + Get + Return Me._verschluesse + End Get + Set + Me._verschluesse = Value + End Set + End Property + + + Public Property BewilligungZV() As String + Get + Return Me._bewilligungZV + End Get + Set + Me._bewilligungZV = Value + End Set + End Property + + + Public Property BewilligungBV() As String + Get + Return Me._bewilligungBV + End Get + Set + Me._bewilligungBV = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(KopfDatenUeberlassungsmeldungTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize KopfDatenUeberlassungsmeldungTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes KopfDatenUeberlassungsmeldungTyp object + ''' + ''' string to deserialize + ''' Output KopfDatenUeberlassungsmeldungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As KopfDatenUeberlassungsmeldungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, KopfDatenUeberlassungsmeldungTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As KopfDatenUeberlassungsmeldungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As KopfDatenUeberlassungsmeldungTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), KopfDatenUeberlassungsmeldungTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As KopfDatenUeberlassungsmeldungTyp + Return CType(SerializerXml.Deserialize(s), KopfDatenUeberlassungsmeldungTyp) + End Function +#End Region + + ''' + ''' Serializes current KopfDatenUeberlassungsmeldungTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an KopfDatenUeberlassungsmeldungTyp object + ''' + ''' File to load and deserialize + ''' Output KopfDatenUeberlassungsmeldungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As KopfDatenUeberlassungsmeldungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, KopfDatenUeberlassungsmeldungTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As KopfDatenUeberlassungsmeldungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As KopfDatenUeberlassungsmeldungTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransaktionNCTSTyp + +#Region "Private fields" + Private _iOPartner As String + + Private _iODivision1 As String + + Private _iODivision2 As String + + Private _iODivision3 As String + + Private _iOReferenz As String + + Private _iODatumZeit As Date + + Private _version As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property IOPartner() As String + Get + Return Me._iOPartner + End Get + Set + Me._iOPartner = Value + End Set + End Property + + + Public Property IODivision1() As String + Get + Return Me._iODivision1 + End Get + Set + Me._iODivision1 = Value + End Set + End Property + + + Public Property IODivision2() As String + Get + Return Me._iODivision2 + End Get + Set + Me._iODivision2 = Value + End Set + End Property + + + Public Property IODivision3() As String + Get + Return Me._iODivision3 + End Get + Set + Me._iODivision3 = Value + End Set + End Property + + + Public Property IOReferenz() As String + Get + Return Me._iOReferenz + End Get + Set + Me._iOReferenz = Value + End Set + End Property + + + Public Property IODatumZeit() As Date + Get + Return Me._iODatumZeit + End Get + Set + Me._iODatumZeit = Value + End Set + End Property + + + Public Property Version() As String + Get + Return Me._version + End Get + Set + Me._version = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransaktionNCTSTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransaktionNCTSTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransaktionNCTSTyp object + ''' + ''' string to deserialize + ''' Output TransaktionNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransaktionNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransaktionNCTSTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransaktionNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransaktionNCTSTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransaktionNCTSTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransaktionNCTSTyp + Return CType(SerializerXml.Deserialize(s), TransaktionNCTSTyp) + End Function +#End Region + + ''' + ''' Serializes current TransaktionNCTSTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransaktionNCTSTyp object + ''' + ''' File to load and deserialize + ''' Output TransaktionNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransaktionNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransaktionNCTSTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransaktionNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransaktionNCTSTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DatenaustauschNCTSTyp + +#Region "Private fields" + Private _transaktion As TransaktionNCTSTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._transaktion = New TransaktionNCTSTyp() + End Sub + + + Public Property Transaktion() As TransaktionNCTSTyp + Get + Return Me._transaktion + End Get + Set + Me._transaktion = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DatenaustauschNCTSTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DatenaustauschNCTSTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DatenaustauschNCTSTyp object + ''' + ''' string to deserialize + ''' Output DatenaustauschNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DatenaustauschNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DatenaustauschNCTSTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DatenaustauschNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DatenaustauschNCTSTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DatenaustauschNCTSTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DatenaustauschNCTSTyp + Return CType(SerializerXml.Deserialize(s), DatenaustauschNCTSTyp) + End Function +#End Region + + ''' + ''' Serializes current DatenaustauschNCTSTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DatenaustauschNCTSTyp object + ''' + ''' File to load and deserialize + ''' Output DatenaustauschNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DatenaustauschNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DatenaustauschNCTSTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DatenaustauschNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DatenaustauschNCTSTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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/UeberlassungsmeldungNCTSDE_008.xsd b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Ueberlassungsmeldung/UeberlassungsmeldungNCTSDE_008.xsd new file mode 100644 index 0000000..4665671 --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Ueberlassungsmeldung/UeberlassungsmeldungNCTSDE_008.xsd @@ -0,0 +1,917 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Ueberlassungsmeldung/xsd2code.config b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Ueberlassungsmeldung/xsd2code.config new file mode 100644 index 0000000..59ccfed --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Ueberlassungsmeldung/xsd2code.config @@ -0,0 +1,17 @@ + + + Net47 + UeberlassungsmeldungNCTSDE_008 + VisualBasic + xsd2code.exe <XSD File> UeberlassungsmeldungNCTSDE_008 <Output file> /l VisualBasic /p Net47 /clean /s /xml /xa /Indent2Space + + + true + + + + true + AllClasses + + + diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/UngueltigkeitSicherheit/UngueltigkeitSicherheitenNCTSDE_004.Designer.vb b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/UngueltigkeitSicherheit/UngueltigkeitSicherheitenNCTSDE_004.Designer.vb new file mode 100644 index 0000000..36336b6 --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/UngueltigkeitSicherheit/UngueltigkeitSicherheitenNCTSDE_004.Designer.vb @@ -0,0 +1,3360 @@ +'' ------------------------------------------------------------------------------ +'' +'' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com +'' {"TargetFramework":"Net45","NameSpace":"UngueltigkeitSicherheitenNCTSDE_004","Language":"VisualBasic","CollectionBase":"","ExcludeImportedTypes":true,"ExpandNestedAttributeGroup":true,"GenerateUnusedComplexType":true,"GenerateUnusedSimpleType":true,"Properties":{},"ClassParams":{"GenerateInSeparateFilesDirectory":""},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{},"JsonOutput":{},"Enabled":true,"DefaultEncoder":"ASCII"},"Miscellaneous":{"EnableWarning":true}} +'' +'' ------------------------------------------------------------------------------ +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 UngueltigkeitSicherheitenNCTSDE_004 + + + Partial Public Class UngueltigkeitSicherheitenMITyp + Inherits DatenaustauschNCTSTyp + +#Region "Private fields" + Private _einzelUngueltigkeitSicherheiten As EinzelUngueltigkeitSicherheitenTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._einzelUngueltigkeitSicherheiten = New EinzelUngueltigkeitSicherheitenTyp() + End Sub + + Public Property EinzelUngueltigkeitSicherheiten() As EinzelUngueltigkeitSicherheitenTyp + Get + Return Me._einzelUngueltigkeitSicherheiten + End Get + Set + Me._einzelUngueltigkeitSicherheiten = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(UngueltigkeitSicherheitenMITyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize UngueltigkeitSicherheitenMITyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes UngueltigkeitSicherheitenMITyp object + ''' + ''' string to deserialize + ''' Output UngueltigkeitSicherheitenMITyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As UngueltigkeitSicherheitenMITyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, UngueltigkeitSicherheitenMITyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As UngueltigkeitSicherheitenMITyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As UngueltigkeitSicherheitenMITyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), UngueltigkeitSicherheitenMITyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As UngueltigkeitSicherheitenMITyp + Return CType(SerializerXml.Deserialize(s), UngueltigkeitSicherheitenMITyp) + End Function +#End Region + + ''' + ''' Serializes current UngueltigkeitSicherheitenMITyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an UngueltigkeitSicherheitenMITyp object + ''' + ''' File to load and deserialize + ''' Output UngueltigkeitSicherheitenMITyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As UngueltigkeitSicherheitenMITyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, UngueltigkeitSicherheitenMITyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As UngueltigkeitSicherheitenMITyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As UngueltigkeitSicherheitenMITyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class EinzelUngueltigkeitSicherheitenTyp + +#Region "Private fields" + Private _objektIdentifizierung As ObjektIdentifizierungMITyp + + Private _kopfDaten As KopfDatenUngueltigkeitSicherheitenTyp + + Private _transitOperation As TransitOperationMIType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._transitOperation = New TransitOperationMIType() + Me._kopfDaten = New KopfDatenUngueltigkeitSicherheitenTyp() + Me._objektIdentifizierung = New ObjektIdentifizierungMITyp() + End Sub + + Public Property ObjektIdentifizierung() As ObjektIdentifizierungMITyp + Get + Return Me._objektIdentifizierung + End Get + Set + Me._objektIdentifizierung = Value + End Set + End Property + + Public Property KopfDaten() As KopfDatenUngueltigkeitSicherheitenTyp + Get + Return Me._kopfDaten + End Get + Set + Me._kopfDaten = Value + End Set + End Property + + Public Property TransitOperation() As TransitOperationMIType + Get + Return Me._transitOperation + End Get + Set + Me._transitOperation = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(EinzelUngueltigkeitSicherheitenTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize EinzelUngueltigkeitSicherheitenTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes EinzelUngueltigkeitSicherheitenTyp object + ''' + ''' string to deserialize + ''' Output EinzelUngueltigkeitSicherheitenTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelUngueltigkeitSicherheitenTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EinzelUngueltigkeitSicherheitenTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelUngueltigkeitSicherheitenTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As EinzelUngueltigkeitSicherheitenTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), EinzelUngueltigkeitSicherheitenTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As EinzelUngueltigkeitSicherheitenTyp + Return CType(SerializerXml.Deserialize(s), EinzelUngueltigkeitSicherheitenTyp) + End Function +#End Region + + ''' + ''' Serializes current EinzelUngueltigkeitSicherheitenTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an EinzelUngueltigkeitSicherheitenTyp object + ''' + ''' File to load and deserialize + ''' Output EinzelUngueltigkeitSicherheitenTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelUngueltigkeitSicherheitenTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EinzelUngueltigkeitSicherheitenTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelUngueltigkeitSicherheitenTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As EinzelUngueltigkeitSicherheitenTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ObjektIdentifizierungMITyp + +#Region "Private fields" + Private _objektName As String + + Private _objektAlias As String + + Private _eDIFACTNachrichtenNr As String + + Private _zeitpunktEingang As Date + + Private _shipmentReferenz As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Property ObjektName() As String + Get + Return Me._objektName + End Get + Set + Me._objektName = Value + End Set + End Property + + Public Property ObjektAlias() As String + Get + Return Me._objektAlias + End Get + Set + Me._objektAlias = Value + End Set + End Property + + Public Property EDIFACTNachrichtenNr() As String + Get + Return Me._eDIFACTNachrichtenNr + End Get + Set + Me._eDIFACTNachrichtenNr = Value + End Set + End Property + + Public Property ZeitpunktEingang() As Date + Get + Return Me._zeitpunktEingang + End Get + Set + Me._zeitpunktEingang = Value + End Set + End Property + + Public Property ShipmentReferenz() As String + Get + Return Me._shipmentReferenz + End Get + Set + Me._shipmentReferenz = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ObjektIdentifizierungMITyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ObjektIdentifizierungMITyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ObjektIdentifizierungMITyp object + ''' + ''' string to deserialize + ''' Output ObjektIdentifizierungMITyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ObjektIdentifizierungMITyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ObjektIdentifizierungMITyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ObjektIdentifizierungMITyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ObjektIdentifizierungMITyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ObjektIdentifizierungMITyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ObjektIdentifizierungMITyp + Return CType(SerializerXml.Deserialize(s), ObjektIdentifizierungMITyp) + End Function +#End Region + + ''' + ''' Serializes current ObjektIdentifizierungMITyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ObjektIdentifizierungMITyp object + ''' + ''' File to load and deserialize + ''' Output ObjektIdentifizierungMITyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ObjektIdentifizierungMITyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ObjektIdentifizierungMITyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ObjektIdentifizierungMITyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ObjektIdentifizierungMITyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ApplicationInternalDataAdditionalDetailsDataType + +#Region "Private fields" + Private _key As String + + Private _value As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Property Key() As String + Get + Return Me._key + End Get + Set + Me._key = Value + End Set + End Property + + Public Property Value() As String + Get + Return Me._value + End Get + Set + Me._value = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ApplicationInternalDataAdditionalDetailsDataType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' string to deserialize + ''' Output ApplicationInternalDataAdditionalDetailsDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsDataType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ApplicationInternalDataAdditionalDetailsDataType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ApplicationInternalDataAdditionalDetailsDataType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ApplicationInternalDataAdditionalDetailsDataType + Return CType(SerializerXml.Deserialize(s), ApplicationInternalDataAdditionalDetailsDataType) + End Function +#End Region + + ''' + ''' Serializes current ApplicationInternalDataAdditionalDetailsDataType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' File to load and deserialize + ''' Output ApplicationInternalDataAdditionalDetailsDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsDataType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ApplicationInternalDataAdditionalDetailsDataType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ApplicationInternalDataType + +#Region "Private fields" + Private _additionalDetails As List(Of ApplicationInternalDataAdditionalDetailsDataType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._additionalDetails = New List(Of ApplicationInternalDataAdditionalDetailsDataType)() + End Sub + + Public Property AdditionalDetails() As List(Of ApplicationInternalDataAdditionalDetailsDataType) + Get + Return Me._additionalDetails + End Get + Set + Me._additionalDetails = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ApplicationInternalDataType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ApplicationInternalDataType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ApplicationInternalDataType object + ''' + ''' string to deserialize + ''' Output ApplicationInternalDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ApplicationInternalDataType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ApplicationInternalDataType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ApplicationInternalDataType + Return CType(SerializerXml.Deserialize(s), ApplicationInternalDataType) + End Function +#End Region + + ''' + ''' Serializes current ApplicationInternalDataType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ApplicationInternalDataType object + ''' + ''' File to load and deserialize + ''' Output ApplicationInternalDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ApplicationInternalDataType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ErrorMIType + +#Region "Private fields" + Private _errorCode As String + + Private _errorText As String + + Private _errorPointer As String + + Private _originalAttributeValue As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Property ErrorCode() As String + Get + Return Me._errorCode + End Get + Set + Me._errorCode = Value + End Set + End Property + + Public Property ErrorText() As String + Get + Return Me._errorText + End Get + Set + Me._errorText = Value + End Set + End Property + + Public Property ErrorPointer() As String + Get + Return Me._errorPointer + End Get + Set + Me._errorPointer = Value + End Set + End Property + + Public Property OriginalAttributeValue() As String + Get + Return Me._originalAttributeValue + End Get + Set + Me._originalAttributeValue = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ErrorMIType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ErrorMIType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ErrorMIType object + ''' + ''' string to deserialize + ''' Output ErrorMIType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ErrorMIType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ErrorMIType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ErrorMIType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ErrorMIType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ErrorMIType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ErrorMIType + Return CType(SerializerXml.Deserialize(s), ErrorMIType) + End Function +#End Region + + ''' + ''' Serializes current ErrorMIType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ErrorMIType object + ''' + ''' File to load and deserialize + ''' Output ErrorMIType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ErrorMIType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ErrorMIType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ErrorMIType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ErrorMIType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class RepresentativeMIType + +#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(RepresentativeMIType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize RepresentativeMIType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes RepresentativeMIType object + ''' + ''' string to deserialize + ''' Output RepresentativeMIType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As RepresentativeMIType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, RepresentativeMIType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As RepresentativeMIType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As RepresentativeMIType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), RepresentativeMIType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As RepresentativeMIType + Return CType(SerializerXml.Deserialize(s), RepresentativeMIType) + End Function +#End Region + + ''' + ''' Serializes current RepresentativeMIType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an RepresentativeMIType object + ''' + ''' File to load and deserialize + ''' Output RepresentativeMIType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As RepresentativeMIType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, RepresentativeMIType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As RepresentativeMIType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As RepresentativeMIType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class HolderOfTheTransitProcedureMIType + +#Region "Private fields" + Private _identificationNumber As String + + Private _name As String + + Private _streetAndNumber As String + + Private _city As String + + Private _postcode As String + + Private _country As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Property IdentificationNumber() As String + Get + Return Me._identificationNumber + End Get + Set + Me._identificationNumber = Value + End Set + End Property + + Public Property Name() As String + Get + Return Me._name + End Get + Set + Me._name = Value + End Set + End Property + + Public Property StreetAndNumber() As String + Get + Return Me._streetAndNumber + End Get + Set + Me._streetAndNumber = Value + End Set + End Property + + Public Property City() As String + Get + Return Me._city + End Get + Set + Me._city = Value + End Set + End Property + + Public Property Postcode() As String + Get + Return Me._postcode + End Get + Set + Me._postcode = Value + End Set + End Property + + Public Property Country() As String + Get + Return Me._country + End Get + Set + Me._country = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(HolderOfTheTransitProcedureMIType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize HolderOfTheTransitProcedureMIType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes HolderOfTheTransitProcedureMIType object + ''' + ''' string to deserialize + ''' Output HolderOfTheTransitProcedureMIType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As HolderOfTheTransitProcedureMIType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, HolderOfTheTransitProcedureMIType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As HolderOfTheTransitProcedureMIType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As HolderOfTheTransitProcedureMIType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), HolderOfTheTransitProcedureMIType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As HolderOfTheTransitProcedureMIType + Return CType(SerializerXml.Deserialize(s), HolderOfTheTransitProcedureMIType) + End Function +#End Region + + ''' + ''' Serializes current HolderOfTheTransitProcedureMIType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an HolderOfTheTransitProcedureMIType object + ''' + ''' File to load and deserialize + ''' Output HolderOfTheTransitProcedureMIType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HolderOfTheTransitProcedureMIType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, HolderOfTheTransitProcedureMIType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HolderOfTheTransitProcedureMIType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As HolderOfTheTransitProcedureMIType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransitOperationMIType + +#Region "Private fields" + Private _departureStatus As String + + Private _rejectionCode As String + + Private _mRN As String + + Private _cancellationDecisionDateAndTime As Date + + Private _customsOfficeOfDeparture As String + + Private _holderOfTheTransitProcedure As HolderOfTheTransitProcedureMIType + + Private _representative As RepresentativeMIType + + Private _reason As String + + Private _error As List(Of ErrorMIType) + + Private _applicationInternalData As ApplicationInternalDataType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._applicationInternalData = New ApplicationInternalDataType() + Me._error = New List(Of ErrorMIType)() + Me._representative = New RepresentativeMIType() + Me._holderOfTheTransitProcedure = New HolderOfTheTransitProcedureMIType() + End Sub + + Public Property DepartureStatus() As String + Get + Return Me._departureStatus + End Get + Set + Me._departureStatus = Value + End Set + End Property + + Public Property RejectionCode() As String + Get + Return Me._rejectionCode + End Get + Set + Me._rejectionCode = 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 CancellationDecisionDateAndTime() As Date + Get + Return Me._cancellationDecisionDateAndTime + End Get + Set + Me._cancellationDecisionDateAndTime = Value + End Set + End Property + + Public Property CustomsOfficeOfDeparture() As String + Get + Return Me._customsOfficeOfDeparture + End Get + Set + Me._customsOfficeOfDeparture = Value + End Set + End Property + + Public Property HolderOfTheTransitProcedure() As HolderOfTheTransitProcedureMIType + Get + Return Me._holderOfTheTransitProcedure + End Get + Set + Me._holderOfTheTransitProcedure = Value + End Set + End Property + + Public Property Representative() As RepresentativeMIType + Get + Return Me._representative + End Get + Set + Me._representative = Value + End Set + End Property + + Public Property Reason() As String + Get + Return Me._reason + End Get + Set + Me._reason = Value + End Set + End Property + + Public Property [Error]() As List(Of ErrorMIType) + Get + Return Me._error + End Get + Set + Me._error = Value + End Set + End Property + + Public Property ApplicationInternalData() As ApplicationInternalDataType + Get + Return Me._applicationInternalData + End Get + Set + Me._applicationInternalData = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransitOperationMIType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransitOperationMIType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransitOperationMIType object + ''' + ''' string to deserialize + ''' Output TransitOperationMIType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransitOperationMIType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransitOperationMIType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransitOperationMIType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransitOperationMIType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransitOperationMIType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransitOperationMIType + Return CType(SerializerXml.Deserialize(s), TransitOperationMIType) + End Function +#End Region + + ''' + ''' Serializes current TransitOperationMIType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransitOperationMIType object + ''' + ''' File to load and deserialize + ''' Output TransitOperationMIType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransitOperationMIType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransitOperationMIType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransitOperationMIType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransitOperationMIType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class FehlermeldungMITyp + +#Region "Private fields" + Private _code As String + + Private _text As String + + Private _zeiger As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Property Code() As String + Get + Return Me._code + End Get + Set + Me._code = Value + End Set + End Property + + Public Property Text() As String + Get + Return Me._text + End Get + Set + Me._text = Value + End Set + End Property + + Public Property Zeiger() As String + Get + Return Me._zeiger + End Get + Set + Me._zeiger = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FehlermeldungMITyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FehlermeldungMITyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes FehlermeldungMITyp object + ''' + ''' string to deserialize + ''' Output FehlermeldungMITyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As FehlermeldungMITyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FehlermeldungMITyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As FehlermeldungMITyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As FehlermeldungMITyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FehlermeldungMITyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As FehlermeldungMITyp + Return CType(SerializerXml.Deserialize(s), FehlermeldungMITyp) + End Function +#End Region + + ''' + ''' Serializes current FehlermeldungMITyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an FehlermeldungMITyp object + ''' + ''' File to load and deserialize + ''' Output FehlermeldungMITyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FehlermeldungMITyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FehlermeldungMITyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FehlermeldungMITyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FehlermeldungMITyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class SicherheitMITyp + +#Region "Private fields" + Private _gRN As String + + Private _codeUngueltigkeit As String + + Private _textUngueltigkeit As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Property GRN() As String + Get + Return Me._gRN + End Get + Set + Me._gRN = Value + End Set + End Property + + Public Property CodeUngueltigkeit() As String + Get + Return Me._codeUngueltigkeit + End Get + Set + Me._codeUngueltigkeit = Value + End Set + End Property + + Public Property TextUngueltigkeit() As String + Get + Return Me._textUngueltigkeit + End Get + Set + Me._textUngueltigkeit = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(SicherheitMITyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize SicherheitMITyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes SicherheitMITyp object + ''' + ''' string to deserialize + ''' Output SicherheitMITyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SicherheitMITyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SicherheitMITyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SicherheitMITyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As SicherheitMITyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), SicherheitMITyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As SicherheitMITyp + Return CType(SerializerXml.Deserialize(s), SicherheitMITyp) + End Function +#End Region + + ''' + ''' Serializes current SicherheitMITyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an SicherheitMITyp object + ''' + ''' File to load and deserialize + ''' Output SicherheitMITyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SicherheitMITyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SicherheitMITyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SicherheitMITyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As SicherheitMITyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class HauptverpflichteterAnsprechpartnerMITyp + +#Region "Private fields" + Private _sachbearbeiter As String + + Private _stellung As String + + Private _telefonnummer As String + + Private _telefaxnummer As String + + Private _emailAdresse As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Property Sachbearbeiter() As String + Get + Return Me._sachbearbeiter + End Get + Set + Me._sachbearbeiter = Value + End Set + End Property + + Public Property Stellung() As String + Get + Return Me._stellung + End Get + Set + Me._stellung = Value + End Set + End Property + + Public Property Telefonnummer() As String + Get + Return Me._telefonnummer + End Get + Set + Me._telefonnummer = Value + End Set + End Property + + Public Property Telefaxnummer() As String + Get + Return Me._telefaxnummer + End Get + Set + Me._telefaxnummer = Value + End Set + End Property + + Public Property EmailAdresse() As String + Get + Return Me._emailAdresse + End Get + Set + Me._emailAdresse = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(HauptverpflichteterAnsprechpartnerMITyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize HauptverpflichteterAnsprechpartnerMITyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes HauptverpflichteterAnsprechpartnerMITyp object + ''' + ''' string to deserialize + ''' Output HauptverpflichteterAnsprechpartnerMITyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As HauptverpflichteterAnsprechpartnerMITyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, HauptverpflichteterAnsprechpartnerMITyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As HauptverpflichteterAnsprechpartnerMITyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As HauptverpflichteterAnsprechpartnerMITyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), HauptverpflichteterAnsprechpartnerMITyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As HauptverpflichteterAnsprechpartnerMITyp + Return CType(SerializerXml.Deserialize(s), HauptverpflichteterAnsprechpartnerMITyp) + End Function +#End Region + + ''' + ''' Serializes current HauptverpflichteterAnsprechpartnerMITyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an HauptverpflichteterAnsprechpartnerMITyp object + ''' + ''' File to load and deserialize + ''' Output HauptverpflichteterAnsprechpartnerMITyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HauptverpflichteterAnsprechpartnerMITyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, HauptverpflichteterAnsprechpartnerMITyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HauptverpflichteterAnsprechpartnerMITyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As HauptverpflichteterAnsprechpartnerMITyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class KopfDatenUngueltigkeitSicherheitenTyp + +#Region "Private fields" + Private _arbeitsnummer As String + + Private _zeitpunktUngueltigkeitUnwirksamkeit As Date + + Private _hauptverpflichteterEORI As String + + Private _hauptverpflichteterNLNR As String + + Private _hauptverpflichteterIDCarnet As String + + Private _hauptverpflichteterName As String + + Private _hauptverpflichteterStrasseHausnummer As String + + Private _hauptverpflichteterLand As String + + Private _hauptverpflichteterPLZ As String + + Private _hauptverpflichteterOrt As String + + Private _hauptverpflichteterAnsprechpartner As HauptverpflichteterAnsprechpartnerMITyp + + Private _grund As String + + Private _sicherheit As List(Of SicherheitMITyp) + + Private _fehlermeldung As List(Of FehlermeldungMITyp) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._fehlermeldung = New List(Of FehlermeldungMITyp)() + Me._sicherheit = New List(Of SicherheitMITyp)() + Me._hauptverpflichteterAnsprechpartner = New HauptverpflichteterAnsprechpartnerMITyp() + End Sub + + Public Property Arbeitsnummer() As String + Get + Return Me._arbeitsnummer + End Get + Set + Me._arbeitsnummer = Value + End Set + End Property + + Public Property ZeitpunktUngueltigkeitUnwirksamkeit() As Date + Get + Return Me._zeitpunktUngueltigkeitUnwirksamkeit + End Get + Set + Me._zeitpunktUngueltigkeitUnwirksamkeit = Value + End Set + End Property + + Public Property HauptverpflichteterEORI() As String + Get + Return Me._hauptverpflichteterEORI + End Get + Set + Me._hauptverpflichteterEORI = Value + End Set + End Property + + Public Property HauptverpflichteterNLNR() As String + Get + Return Me._hauptverpflichteterNLNR + End Get + Set + Me._hauptverpflichteterNLNR = Value + End Set + End Property + + Public Property HauptverpflichteterIDCarnet() As String + Get + Return Me._hauptverpflichteterIDCarnet + End Get + Set + Me._hauptverpflichteterIDCarnet = Value + End Set + End Property + + Public Property HauptverpflichteterName() As String + Get + Return Me._hauptverpflichteterName + End Get + Set + Me._hauptverpflichteterName = Value + End Set + End Property + + Public Property HauptverpflichteterStrasseHausnummer() As String + Get + Return Me._hauptverpflichteterStrasseHausnummer + End Get + Set + Me._hauptverpflichteterStrasseHausnummer = Value + End Set + End Property + + Public Property HauptverpflichteterLand() As String + Get + Return Me._hauptverpflichteterLand + End Get + Set + Me._hauptverpflichteterLand = Value + End Set + End Property + + Public Property HauptverpflichteterPLZ() As String + Get + Return Me._hauptverpflichteterPLZ + End Get + Set + Me._hauptverpflichteterPLZ = Value + End Set + End Property + + Public Property HauptverpflichteterOrt() As String + Get + Return Me._hauptverpflichteterOrt + End Get + Set + Me._hauptverpflichteterOrt = Value + End Set + End Property + + Public Property HauptverpflichteterAnsprechpartner() As HauptverpflichteterAnsprechpartnerMITyp + Get + Return Me._hauptverpflichteterAnsprechpartner + End Get + Set + Me._hauptverpflichteterAnsprechpartner = Value + End Set + End Property + + Public Property Grund() As String + Get + Return Me._grund + End Get + Set + Me._grund = Value + End Set + End Property + + Public Property Sicherheit() As List(Of SicherheitMITyp) + Get + Return Me._sicherheit + End Get + Set + Me._sicherheit = Value + End Set + End Property + + Public Property Fehlermeldung() As List(Of FehlermeldungMITyp) + Get + Return Me._fehlermeldung + End Get + Set + Me._fehlermeldung = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(KopfDatenUngueltigkeitSicherheitenTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize KopfDatenUngueltigkeitSicherheitenTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes KopfDatenUngueltigkeitSicherheitenTyp object + ''' + ''' string to deserialize + ''' Output KopfDatenUngueltigkeitSicherheitenTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As KopfDatenUngueltigkeitSicherheitenTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, KopfDatenUngueltigkeitSicherheitenTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As KopfDatenUngueltigkeitSicherheitenTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As KopfDatenUngueltigkeitSicherheitenTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), KopfDatenUngueltigkeitSicherheitenTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As KopfDatenUngueltigkeitSicherheitenTyp + Return CType(SerializerXml.Deserialize(s), KopfDatenUngueltigkeitSicherheitenTyp) + End Function +#End Region + + ''' + ''' Serializes current KopfDatenUngueltigkeitSicherheitenTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an KopfDatenUngueltigkeitSicherheitenTyp object + ''' + ''' File to load and deserialize + ''' Output KopfDatenUngueltigkeitSicherheitenTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As KopfDatenUngueltigkeitSicherheitenTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, KopfDatenUngueltigkeitSicherheitenTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As KopfDatenUngueltigkeitSicherheitenTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As KopfDatenUngueltigkeitSicherheitenTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransaktionNCTSTyp + +#Region "Private fields" + Private _iOPartner As String + + Private _iODivision1 As String + + Private _iODivision2 As String + + Private _iODivision3 As String + + Private _iOReferenz As String + + Private _iODatumZeit As Date + + Private _version As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Property IOPartner() As String + Get + Return Me._iOPartner + End Get + Set + Me._iOPartner = Value + End Set + End Property + + Public Property IODivision1() As String + Get + Return Me._iODivision1 + End Get + Set + Me._iODivision1 = Value + End Set + End Property + + Public Property IODivision2() As String + Get + Return Me._iODivision2 + End Get + Set + Me._iODivision2 = Value + End Set + End Property + + Public Property IODivision3() As String + Get + Return Me._iODivision3 + End Get + Set + Me._iODivision3 = Value + End Set + End Property + + Public Property IOReferenz() As String + Get + Return Me._iOReferenz + End Get + Set + Me._iOReferenz = Value + End Set + End Property + + Public Property IODatumZeit() As Date + Get + Return Me._iODatumZeit + End Get + Set + Me._iODatumZeit = Value + End Set + End Property + + Public Property Version() As String + Get + Return Me._version + End Get + Set + Me._version = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransaktionNCTSTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransaktionNCTSTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransaktionNCTSTyp object + ''' + ''' string to deserialize + ''' Output TransaktionNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransaktionNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransaktionNCTSTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransaktionNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransaktionNCTSTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransaktionNCTSTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransaktionNCTSTyp + Return CType(SerializerXml.Deserialize(s), TransaktionNCTSTyp) + End Function +#End Region + + ''' + ''' Serializes current TransaktionNCTSTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransaktionNCTSTyp object + ''' + ''' File to load and deserialize + ''' Output TransaktionNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransaktionNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransaktionNCTSTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransaktionNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransaktionNCTSTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DatenaustauschNCTSTyp + +#Region "Private fields" + Private _transaktion As TransaktionNCTSTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._transaktion = New TransaktionNCTSTyp() + End Sub + + Public Property Transaktion() As TransaktionNCTSTyp + Get + Return Me._transaktion + End Get + Set + Me._transaktion = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DatenaustauschNCTSTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DatenaustauschNCTSTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DatenaustauschNCTSTyp object + ''' + ''' string to deserialize + ''' Output DatenaustauschNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DatenaustauschNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DatenaustauschNCTSTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DatenaustauschNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DatenaustauschNCTSTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DatenaustauschNCTSTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DatenaustauschNCTSTyp + Return CType(SerializerXml.Deserialize(s), DatenaustauschNCTSTyp) + End Function +#End Region + + ''' + ''' Serializes current DatenaustauschNCTSTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DatenaustauschNCTSTyp object + ''' + ''' File to load and deserialize + ''' Output DatenaustauschNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DatenaustauschNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DatenaustauschNCTSTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DatenaustauschNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DatenaustauschNCTSTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ApplicationInternalDataAdditionalDetailsType + +#Region "Private fields" + Private _data As List(Of ApplicationInternalDataAdditionalDetailsDataType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._data = New List(Of ApplicationInternalDataAdditionalDetailsDataType)() + End Sub + + Public Property Data() As List(Of ApplicationInternalDataAdditionalDetailsDataType) + Get + Return Me._data + End Get + Set + Me._data = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ApplicationInternalDataAdditionalDetailsType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ApplicationInternalDataAdditionalDetailsType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ApplicationInternalDataAdditionalDetailsType object + ''' + ''' string to deserialize + ''' Output ApplicationInternalDataAdditionalDetailsType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataAdditionalDetailsType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataAdditionalDetailsType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ApplicationInternalDataAdditionalDetailsType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ApplicationInternalDataAdditionalDetailsType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ApplicationInternalDataAdditionalDetailsType + Return CType(SerializerXml.Deserialize(s), ApplicationInternalDataAdditionalDetailsType) + End Function +#End Region + + ''' + ''' Serializes current ApplicationInternalDataAdditionalDetailsType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ApplicationInternalDataAdditionalDetailsType object + ''' + ''' File to load and deserialize + ''' Output ApplicationInternalDataAdditionalDetailsType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataAdditionalDetailsType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataAdditionalDetailsType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ApplicationInternalDataAdditionalDetailsType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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 diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/UngueltigkeitSicherheit/UngueltigkeitSicherheitenNCTSDE_004.xsd b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/UngueltigkeitSicherheit/UngueltigkeitSicherheitenNCTSDE_004.xsd new file mode 100644 index 0000000..d5cc52c --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/UngueltigkeitSicherheit/UngueltigkeitSicherheitenNCTSDE_004.xsd @@ -0,0 +1,226 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Versandanmeldung/ATLAS_9.1/e_dep_dat.Designer.vb b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Versandanmeldung/ATLAS_9.1/e_dep_dat.Designer.vb new file mode 100644 index 0000000..9ee55e9 --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Versandanmeldung/ATLAS_9.1/e_dep_dat.Designer.vb @@ -0,0 +1,19766 @@ +'' ------------------------------------------------------------------------------ +'' +'' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com +'' {"TargetFramework":"Net47","NameSpace":"DETPDD","Language":"VisualBasic","Properties":{},"XmlAttribute":{"Enabled":true},"ClassParams":{},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{},"JsonOutput":{},"Enabled":true},"Miscellaneous":{}} +'' +'' ------------------------------------------------------------------------------ +#Disable Warning +Imports System +Imports System.Diagnostics +Imports System.Xml.Serialization +Imports System.Runtime.Serialization +Imports System.Collections +Imports System.Xml.Schema +Imports System.ComponentModel +Imports System.Xml +Imports System.IO +Imports System.Text +Imports System.Collections.Generic + +Namespace DETPDD + + + Partial Public Class DETPDD + +#Region "Private fields" + Private _preparationDateAndTime As Date + + Private _messageIdentification As String + + Private _messageGroup As DETPDDMessageGroup + + Private _messageType As DETPDDMessageType + + Private _messageVersion As String + + Private _messageSender As DETPDDMessageSender + + Private _messageRecipient As DETPDDMessageRecipient + + Private _transitOperation As DETPDDTransitOperation + + Private _authorisation As List(Of DETPDDAuthorisation) + + Private _customsOfficeOfDeparture As DETPDDCustomsOfficeOfDeparture + + Private _customsOfficeOfDestinationDeclared As DETPDDCustomsOfficeOfDestinationDeclared + + Private _customsOfficeOfTransitDeclared As List(Of DETPDDCustomsOfficeOfTransitDeclared) + + Private _customsOfficeOfExitForTransitDeclared As List(Of DETPDDCustomsOfficeOfExitForTransitDeclared) + + Private _holderOfTheTransitProcedure As DETPDDHolderOfTheTransitProcedure + + Private _representative As DETPDDRepresentative + + Private _guarantee As List(Of DETPDDGuarantee) + + Private _consignment As DETPDDConsignment + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._consignment = New DETPDDConsignment() + Me._guarantee = New List(Of DETPDDGuarantee)() + Me._representative = New DETPDDRepresentative() + Me._holderOfTheTransitProcedure = New DETPDDHolderOfTheTransitProcedure() + Me._customsOfficeOfExitForTransitDeclared = New List(Of DETPDDCustomsOfficeOfExitForTransitDeclared)() + Me._customsOfficeOfTransitDeclared = New List(Of DETPDDCustomsOfficeOfTransitDeclared)() + Me._customsOfficeOfDestinationDeclared = New DETPDDCustomsOfficeOfDestinationDeclared() + Me._customsOfficeOfDeparture = New DETPDDCustomsOfficeOfDeparture() + Me._authorisation = New List(Of DETPDDAuthorisation)() + Me._transitOperation = New DETPDDTransitOperation() + Me._messageRecipient = New DETPDDMessageRecipient() + Me._messageSender = New DETPDDMessageSender() + 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 DETPDDMessageGroup + Get + Return Me._messageGroup + End Get + Set + Me._messageGroup = Value + End Set + End Property + + Public Property messageType() As DETPDDMessageType + 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 MessageSender() As DETPDDMessageSender + Get + Return Me._messageSender + End Get + Set + Me._messageSender = Value + End Set + End Property + + Public Property MessageRecipient() As DETPDDMessageRecipient + Get + Return Me._messageRecipient + End Get + Set + Me._messageRecipient = Value + End Set + End Property + + Public Property TransitOperation() As DETPDDTransitOperation + Get + Return Me._transitOperation + End Get + Set + Me._transitOperation = Value + End Set + End Property + + + Public Property Authorisation() As List(Of DETPDDAuthorisation) + Get + Return Me._authorisation + End Get + Set + Me._authorisation = Value + End Set + End Property + + Public Property CustomsOfficeOfDeparture() As DETPDDCustomsOfficeOfDeparture + Get + Return Me._customsOfficeOfDeparture + End Get + Set + Me._customsOfficeOfDeparture = Value + End Set + End Property + + Public Property CustomsOfficeOfDestinationDeclared() As DETPDDCustomsOfficeOfDestinationDeclared + Get + Return Me._customsOfficeOfDestinationDeclared + End Get + Set + Me._customsOfficeOfDestinationDeclared = Value + End Set + End Property + + + Public Property CustomsOfficeOfTransitDeclared() As List(Of DETPDDCustomsOfficeOfTransitDeclared) + Get + Return Me._customsOfficeOfTransitDeclared + End Get + Set + Me._customsOfficeOfTransitDeclared = Value + End Set + End Property + + + Public Property CustomsOfficeOfExitForTransitDeclared() As List(Of DETPDDCustomsOfficeOfExitForTransitDeclared) + Get + Return Me._customsOfficeOfExitForTransitDeclared + End Get + Set + Me._customsOfficeOfExitForTransitDeclared = Value + End Set + End Property + + Public Property HolderOfTheTransitProcedure() As DETPDDHolderOfTheTransitProcedure + Get + Return Me._holderOfTheTransitProcedure + End Get + Set + Me._holderOfTheTransitProcedure = Value + End Set + End Property + + Public Property Representative() As DETPDDRepresentative + Get + Return Me._representative + End Get + Set + Me._representative = Value + End Set + End Property + + + Public Property Guarantee() As List(Of DETPDDGuarantee) + Get + Return Me._guarantee + End Get + Set + Me._guarantee = Value + End Set + End Property + + Public Property Consignment() As DETPDDConsignment + 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(DETPDD)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDD object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDD object + ''' + ''' string to deserialize + ''' Output DETPDD object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDD, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDD) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDD) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDD + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDD) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDD + Return CType(SerializerXml.Deserialize(s), DETPDD) + End Function +#End Region + + ''' + ''' Serializes current DETPDD object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDD object + ''' + ''' File to load and deserialize + ''' Output DETPDD object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDD, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDD) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDD) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDD + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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 DETPDDMessageGroup + + DEP + End Enum + + + Public Enum DETPDDMessageType + + DETPDD + End Enum + + + Partial Public Class DETPDDMessageSender + +#Region "Private fields" + Private _identificationNumber As String + + Private _subsidiaryNumber As String + + Private _authenticationNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property identificationNumber() As String + Get + Return Me._identificationNumber + End Get + Set + Me._identificationNumber = Value + End Set + End Property + + + Public Property subsidiaryNumber() As String + Get + Return Me._subsidiaryNumber + End Get + Set + Me._subsidiaryNumber = Value + End Set + End Property + + + Public Property authenticationNumber() As String + Get + Return Me._authenticationNumber + End Get + Set + Me._authenticationNumber = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DETPDDMessageSender)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDMessageSender object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDMessageSender object + ''' + ''' string to deserialize + ''' Output DETPDDMessageSender object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDMessageSender, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDMessageSender) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDMessageSender) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDMessageSender + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDMessageSender) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDMessageSender + Return CType(SerializerXml.Deserialize(s), DETPDDMessageSender) + End Function +#End Region + + ''' + ''' Serializes current DETPDDMessageSender object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDMessageSender object + ''' + ''' File to load and deserialize + ''' Output DETPDDMessageSender object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDMessageSender, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDMessageSender) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDMessageSender) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDMessageSender + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDMessageRecipient + +#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(DETPDDMessageRecipient)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDMessageRecipient object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDMessageRecipient object + ''' + ''' string to deserialize + ''' Output DETPDDMessageRecipient object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDMessageRecipient, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDMessageRecipient) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDMessageRecipient) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDMessageRecipient + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDMessageRecipient) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDMessageRecipient + Return CType(SerializerXml.Deserialize(s), DETPDDMessageRecipient) + End Function +#End Region + + ''' + ''' Serializes current DETPDDMessageRecipient object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDMessageRecipient object + ''' + ''' File to load and deserialize + ''' Output DETPDDMessageRecipient object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDMessageRecipient, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDMessageRecipient) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDMessageRecipient) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDMessageRecipient + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDTransitOperation + +#Region "Private fields" + Private _lRN As String + + Private _declarationType As String + + Private _transitDeclarationType As String + + Private _tIRCarnetNumber As String + + 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 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 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(DETPDDTransitOperation)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDTransitOperation object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDTransitOperation object + ''' + ''' string to deserialize + ''' Output DETPDDTransitOperation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDTransitOperation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDTransitOperation) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDTransitOperation) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDTransitOperation + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDTransitOperation) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDTransitOperation + Return CType(SerializerXml.Deserialize(s), DETPDDTransitOperation) + End Function +#End Region + + ''' + ''' Serializes current DETPDDTransitOperation object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDTransitOperation object + ''' + ''' File to load and deserialize + ''' Output DETPDDTransitOperation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDTransitOperation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDTransitOperation) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDTransitOperation) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDTransitOperation + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDAuthorisation + +#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(DETPDDAuthorisation)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDAuthorisation object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDAuthorisation object + ''' + ''' string to deserialize + ''' Output DETPDDAuthorisation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDAuthorisation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDAuthorisation) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDAuthorisation) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDAuthorisation + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDAuthorisation) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDAuthorisation + Return CType(SerializerXml.Deserialize(s), DETPDDAuthorisation) + End Function +#End Region + + ''' + ''' Serializes current DETPDDAuthorisation object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDAuthorisation object + ''' + ''' File to load and deserialize + ''' Output DETPDDAuthorisation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDAuthorisation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDAuthorisation) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDAuthorisation) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDAuthorisation + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDCustomsOfficeOfDeparture + +#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(DETPDDCustomsOfficeOfDeparture)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDCustomsOfficeOfDeparture object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDCustomsOfficeOfDeparture object + ''' + ''' string to deserialize + ''' Output DETPDDCustomsOfficeOfDeparture object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDCustomsOfficeOfDeparture, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDCustomsOfficeOfDeparture) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDCustomsOfficeOfDeparture) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDCustomsOfficeOfDeparture + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDCustomsOfficeOfDeparture) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDCustomsOfficeOfDeparture + Return CType(SerializerXml.Deserialize(s), DETPDDCustomsOfficeOfDeparture) + End Function +#End Region + + ''' + ''' Serializes current DETPDDCustomsOfficeOfDeparture object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDCustomsOfficeOfDeparture object + ''' + ''' File to load and deserialize + ''' Output DETPDDCustomsOfficeOfDeparture object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDCustomsOfficeOfDeparture, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDCustomsOfficeOfDeparture) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDCustomsOfficeOfDeparture) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDCustomsOfficeOfDeparture + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDCustomsOfficeOfDestinationDeclared + +#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(DETPDDCustomsOfficeOfDestinationDeclared)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDCustomsOfficeOfDestinationDeclared object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDCustomsOfficeOfDestinationDeclared object + ''' + ''' string to deserialize + ''' Output DETPDDCustomsOfficeOfDestinationDeclared object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDCustomsOfficeOfDestinationDeclared, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDCustomsOfficeOfDestinationDeclared) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDCustomsOfficeOfDestinationDeclared) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDCustomsOfficeOfDestinationDeclared + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDCustomsOfficeOfDestinationDeclared) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDCustomsOfficeOfDestinationDeclared + Return CType(SerializerXml.Deserialize(s), DETPDDCustomsOfficeOfDestinationDeclared) + End Function +#End Region + + ''' + ''' Serializes current DETPDDCustomsOfficeOfDestinationDeclared object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDCustomsOfficeOfDestinationDeclared object + ''' + ''' File to load and deserialize + ''' Output DETPDDCustomsOfficeOfDestinationDeclared object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDCustomsOfficeOfDestinationDeclared, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDCustomsOfficeOfDestinationDeclared) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDCustomsOfficeOfDestinationDeclared) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDCustomsOfficeOfDestinationDeclared + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDCustomsOfficeOfTransitDeclared + +#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(DETPDDCustomsOfficeOfTransitDeclared)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDCustomsOfficeOfTransitDeclared object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDCustomsOfficeOfTransitDeclared object + ''' + ''' string to deserialize + ''' Output DETPDDCustomsOfficeOfTransitDeclared object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDCustomsOfficeOfTransitDeclared, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDCustomsOfficeOfTransitDeclared) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDCustomsOfficeOfTransitDeclared) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDCustomsOfficeOfTransitDeclared + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDCustomsOfficeOfTransitDeclared) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDCustomsOfficeOfTransitDeclared + Return CType(SerializerXml.Deserialize(s), DETPDDCustomsOfficeOfTransitDeclared) + End Function +#End Region + + ''' + ''' Serializes current DETPDDCustomsOfficeOfTransitDeclared object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDCustomsOfficeOfTransitDeclared object + ''' + ''' File to load and deserialize + ''' Output DETPDDCustomsOfficeOfTransitDeclared object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDCustomsOfficeOfTransitDeclared, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDCustomsOfficeOfTransitDeclared) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDCustomsOfficeOfTransitDeclared) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDCustomsOfficeOfTransitDeclared + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDCustomsOfficeOfExitForTransitDeclared + +#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(DETPDDCustomsOfficeOfExitForTransitDeclared)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDCustomsOfficeOfExitForTransitDeclared object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDCustomsOfficeOfExitForTransitDeclared object + ''' + ''' string to deserialize + ''' Output DETPDDCustomsOfficeOfExitForTransitDeclared object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDCustomsOfficeOfExitForTransitDeclared, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDCustomsOfficeOfExitForTransitDeclared) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDCustomsOfficeOfExitForTransitDeclared) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDCustomsOfficeOfExitForTransitDeclared + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDCustomsOfficeOfExitForTransitDeclared) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDCustomsOfficeOfExitForTransitDeclared + Return CType(SerializerXml.Deserialize(s), DETPDDCustomsOfficeOfExitForTransitDeclared) + End Function +#End Region + + ''' + ''' Serializes current DETPDDCustomsOfficeOfExitForTransitDeclared object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDCustomsOfficeOfExitForTransitDeclared object + ''' + ''' File to load and deserialize + ''' Output DETPDDCustomsOfficeOfExitForTransitDeclared object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDCustomsOfficeOfExitForTransitDeclared, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDCustomsOfficeOfExitForTransitDeclared) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDCustomsOfficeOfExitForTransitDeclared) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDCustomsOfficeOfExitForTransitDeclared + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDHolderOfTheTransitProcedure + +#Region "Private fields" + Private _identificationNumber As String + + Private _tIRHolderIdentificationNumber As String + + Private _name As String + + Private _address As DETPDDHolderOfTheTransitProcedureAddress + + Private _contactPerson As DETPDDHolderOfTheTransitProcedureContactPerson + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contactPerson = New DETPDDHolderOfTheTransitProcedureContactPerson() + Me._address = New DETPDDHolderOfTheTransitProcedureAddress() + 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 DETPDDHolderOfTheTransitProcedureAddress + Get + Return Me._address + End Get + Set + Me._address = Value + End Set + End Property + + Public Property ContactPerson() As DETPDDHolderOfTheTransitProcedureContactPerson + 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(DETPDDHolderOfTheTransitProcedure)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDHolderOfTheTransitProcedure object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDHolderOfTheTransitProcedure object + ''' + ''' string to deserialize + ''' Output DETPDDHolderOfTheTransitProcedure object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDHolderOfTheTransitProcedure, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDHolderOfTheTransitProcedure) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDHolderOfTheTransitProcedure) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDHolderOfTheTransitProcedure + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDHolderOfTheTransitProcedure) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDHolderOfTheTransitProcedure + Return CType(SerializerXml.Deserialize(s), DETPDDHolderOfTheTransitProcedure) + End Function +#End Region + + ''' + ''' Serializes current DETPDDHolderOfTheTransitProcedure object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDHolderOfTheTransitProcedure object + ''' + ''' File to load and deserialize + ''' Output DETPDDHolderOfTheTransitProcedure object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDHolderOfTheTransitProcedure, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDHolderOfTheTransitProcedure) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDHolderOfTheTransitProcedure) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDHolderOfTheTransitProcedure + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDHolderOfTheTransitProcedureAddress + +#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(DETPDDHolderOfTheTransitProcedureAddress)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDHolderOfTheTransitProcedureAddress object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDHolderOfTheTransitProcedureAddress object + ''' + ''' string to deserialize + ''' Output DETPDDHolderOfTheTransitProcedureAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDHolderOfTheTransitProcedureAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDHolderOfTheTransitProcedureAddress) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDHolderOfTheTransitProcedureAddress) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDHolderOfTheTransitProcedureAddress + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDHolderOfTheTransitProcedureAddress) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDHolderOfTheTransitProcedureAddress + Return CType(SerializerXml.Deserialize(s), DETPDDHolderOfTheTransitProcedureAddress) + End Function +#End Region + + ''' + ''' Serializes current DETPDDHolderOfTheTransitProcedureAddress object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDHolderOfTheTransitProcedureAddress object + ''' + ''' File to load and deserialize + ''' Output DETPDDHolderOfTheTransitProcedureAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDHolderOfTheTransitProcedureAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDHolderOfTheTransitProcedureAddress) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDHolderOfTheTransitProcedureAddress) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDHolderOfTheTransitProcedureAddress + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDHolderOfTheTransitProcedureContactPerson + +#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(DETPDDHolderOfTheTransitProcedureContactPerson)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDHolderOfTheTransitProcedureContactPerson object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDHolderOfTheTransitProcedureContactPerson object + ''' + ''' string to deserialize + ''' Output DETPDDHolderOfTheTransitProcedureContactPerson object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDHolderOfTheTransitProcedureContactPerson, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDHolderOfTheTransitProcedureContactPerson) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDHolderOfTheTransitProcedureContactPerson) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDHolderOfTheTransitProcedureContactPerson + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDHolderOfTheTransitProcedureContactPerson) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDHolderOfTheTransitProcedureContactPerson + Return CType(SerializerXml.Deserialize(s), DETPDDHolderOfTheTransitProcedureContactPerson) + End Function +#End Region + + ''' + ''' Serializes current DETPDDHolderOfTheTransitProcedureContactPerson object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDHolderOfTheTransitProcedureContactPerson object + ''' + ''' File to load and deserialize + ''' Output DETPDDHolderOfTheTransitProcedureContactPerson object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDHolderOfTheTransitProcedureContactPerson, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDHolderOfTheTransitProcedureContactPerson) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDHolderOfTheTransitProcedureContactPerson) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDHolderOfTheTransitProcedureContactPerson + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDRepresentative + +#Region "Private fields" + Private _identificationNumber As String + + Private _contactPerson As DETPDDRepresentativeContactPerson + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contactPerson = New DETPDDRepresentativeContactPerson() + End Sub + + + Public Property identificationNumber() As String + Get + Return Me._identificationNumber + End Get + Set + Me._identificationNumber = Value + End Set + End Property + + Public Property ContactPerson() As DETPDDRepresentativeContactPerson + 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(DETPDDRepresentative)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDRepresentative object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDRepresentative object + ''' + ''' string to deserialize + ''' Output DETPDDRepresentative object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDRepresentative, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDRepresentative) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDRepresentative) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDRepresentative + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDRepresentative) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDRepresentative + Return CType(SerializerXml.Deserialize(s), DETPDDRepresentative) + End Function +#End Region + + ''' + ''' Serializes current DETPDDRepresentative object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDRepresentative object + ''' + ''' File to load and deserialize + ''' Output DETPDDRepresentative object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDRepresentative, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDRepresentative) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDRepresentative) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDRepresentative + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDRepresentativeContactPerson + +#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(DETPDDRepresentativeContactPerson)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDRepresentativeContactPerson object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDRepresentativeContactPerson object + ''' + ''' string to deserialize + ''' Output DETPDDRepresentativeContactPerson object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDRepresentativeContactPerson, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDRepresentativeContactPerson) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDRepresentativeContactPerson) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDRepresentativeContactPerson + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDRepresentativeContactPerson) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDRepresentativeContactPerson + Return CType(SerializerXml.Deserialize(s), DETPDDRepresentativeContactPerson) + End Function +#End Region + + ''' + ''' Serializes current DETPDDRepresentativeContactPerson object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDRepresentativeContactPerson object + ''' + ''' File to load and deserialize + ''' Output DETPDDRepresentativeContactPerson object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDRepresentativeContactPerson, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDRepresentativeContactPerson) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDRepresentativeContactPerson) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDRepresentativeContactPerson + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDGuarantee + +#Region "Private fields" + Private _sequenceNumber As String + + Private _guaranteeType As String + + Private _otherGuaranteeReference As String + + Private _guaranteeReference As List(Of DETPDDGuaranteeGuaranteeReference) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._guaranteeReference = New List(Of DETPDDGuaranteeGuaranteeReference)() + 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 DETPDDGuaranteeGuaranteeReference) + 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(DETPDDGuarantee)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDGuarantee object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDGuarantee object + ''' + ''' string to deserialize + ''' Output DETPDDGuarantee object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDGuarantee, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDGuarantee) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDGuarantee) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDGuarantee + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDGuarantee) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDGuarantee + Return CType(SerializerXml.Deserialize(s), DETPDDGuarantee) + End Function +#End Region + + ''' + ''' Serializes current DETPDDGuarantee object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDGuarantee object + ''' + ''' File to load and deserialize + ''' Output DETPDDGuarantee object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDGuarantee, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDGuarantee) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDGuarantee) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDGuarantee + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDGuaranteeGuaranteeReference + +#Region "Private fields" + Private _sequenceNumber As String + + Private _gRN As String + + Private _accessCode As String + + Private _amountToBeCovered As Decimal + + Private _currency As DETPDDGuaranteeGuaranteeReferenceCurrency + + 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 accessCode() As String + Get + Return Me._accessCode + End Get + Set + Me._accessCode = 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 DETPDDGuaranteeGuaranteeReferenceCurrency + 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(DETPDDGuaranteeGuaranteeReference)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDGuaranteeGuaranteeReference object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDGuaranteeGuaranteeReference object + ''' + ''' string to deserialize + ''' Output DETPDDGuaranteeGuaranteeReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDGuaranteeGuaranteeReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDGuaranteeGuaranteeReference) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDGuaranteeGuaranteeReference) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDGuaranteeGuaranteeReference + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDGuaranteeGuaranteeReference) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDGuaranteeGuaranteeReference + Return CType(SerializerXml.Deserialize(s), DETPDDGuaranteeGuaranteeReference) + End Function +#End Region + + ''' + ''' Serializes current DETPDDGuaranteeGuaranteeReference object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDGuaranteeGuaranteeReference object + ''' + ''' File to load and deserialize + ''' Output DETPDDGuaranteeGuaranteeReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDGuaranteeGuaranteeReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDGuaranteeGuaranteeReference) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDGuaranteeGuaranteeReference) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDGuaranteeGuaranteeReference + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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 DETPDDGuaranteeGuaranteeReferenceCurrency + + EUR + End Enum + + + Partial Public Class DETPDDConsignment + +#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 DETPDDConsignmentCarrier + + Private _consignor As DETPDDConsignmentConsignor + + Private _consignee As DETPDDConsignmentConsignee + + Private _additionalSupplyChainActor As List(Of DETPDDConsignmentAdditionalSupplyChainActor) + + Private _transportEquipment As List(Of DETPDDConsignmentTransportEquipment) + + Private _locationOfGoods As DETPDDConsignmentLocationOfGoods + + Private _departureTransportMeans As List(Of DETPDDConsignmentDepartureTransportMeans) + + Private _countryOfRoutingOfConsignment As List(Of DETPDDConsignmentCountryOfRoutingOfConsignment) + + Private _activeBorderTransportMeans As List(Of DETPDDConsignmentActiveBorderTransportMeans) + + Private _placeOfLoading As DETPDDConsignmentPlaceOfLoading + + Private _placeOfUnloading As DETPDDConsignmentPlaceOfUnloading + + Private _previousDocument As List(Of DETPDDConsignmentPreviousDocument) + + Private _supportingDocument As List(Of DETPDDConsignmentSupportingDocument) + + Private _transportDocument As List(Of DETPDDConsignmentTransportDocument) + + Private _additionalReference As List(Of DETPDDConsignmentAdditionalReference) + + Private _additionalInformation As List(Of DETPDDConsignmentAdditionalInformation) + + Private _transportCharges As DETPDDConsignmentTransportCharges + + Private _houseConsignment As List(Of DETPDDConsignmentHouseConsignment) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._houseConsignment = New List(Of DETPDDConsignmentHouseConsignment)() + Me._transportCharges = New DETPDDConsignmentTransportCharges() + Me._additionalInformation = New List(Of DETPDDConsignmentAdditionalInformation)() + Me._additionalReference = New List(Of DETPDDConsignmentAdditionalReference)() + Me._transportDocument = New List(Of DETPDDConsignmentTransportDocument)() + Me._supportingDocument = New List(Of DETPDDConsignmentSupportingDocument)() + Me._previousDocument = New List(Of DETPDDConsignmentPreviousDocument)() + Me._placeOfUnloading = New DETPDDConsignmentPlaceOfUnloading() + Me._placeOfLoading = New DETPDDConsignmentPlaceOfLoading() + Me._activeBorderTransportMeans = New List(Of DETPDDConsignmentActiveBorderTransportMeans)() + Me._countryOfRoutingOfConsignment = New List(Of DETPDDConsignmentCountryOfRoutingOfConsignment)() + Me._departureTransportMeans = New List(Of DETPDDConsignmentDepartureTransportMeans)() + Me._locationOfGoods = New DETPDDConsignmentLocationOfGoods() + Me._transportEquipment = New List(Of DETPDDConsignmentTransportEquipment)() + Me._additionalSupplyChainActor = New List(Of DETPDDConsignmentAdditionalSupplyChainActor)() + Me._consignee = New DETPDDConsignmentConsignee() + Me._consignor = New DETPDDConsignmentConsignor() + Me._carrier = New DETPDDConsignmentCarrier() + 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 DETPDDConsignmentCarrier + Get + Return Me._carrier + End Get + Set + Me._carrier = Value + End Set + End Property + + Public Property Consignor() As DETPDDConsignmentConsignor + Get + Return Me._consignor + End Get + Set + Me._consignor = Value + End Set + End Property + + Public Property Consignee() As DETPDDConsignmentConsignee + Get + Return Me._consignee + End Get + Set + Me._consignee = Value + End Set + End Property + + + Public Property AdditionalSupplyChainActor() As List(Of DETPDDConsignmentAdditionalSupplyChainActor) + Get + Return Me._additionalSupplyChainActor + End Get + Set + Me._additionalSupplyChainActor = Value + End Set + End Property + + + Public Property TransportEquipment() As List(Of DETPDDConsignmentTransportEquipment) + Get + Return Me._transportEquipment + End Get + Set + Me._transportEquipment = Value + End Set + End Property + + Public Property LocationOfGoods() As DETPDDConsignmentLocationOfGoods + Get + Return Me._locationOfGoods + End Get + Set + Me._locationOfGoods = Value + End Set + End Property + + + Public Property DepartureTransportMeans() As List(Of DETPDDConsignmentDepartureTransportMeans) + Get + Return Me._departureTransportMeans + End Get + Set + Me._departureTransportMeans = Value + End Set + End Property + + + Public Property CountryOfRoutingOfConsignment() As List(Of DETPDDConsignmentCountryOfRoutingOfConsignment) + Get + Return Me._countryOfRoutingOfConsignment + End Get + Set + Me._countryOfRoutingOfConsignment = Value + End Set + End Property + + + Public Property ActiveBorderTransportMeans() As List(Of DETPDDConsignmentActiveBorderTransportMeans) + Get + Return Me._activeBorderTransportMeans + End Get + Set + Me._activeBorderTransportMeans = Value + End Set + End Property + + Public Property PlaceOfLoading() As DETPDDConsignmentPlaceOfLoading + Get + Return Me._placeOfLoading + End Get + Set + Me._placeOfLoading = Value + End Set + End Property + + Public Property PlaceOfUnloading() As DETPDDConsignmentPlaceOfUnloading + Get + Return Me._placeOfUnloading + End Get + Set + Me._placeOfUnloading = Value + End Set + End Property + + + Public Property PreviousDocument() As List(Of DETPDDConsignmentPreviousDocument) + Get + Return Me._previousDocument + End Get + Set + Me._previousDocument = Value + End Set + End Property + + + Public Property SupportingDocument() As List(Of DETPDDConsignmentSupportingDocument) + Get + Return Me._supportingDocument + End Get + Set + Me._supportingDocument = Value + End Set + End Property + + + Public Property TransportDocument() As List(Of DETPDDConsignmentTransportDocument) + Get + Return Me._transportDocument + End Get + Set + Me._transportDocument = Value + End Set + End Property + + + Public Property AdditionalReference() As List(Of DETPDDConsignmentAdditionalReference) + Get + Return Me._additionalReference + End Get + Set + Me._additionalReference = Value + End Set + End Property + + + Public Property AdditionalInformation() As List(Of DETPDDConsignmentAdditionalInformation) + Get + Return Me._additionalInformation + End Get + Set + Me._additionalInformation = Value + End Set + End Property + + Public Property TransportCharges() As DETPDDConsignmentTransportCharges + Get + Return Me._transportCharges + End Get + Set + Me._transportCharges = Value + End Set + End Property + + + Public Property HouseConsignment() As List(Of DETPDDConsignmentHouseConsignment) + 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(DETPDDConsignment)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignment object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignment object + ''' + ''' string to deserialize + ''' Output DETPDDConsignment object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignment, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignment) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignment) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignment + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignment) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignment + Return CType(SerializerXml.Deserialize(s), DETPDDConsignment) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignment object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignment object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignment object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignment, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignment) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignment) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignment + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentCarrier + +#Region "Private fields" + Private _identificationNumber As String + + Private _subsidiaryNumber As String + + Private _contactPerson As DETPDDConsignmentCarrierContactPerson + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contactPerson = New DETPDDConsignmentCarrierContactPerson() + 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 DETPDDConsignmentCarrierContactPerson + 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(DETPDDConsignmentCarrier)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentCarrier object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentCarrier object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentCarrier object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentCarrier, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentCarrier) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentCarrier) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentCarrier + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentCarrier) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentCarrier + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentCarrier) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentCarrier object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentCarrier object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentCarrier object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentCarrier, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentCarrier) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentCarrier) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentCarrier + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentCarrierContactPerson + +#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(DETPDDConsignmentCarrierContactPerson)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentCarrierContactPerson object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentCarrierContactPerson object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentCarrierContactPerson object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentCarrierContactPerson, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentCarrierContactPerson) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentCarrierContactPerson) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentCarrierContactPerson + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentCarrierContactPerson) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentCarrierContactPerson + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentCarrierContactPerson) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentCarrierContactPerson object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentCarrierContactPerson object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentCarrierContactPerson object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentCarrierContactPerson, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentCarrierContactPerson) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentCarrierContactPerson) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentCarrierContactPerson + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentConsignor + +#Region "Private fields" + Private _identificationNumber As String + + Private _subsidiaryNumber As String + + Private _name As String + + Private _address As DETPDDConsignmentConsignorAddress + + Private _contactPerson As DETPDDConsignmentConsignorContactPerson + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contactPerson = New DETPDDConsignmentConsignorContactPerson() + Me._address = New DETPDDConsignmentConsignorAddress() + 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 DETPDDConsignmentConsignorAddress + Get + Return Me._address + End Get + Set + Me._address = Value + End Set + End Property + + Public Property ContactPerson() As DETPDDConsignmentConsignorContactPerson + 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(DETPDDConsignmentConsignor)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentConsignor object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentConsignor object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentConsignor object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentConsignor, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentConsignor) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentConsignor) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentConsignor + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentConsignor) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentConsignor + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentConsignor) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentConsignor object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentConsignor object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentConsignor object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentConsignor, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentConsignor) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentConsignor) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentConsignor + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentConsignorAddress + +#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(DETPDDConsignmentConsignorAddress)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentConsignorAddress object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentConsignorAddress object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentConsignorAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentConsignorAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentConsignorAddress) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentConsignorAddress) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentConsignorAddress + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentConsignorAddress) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentConsignorAddress + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentConsignorAddress) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentConsignorAddress object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentConsignorAddress object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentConsignorAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentConsignorAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentConsignorAddress) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentConsignorAddress) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentConsignorAddress + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentConsignorContactPerson + +#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(DETPDDConsignmentConsignorContactPerson)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentConsignorContactPerson object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentConsignorContactPerson object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentConsignorContactPerson object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentConsignorContactPerson, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentConsignorContactPerson) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentConsignorContactPerson) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentConsignorContactPerson + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentConsignorContactPerson) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentConsignorContactPerson + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentConsignorContactPerson) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentConsignorContactPerson object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentConsignorContactPerson object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentConsignorContactPerson object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentConsignorContactPerson, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentConsignorContactPerson) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentConsignorContactPerson) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentConsignorContactPerson + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentConsignee + +#Region "Private fields" + Private _identificationNumber As String + + Private _subsidiaryNumber As String + + Private _name As String + + Private _address As DETPDDConsignmentConsigneeAddress + + Private _contactPerson As DETPDDConsignmentConsigneeContactPerson + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contactPerson = New DETPDDConsignmentConsigneeContactPerson() + Me._address = New DETPDDConsignmentConsigneeAddress() + 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 DETPDDConsignmentConsigneeAddress + Get + Return Me._address + End Get + Set + Me._address = Value + End Set + End Property + + Public Property ContactPerson() As DETPDDConsignmentConsigneeContactPerson + 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(DETPDDConsignmentConsignee)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentConsignee object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentConsignee object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentConsignee object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentConsignee, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentConsignee) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentConsignee) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentConsignee + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentConsignee) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentConsignee + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentConsignee) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentConsignee object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentConsignee object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentConsignee object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentConsignee, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentConsignee) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentConsignee) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentConsignee + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentConsigneeAddress + +#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(DETPDDConsignmentConsigneeAddress)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentConsigneeAddress object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentConsigneeAddress object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentConsigneeAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentConsigneeAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentConsigneeAddress) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentConsigneeAddress) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentConsigneeAddress + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentConsigneeAddress) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentConsigneeAddress + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentConsigneeAddress) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentConsigneeAddress object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentConsigneeAddress object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentConsigneeAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentConsigneeAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentConsigneeAddress) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentConsigneeAddress) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentConsigneeAddress + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentConsigneeContactPerson + +#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(DETPDDConsignmentConsigneeContactPerson)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentConsigneeContactPerson object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentConsigneeContactPerson object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentConsigneeContactPerson object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentConsigneeContactPerson, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentConsigneeContactPerson) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentConsigneeContactPerson) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentConsigneeContactPerson + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentConsigneeContactPerson) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentConsigneeContactPerson + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentConsigneeContactPerson) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentConsigneeContactPerson object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentConsigneeContactPerson object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentConsigneeContactPerson object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentConsigneeContactPerson, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentConsigneeContactPerson) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentConsigneeContactPerson) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentConsigneeContactPerson + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentAdditionalSupplyChainActor + +#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(DETPDDConsignmentAdditionalSupplyChainActor)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentAdditionalSupplyChainActor object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentAdditionalSupplyChainActor object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentAdditionalSupplyChainActor object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentAdditionalSupplyChainActor, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentAdditionalSupplyChainActor) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentAdditionalSupplyChainActor) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentAdditionalSupplyChainActor + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentAdditionalSupplyChainActor) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentAdditionalSupplyChainActor + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentAdditionalSupplyChainActor) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentAdditionalSupplyChainActor object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentAdditionalSupplyChainActor object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentAdditionalSupplyChainActor object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentAdditionalSupplyChainActor, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentAdditionalSupplyChainActor) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentAdditionalSupplyChainActor) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentAdditionalSupplyChainActor + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentTransportEquipment + +#Region "Private fields" + Private _sequenceNumber As String + + Private _containerIdentificationNumber As String + + Private _numberOfSeals As String + + Private _seal As List(Of DETPDDConsignmentTransportEquipmentSeal) + + Private _goodsReference As List(Of DETPDDConsignmentTransportEquipmentGoodsReference) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsReference = New List(Of DETPDDConsignmentTransportEquipmentGoodsReference)() + Me._seal = New List(Of DETPDDConsignmentTransportEquipmentSeal)() + 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 DETPDDConsignmentTransportEquipmentSeal) + Get + Return Me._seal + End Get + Set + Me._seal = Value + End Set + End Property + + + Public Property GoodsReference() As List(Of DETPDDConsignmentTransportEquipmentGoodsReference) + 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(DETPDDConsignmentTransportEquipment)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentTransportEquipment object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentTransportEquipment object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentTransportEquipment object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentTransportEquipment, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentTransportEquipment) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentTransportEquipment) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentTransportEquipment + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentTransportEquipment) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentTransportEquipment + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentTransportEquipment) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentTransportEquipment object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentTransportEquipment object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentTransportEquipment object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentTransportEquipment, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentTransportEquipment) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentTransportEquipment) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentTransportEquipment + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentTransportEquipmentSeal + +#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(DETPDDConsignmentTransportEquipmentSeal)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentTransportEquipmentSeal object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentTransportEquipmentSeal object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentTransportEquipmentSeal object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentTransportEquipmentSeal, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentTransportEquipmentSeal) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentTransportEquipmentSeal) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentTransportEquipmentSeal + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentTransportEquipmentSeal) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentTransportEquipmentSeal + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentTransportEquipmentSeal) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentTransportEquipmentSeal object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentTransportEquipmentSeal object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentTransportEquipmentSeal object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentTransportEquipmentSeal, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentTransportEquipmentSeal) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentTransportEquipmentSeal) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentTransportEquipmentSeal + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentTransportEquipmentGoodsReference + +#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(DETPDDConsignmentTransportEquipmentGoodsReference)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentTransportEquipmentGoodsReference object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentTransportEquipmentGoodsReference object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentTransportEquipmentGoodsReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentTransportEquipmentGoodsReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentTransportEquipmentGoodsReference) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentTransportEquipmentGoodsReference) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentTransportEquipmentGoodsReference + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentTransportEquipmentGoodsReference) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentTransportEquipmentGoodsReference + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentTransportEquipmentGoodsReference) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentTransportEquipmentGoodsReference object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentTransportEquipmentGoodsReference object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentTransportEquipmentGoodsReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentTransportEquipmentGoodsReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentTransportEquipmentGoodsReference) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentTransportEquipmentGoodsReference) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentTransportEquipmentGoodsReference + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentLocationOfGoods + +#Region "Private fields" + Private _typeOfLocation As String + + Private _qualifierOfIdentification As String + + Private _additionalIdentifier As String + + Private _contactPerson As DETPDDConsignmentLocationOfGoodsContactPerson + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contactPerson = New DETPDDConsignmentLocationOfGoodsContactPerson() + 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 DETPDDConsignmentLocationOfGoodsContactPerson + 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(DETPDDConsignmentLocationOfGoods)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentLocationOfGoods object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentLocationOfGoods object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentLocationOfGoods object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentLocationOfGoods, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentLocationOfGoods) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentLocationOfGoods) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentLocationOfGoods + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentLocationOfGoods) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentLocationOfGoods + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentLocationOfGoods) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentLocationOfGoods object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentLocationOfGoods object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentLocationOfGoods object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentLocationOfGoods, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentLocationOfGoods) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentLocationOfGoods) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentLocationOfGoods + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentLocationOfGoodsContactPerson + +#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(DETPDDConsignmentLocationOfGoodsContactPerson)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentLocationOfGoodsContactPerson object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentLocationOfGoodsContactPerson object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentLocationOfGoodsContactPerson object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentLocationOfGoodsContactPerson, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentLocationOfGoodsContactPerson) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentLocationOfGoodsContactPerson) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentLocationOfGoodsContactPerson + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentLocationOfGoodsContactPerson) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentLocationOfGoodsContactPerson + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentLocationOfGoodsContactPerson) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentLocationOfGoodsContactPerson object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentLocationOfGoodsContactPerson object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentLocationOfGoodsContactPerson object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentLocationOfGoodsContactPerson, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentLocationOfGoodsContactPerson) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentLocationOfGoodsContactPerson) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentLocationOfGoodsContactPerson + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentDepartureTransportMeans + +#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(DETPDDConsignmentDepartureTransportMeans)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentDepartureTransportMeans object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentDepartureTransportMeans object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentDepartureTransportMeans object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentDepartureTransportMeans, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentDepartureTransportMeans) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentDepartureTransportMeans) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentDepartureTransportMeans + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentDepartureTransportMeans) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentDepartureTransportMeans + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentDepartureTransportMeans) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentDepartureTransportMeans object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentDepartureTransportMeans object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentDepartureTransportMeans object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentDepartureTransportMeans, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentDepartureTransportMeans) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentDepartureTransportMeans) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentDepartureTransportMeans + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentCountryOfRoutingOfConsignment + +#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(DETPDDConsignmentCountryOfRoutingOfConsignment)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentCountryOfRoutingOfConsignment object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentCountryOfRoutingOfConsignment object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentCountryOfRoutingOfConsignment object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentCountryOfRoutingOfConsignment, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentCountryOfRoutingOfConsignment) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentCountryOfRoutingOfConsignment) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentCountryOfRoutingOfConsignment + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentCountryOfRoutingOfConsignment) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentCountryOfRoutingOfConsignment + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentCountryOfRoutingOfConsignment) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentCountryOfRoutingOfConsignment object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentCountryOfRoutingOfConsignment object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentCountryOfRoutingOfConsignment object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentCountryOfRoutingOfConsignment, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentCountryOfRoutingOfConsignment) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentCountryOfRoutingOfConsignment) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentCountryOfRoutingOfConsignment + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentActiveBorderTransportMeans + +#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 DETPDDConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._customsOfficeAtBorderDeclared = New DETPDDConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared() + 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 DETPDDConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared + 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(DETPDDConsignmentActiveBorderTransportMeans)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentActiveBorderTransportMeans object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentActiveBorderTransportMeans object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentActiveBorderTransportMeans object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentActiveBorderTransportMeans, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentActiveBorderTransportMeans) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentActiveBorderTransportMeans) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentActiveBorderTransportMeans + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentActiveBorderTransportMeans) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentActiveBorderTransportMeans + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentActiveBorderTransportMeans) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentActiveBorderTransportMeans object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentActiveBorderTransportMeans object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentActiveBorderTransportMeans object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentActiveBorderTransportMeans, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentActiveBorderTransportMeans) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentActiveBorderTransportMeans) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentActiveBorderTransportMeans + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared + +#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(DETPDDConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentActiveBorderTransportMeansCustomsOfficeAtBorderDeclared + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentPlaceOfLoading + +#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(DETPDDConsignmentPlaceOfLoading)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentPlaceOfLoading object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentPlaceOfLoading object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentPlaceOfLoading object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentPlaceOfLoading, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentPlaceOfLoading) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentPlaceOfLoading) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentPlaceOfLoading + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentPlaceOfLoading) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentPlaceOfLoading + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentPlaceOfLoading) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentPlaceOfLoading object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentPlaceOfLoading object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentPlaceOfLoading object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentPlaceOfLoading, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentPlaceOfLoading) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentPlaceOfLoading) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentPlaceOfLoading + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentPlaceOfUnloading + +#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(DETPDDConsignmentPlaceOfUnloading)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentPlaceOfUnloading object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentPlaceOfUnloading object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentPlaceOfUnloading object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentPlaceOfUnloading, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentPlaceOfUnloading) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentPlaceOfUnloading) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentPlaceOfUnloading + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentPlaceOfUnloading) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentPlaceOfUnloading + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentPlaceOfUnloading) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentPlaceOfUnloading object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentPlaceOfUnloading object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentPlaceOfUnloading object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentPlaceOfUnloading, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentPlaceOfUnloading) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentPlaceOfUnloading) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentPlaceOfUnloading + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentPreviousDocument + +#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(DETPDDConsignmentPreviousDocument)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentPreviousDocument object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentPreviousDocument object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentPreviousDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentPreviousDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentPreviousDocument) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentPreviousDocument) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentPreviousDocument + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentPreviousDocument) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentPreviousDocument + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentPreviousDocument) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentPreviousDocument object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentPreviousDocument object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentPreviousDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentPreviousDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentPreviousDocument) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentPreviousDocument) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentPreviousDocument + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentSupportingDocument + +#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(DETPDDConsignmentSupportingDocument)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentSupportingDocument object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentSupportingDocument object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentSupportingDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentSupportingDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentSupportingDocument) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentSupportingDocument) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentSupportingDocument + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentSupportingDocument) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentSupportingDocument + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentSupportingDocument) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentSupportingDocument object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentSupportingDocument object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentSupportingDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentSupportingDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentSupportingDocument) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentSupportingDocument) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentSupportingDocument + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentTransportDocument + +#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(DETPDDConsignmentTransportDocument)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentTransportDocument object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentTransportDocument object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentTransportDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentTransportDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentTransportDocument) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentTransportDocument) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentTransportDocument + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentTransportDocument) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentTransportDocument + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentTransportDocument) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentTransportDocument object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentTransportDocument object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentTransportDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentTransportDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentTransportDocument) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentTransportDocument) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentTransportDocument + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentAdditionalReference + +#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(DETPDDConsignmentAdditionalReference)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentAdditionalReference object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentAdditionalReference object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentAdditionalReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentAdditionalReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentAdditionalReference) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentAdditionalReference) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentAdditionalReference + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentAdditionalReference) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentAdditionalReference + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentAdditionalReference) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentAdditionalReference object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentAdditionalReference object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentAdditionalReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentAdditionalReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentAdditionalReference) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentAdditionalReference) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentAdditionalReference + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentAdditionalInformation + +#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(DETPDDConsignmentAdditionalInformation)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentAdditionalInformation object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentAdditionalInformation object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentAdditionalInformation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentAdditionalInformation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentAdditionalInformation) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentAdditionalInformation) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentAdditionalInformation + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentAdditionalInformation) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentAdditionalInformation + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentAdditionalInformation) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentAdditionalInformation object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentAdditionalInformation object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentAdditionalInformation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentAdditionalInformation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentAdditionalInformation) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentAdditionalInformation) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentAdditionalInformation + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentTransportCharges + +#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(DETPDDConsignmentTransportCharges)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentTransportCharges object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentTransportCharges object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentTransportCharges object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentTransportCharges, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentTransportCharges) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentTransportCharges) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentTransportCharges + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentTransportCharges) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentTransportCharges + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentTransportCharges) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentTransportCharges object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentTransportCharges object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentTransportCharges object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentTransportCharges, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentTransportCharges) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentTransportCharges) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentTransportCharges + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignment + +#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 DETPDDConsignmentHouseConsignmentConsignor + + Private _consignee As DETPDDConsignmentHouseConsignmentConsignee + + Private _additionalSupplyChainActor As List(Of DETPDDConsignmentHouseConsignmentAdditionalSupplyChainActor) + + Private _previousDocument As List(Of DETPDDConsignmentHouseConsignmentPreviousDocument) + + Private _supportingDocument As List(Of DETPDDConsignmentHouseConsignmentSupportingDocument) + + Private _transportDocument As List(Of DETPDDConsignmentHouseConsignmentTransportDocument) + + Private _additionalReference As List(Of DETPDDConsignmentHouseConsignmentAdditionalReference) + + Private _additionalInformation As List(Of DETPDDConsignmentHouseConsignmentAdditionalInformation) + + Private _transportCharges As DETPDDConsignmentHouseConsignmentTransportCharges + + Private _consignmentItem As List(Of DETPDDConsignmentHouseConsignmentConsignmentItem) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._consignmentItem = New List(Of DETPDDConsignmentHouseConsignmentConsignmentItem)() + Me._transportCharges = New DETPDDConsignmentHouseConsignmentTransportCharges() + Me._additionalInformation = New List(Of DETPDDConsignmentHouseConsignmentAdditionalInformation)() + Me._additionalReference = New List(Of DETPDDConsignmentHouseConsignmentAdditionalReference)() + Me._transportDocument = New List(Of DETPDDConsignmentHouseConsignmentTransportDocument)() + Me._supportingDocument = New List(Of DETPDDConsignmentHouseConsignmentSupportingDocument)() + Me._previousDocument = New List(Of DETPDDConsignmentHouseConsignmentPreviousDocument)() + Me._additionalSupplyChainActor = New List(Of DETPDDConsignmentHouseConsignmentAdditionalSupplyChainActor)() + Me._consignee = New DETPDDConsignmentHouseConsignmentConsignee() + Me._consignor = New DETPDDConsignmentHouseConsignmentConsignor() + 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 DETPDDConsignmentHouseConsignmentConsignor + Get + Return Me._consignor + End Get + Set + Me._consignor = Value + End Set + End Property + + Public Property Consignee() As DETPDDConsignmentHouseConsignmentConsignee + Get + Return Me._consignee + End Get + Set + Me._consignee = Value + End Set + End Property + + + Public Property AdditionalSupplyChainActor() As List(Of DETPDDConsignmentHouseConsignmentAdditionalSupplyChainActor) + Get + Return Me._additionalSupplyChainActor + End Get + Set + Me._additionalSupplyChainActor = Value + End Set + End Property + + + Public Property PreviousDocument() As List(Of DETPDDConsignmentHouseConsignmentPreviousDocument) + Get + Return Me._previousDocument + End Get + Set + Me._previousDocument = Value + End Set + End Property + + + Public Property SupportingDocument() As List(Of DETPDDConsignmentHouseConsignmentSupportingDocument) + Get + Return Me._supportingDocument + End Get + Set + Me._supportingDocument = Value + End Set + End Property + + + Public Property TransportDocument() As List(Of DETPDDConsignmentHouseConsignmentTransportDocument) + Get + Return Me._transportDocument + End Get + Set + Me._transportDocument = Value + End Set + End Property + + + Public Property AdditionalReference() As List(Of DETPDDConsignmentHouseConsignmentAdditionalReference) + Get + Return Me._additionalReference + End Get + Set + Me._additionalReference = Value + End Set + End Property + + + Public Property AdditionalInformation() As List(Of DETPDDConsignmentHouseConsignmentAdditionalInformation) + Get + Return Me._additionalInformation + End Get + Set + Me._additionalInformation = Value + End Set + End Property + + Public Property TransportCharges() As DETPDDConsignmentHouseConsignmentTransportCharges + Get + Return Me._transportCharges + End Get + Set + Me._transportCharges = Value + End Set + End Property + + + Public Property ConsignmentItem() As List(Of DETPDDConsignmentHouseConsignmentConsignmentItem) + 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(DETPDDConsignmentHouseConsignment)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignment object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignment object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignment object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignment, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignment) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignment) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignment + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignment) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignment + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignment) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignment object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignment object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignment object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignment, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignment) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignment) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignment + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignor + +#Region "Private fields" + Private _identificationNumber As String + + Private _subsidiaryNumber As String + + Private _name As String + + Private _address As DETPDDConsignmentHouseConsignmentConsignorAddress + + Private _contactPerson As DETPDDConsignmentHouseConsignmentConsignorContactPerson + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contactPerson = New DETPDDConsignmentHouseConsignmentConsignorContactPerson() + Me._address = New DETPDDConsignmentHouseConsignmentConsignorAddress() + 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 DETPDDConsignmentHouseConsignmentConsignorAddress + Get + Return Me._address + End Get + Set + Me._address = Value + End Set + End Property + + Public Property ContactPerson() As DETPDDConsignmentHouseConsignmentConsignorContactPerson + 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(DETPDDConsignmentHouseConsignmentConsignor)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignor object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignor object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignor object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignor, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignor) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignor) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignor + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignor) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignor + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignor) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignor object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignor object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignor object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignor, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignor) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignor) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignor + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignorAddress + +#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(DETPDDConsignmentHouseConsignmentConsignorAddress)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignorAddress object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignorAddress object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignorAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignorAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignorAddress) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignorAddress) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignorAddress + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignorAddress) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignorAddress + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignorAddress) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignorAddress object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignorAddress object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignorAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignorAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignorAddress) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignorAddress) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignorAddress + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignorContactPerson + +#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(DETPDDConsignmentHouseConsignmentConsignorContactPerson)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignorContactPerson object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignorContactPerson object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignorContactPerson object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignorContactPerson, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignorContactPerson) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignorContactPerson) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignorContactPerson + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignorContactPerson) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignorContactPerson + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignorContactPerson) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignorContactPerson object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignorContactPerson object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignorContactPerson object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignorContactPerson, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignorContactPerson) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignorContactPerson) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignorContactPerson + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignee + +#Region "Private fields" + Private _identificationNumber As String + + Private _subsidiaryNumber As String + + Private _name As String + + Private _address As DETPDDConsignmentHouseConsignmentConsigneeAddress + + Private _contactPerson As DETPDDConsignmentHouseConsignmentConsigneeContactPerson + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contactPerson = New DETPDDConsignmentHouseConsignmentConsigneeContactPerson() + Me._address = New DETPDDConsignmentHouseConsignmentConsigneeAddress() + 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 DETPDDConsignmentHouseConsignmentConsigneeAddress + Get + Return Me._address + End Get + Set + Me._address = Value + End Set + End Property + + Public Property ContactPerson() As DETPDDConsignmentHouseConsignmentConsigneeContactPerson + 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(DETPDDConsignmentHouseConsignmentConsignee)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignee object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignee object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignee object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignee, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignee) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignee) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignee + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignee) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignee + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignee) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignee object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignee object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignee object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignee, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignee) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignee) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignee + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsigneeAddress + +#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(DETPDDConsignmentHouseConsignmentConsigneeAddress)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsigneeAddress object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsigneeAddress object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsigneeAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsigneeAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsigneeAddress) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsigneeAddress) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsigneeAddress + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsigneeAddress) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsigneeAddress + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsigneeAddress) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsigneeAddress object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsigneeAddress object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsigneeAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsigneeAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsigneeAddress) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsigneeAddress) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsigneeAddress + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsigneeContactPerson + +#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(DETPDDConsignmentHouseConsignmentConsigneeContactPerson)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsigneeContactPerson object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsigneeContactPerson object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsigneeContactPerson object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsigneeContactPerson, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsigneeContactPerson) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsigneeContactPerson) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsigneeContactPerson + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsigneeContactPerson) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsigneeContactPerson + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsigneeContactPerson) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsigneeContactPerson object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsigneeContactPerson object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsigneeContactPerson object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsigneeContactPerson, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsigneeContactPerson) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsigneeContactPerson) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsigneeContactPerson + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentAdditionalSupplyChainActor + +#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(DETPDDConsignmentHouseConsignmentAdditionalSupplyChainActor)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentAdditionalSupplyChainActor object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentAdditionalSupplyChainActor object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentAdditionalSupplyChainActor object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentAdditionalSupplyChainActor, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentAdditionalSupplyChainActor) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentAdditionalSupplyChainActor) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentAdditionalSupplyChainActor + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentAdditionalSupplyChainActor) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentAdditionalSupplyChainActor + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentAdditionalSupplyChainActor) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentAdditionalSupplyChainActor object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentAdditionalSupplyChainActor object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentAdditionalSupplyChainActor object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentAdditionalSupplyChainActor, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentAdditionalSupplyChainActor) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentAdditionalSupplyChainActor) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentAdditionalSupplyChainActor + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentPreviousDocument + +#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(DETPDDConsignmentHouseConsignmentPreviousDocument)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentPreviousDocument object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentPreviousDocument object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentPreviousDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentPreviousDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentPreviousDocument) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentPreviousDocument) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentPreviousDocument + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentPreviousDocument) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentPreviousDocument + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentPreviousDocument) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentPreviousDocument object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentPreviousDocument object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentPreviousDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentPreviousDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentPreviousDocument) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentPreviousDocument) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentPreviousDocument + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentSupportingDocument + +#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(DETPDDConsignmentHouseConsignmentSupportingDocument)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentSupportingDocument object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentSupportingDocument object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentSupportingDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentSupportingDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentSupportingDocument) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentSupportingDocument) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentSupportingDocument + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentSupportingDocument) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentSupportingDocument + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentSupportingDocument) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentSupportingDocument object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentSupportingDocument object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentSupportingDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentSupportingDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentSupportingDocument) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentSupportingDocument) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentSupportingDocument + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentTransportDocument + +#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(DETPDDConsignmentHouseConsignmentTransportDocument)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentTransportDocument object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentTransportDocument object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentTransportDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentTransportDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentTransportDocument) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentTransportDocument) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentTransportDocument + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentTransportDocument) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentTransportDocument + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentTransportDocument) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentTransportDocument object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentTransportDocument object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentTransportDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentTransportDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentTransportDocument) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentTransportDocument) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentTransportDocument + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentAdditionalReference + +#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(DETPDDConsignmentHouseConsignmentAdditionalReference)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentAdditionalReference object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentAdditionalReference object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentAdditionalReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentAdditionalReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentAdditionalReference) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentAdditionalReference) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentAdditionalReference + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentAdditionalReference) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentAdditionalReference + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentAdditionalReference) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentAdditionalReference object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentAdditionalReference object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentAdditionalReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentAdditionalReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentAdditionalReference) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentAdditionalReference) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentAdditionalReference + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentAdditionalInformation + +#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(DETPDDConsignmentHouseConsignmentAdditionalInformation)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentAdditionalInformation object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentAdditionalInformation object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentAdditionalInformation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentAdditionalInformation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentAdditionalInformation) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentAdditionalInformation) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentAdditionalInformation + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentAdditionalInformation) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentAdditionalInformation + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentAdditionalInformation) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentAdditionalInformation object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentAdditionalInformation object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentAdditionalInformation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentAdditionalInformation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentAdditionalInformation) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentAdditionalInformation) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentAdditionalInformation + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentTransportCharges + +#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(DETPDDConsignmentHouseConsignmentTransportCharges)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentTransportCharges object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentTransportCharges object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentTransportCharges object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentTransportCharges, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentTransportCharges) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentTransportCharges) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentTransportCharges + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentTransportCharges) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentTransportCharges + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentTransportCharges) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentTransportCharges object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentTransportCharges object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentTransportCharges object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentTransportCharges, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentTransportCharges) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentTransportCharges) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentTransportCharges + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItem + +#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 DETPDDConsignmentHouseConsignmentConsignmentItemConsignee + + Private _additionalSupplyChainActor As List(Of DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor) + + Private _commodity As DETPDDConsignmentHouseConsignmentConsignmentItemCommodity + + Private _packaging As List(Of DETPDDConsignmentHouseConsignmentConsignmentItemPackaging) + + Private _previousDocument As List(Of DETPDDConsignmentHouseConsignmentConsignmentItemPreviousDocument) + + Private _supportingDocument As List(Of DETPDDConsignmentHouseConsignmentConsignmentItemSupportingDocument) + + Private _additionalReference As List(Of DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalReference) + + Private _additionalInformation As List(Of DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalInformation) + + Private _transportCharges As DETPDDConsignmentHouseConsignmentConsignmentItemTransportCharges + + Private _procedureTransference As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransference + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._procedureTransference = New DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransference() + Me._transportCharges = New DETPDDConsignmentHouseConsignmentConsignmentItemTransportCharges() + Me._additionalInformation = New List(Of DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalInformation)() + Me._additionalReference = New List(Of DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalReference)() + Me._supportingDocument = New List(Of DETPDDConsignmentHouseConsignmentConsignmentItemSupportingDocument)() + Me._previousDocument = New List(Of DETPDDConsignmentHouseConsignmentConsignmentItemPreviousDocument)() + Me._packaging = New List(Of DETPDDConsignmentHouseConsignmentConsignmentItemPackaging)() + Me._commodity = New DETPDDConsignmentHouseConsignmentConsignmentItemCommodity() + Me._additionalSupplyChainActor = New List(Of DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor)() + Me._consignee = New DETPDDConsignmentHouseConsignmentConsignmentItemConsignee() + 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 DETPDDConsignmentHouseConsignmentConsignmentItemConsignee + Get + Return Me._consignee + End Get + Set + Me._consignee = Value + End Set + End Property + + + Public Property AdditionalSupplyChainActor() As List(Of DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor) + Get + Return Me._additionalSupplyChainActor + End Get + Set + Me._additionalSupplyChainActor = Value + End Set + End Property + + Public Property Commodity() As DETPDDConsignmentHouseConsignmentConsignmentItemCommodity + Get + Return Me._commodity + End Get + Set + Me._commodity = Value + End Set + End Property + + + Public Property Packaging() As List(Of DETPDDConsignmentHouseConsignmentConsignmentItemPackaging) + Get + Return Me._packaging + End Get + Set + Me._packaging = Value + End Set + End Property + + + Public Property PreviousDocument() As List(Of DETPDDConsignmentHouseConsignmentConsignmentItemPreviousDocument) + Get + Return Me._previousDocument + End Get + Set + Me._previousDocument = Value + End Set + End Property + + + Public Property SupportingDocument() As List(Of DETPDDConsignmentHouseConsignmentConsignmentItemSupportingDocument) + Get + Return Me._supportingDocument + End Get + Set + Me._supportingDocument = Value + End Set + End Property + + + Public Property AdditionalReference() As List(Of DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalReference) + Get + Return Me._additionalReference + End Get + Set + Me._additionalReference = Value + End Set + End Property + + + Public Property AdditionalInformation() As List(Of DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalInformation) + Get + Return Me._additionalInformation + End Get + Set + Me._additionalInformation = Value + End Set + End Property + + Public Property TransportCharges() As DETPDDConsignmentHouseConsignmentConsignmentItemTransportCharges + Get + Return Me._transportCharges + End Get + Set + Me._transportCharges = Value + End Set + End Property + + Public Property ProcedureTransference() As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransference + 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(DETPDDConsignmentHouseConsignmentConsignmentItem)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItem object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItem object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItem object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItem, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItem) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItem) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItem + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItem) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItem + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItem) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItem object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItem object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItem object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItem, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItem) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItem) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItem + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemConsignee + +#Region "Private fields" + Private _identificationNumber As String + + Private _subsidiaryNumber As String + + Private _name As String + + Private _address As DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeAddress + + Private _contactPerson As DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contactPerson = New DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson() + Me._address = New DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeAddress() + 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 DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeAddress + Get + Return Me._address + End Get + Set + Me._address = Value + End Set + End Property + + Public Property ContactPerson() As DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson + 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(DETPDDConsignmentHouseConsignmentConsignmentItemConsignee)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemConsignee object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemConsignee object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemConsignee object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemConsignee, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemConsignee) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemConsignee) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemConsignee + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemConsignee) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemConsignee + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemConsignee) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemConsignee object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemConsignee object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemConsignee object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemConsignee, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemConsignee) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemConsignee) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemConsignee + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeAddress + +#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(DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeAddress)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeAddress object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeAddress object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeAddress) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeAddress) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeAddress + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeAddress) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeAddress + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeAddress) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeAddress object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeAddress object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeAddress) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeAddress) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeAddress + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson + +#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(DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemConsigneeContactPerson + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor + +#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(DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalSupplyChainActor + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemCommodity + +#Region "Private fields" + Private _descriptionOfGoods As String + + Private _cusCode As String + + Private _commodityCode As DETPDDConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode + + Private _dangerousGoods As List(Of DETPDDConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods) + + Private _goodsMeasure As DETPDDConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsMeasure = New DETPDDConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure() + Me._dangerousGoods = New List(Of DETPDDConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods)() + Me._commodityCode = New DETPDDConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode() + 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 DETPDDConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode + Get + Return Me._commodityCode + End Get + Set + Me._commodityCode = Value + End Set + End Property + + + Public Property DangerousGoods() As List(Of DETPDDConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods) + Get + Return Me._dangerousGoods + End Get + Set + Me._dangerousGoods = Value + End Set + End Property + + Public Property GoodsMeasure() As DETPDDConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure + 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(DETPDDConsignmentHouseConsignmentConsignmentItemCommodity)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemCommodity object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemCommodity object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemCommodity object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemCommodity, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemCommodity) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemCommodity) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemCommodity + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemCommodity) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemCommodity + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemCommodity) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemCommodity object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemCommodity object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemCommodity object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemCommodity, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemCommodity) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemCommodity) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemCommodity + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode + +#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(DETPDDConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemCommodityCommodityCode + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods + +#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(DETPDDConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemCommodityDangerousGoods + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure + +#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(DETPDDConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemCommodityGoodsMeasure + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemPackaging + +#Region "Private fields" + Private _sequenceNumber As String + + Private _typeOfPackages As String + + Private _numberOfPackages As String + + Private _shippingMarks As String + + Private _packageReference As DETPDDConsignmentHouseConsignmentConsignmentItemPackagingPackageReference + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._packageReference = New DETPDDConsignmentHouseConsignmentConsignmentItemPackagingPackageReference() + 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 DETPDDConsignmentHouseConsignmentConsignmentItemPackagingPackageReference + 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(DETPDDConsignmentHouseConsignmentConsignmentItemPackaging)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemPackaging object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemPackaging object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemPackaging object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemPackaging, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemPackaging) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemPackaging) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemPackaging + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemPackaging) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemPackaging + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemPackaging) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemPackaging object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemPackaging object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemPackaging object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemPackaging, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemPackaging) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemPackaging) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemPackaging + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemPackagingPackageReference + +#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(DETPDDConsignmentHouseConsignmentConsignmentItemPackagingPackageReference)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemPackagingPackageReference object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemPackagingPackageReference object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemPackagingPackageReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemPackagingPackageReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemPackagingPackageReference) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemPackagingPackageReference) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemPackagingPackageReference + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemPackagingPackageReference) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemPackagingPackageReference + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemPackagingPackageReference) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemPackagingPackageReference object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemPackagingPackageReference object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemPackagingPackageReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemPackagingPackageReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemPackagingPackageReference) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemPackagingPackageReference) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemPackagingPackageReference + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemPreviousDocument + +#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(DETPDDConsignmentHouseConsignmentConsignmentItemPreviousDocument)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemPreviousDocument object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemPreviousDocument object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemPreviousDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemPreviousDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemPreviousDocument) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemPreviousDocument) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemPreviousDocument + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemPreviousDocument) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemPreviousDocument + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemPreviousDocument) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemPreviousDocument object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemPreviousDocument object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemPreviousDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemPreviousDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemPreviousDocument) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemPreviousDocument) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemPreviousDocument + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemSupportingDocument + +#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(DETPDDConsignmentHouseConsignmentConsignmentItemSupportingDocument)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemSupportingDocument object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemSupportingDocument object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemSupportingDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemSupportingDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemSupportingDocument) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemSupportingDocument) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemSupportingDocument + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemSupportingDocument) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemSupportingDocument + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemSupportingDocument) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemSupportingDocument object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemSupportingDocument object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemSupportingDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemSupportingDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemSupportingDocument) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemSupportingDocument) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemSupportingDocument + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalReference + +#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(DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalReference)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalReference object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalReference object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalReference) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalReference) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalReference + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalReference) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalReference + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalReference) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalReference object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalReference object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalReference) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalReference) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalReference + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalInformation + +#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(DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalInformation)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalInformation object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalInformation object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalInformation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalInformation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalInformation) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalInformation) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalInformation + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalInformation) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalInformation + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalInformation) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalInformation object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalInformation object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalInformation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalInformation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalInformation) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalInformation) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemAdditionalInformation + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemTransportCharges + +#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(DETPDDConsignmentHouseConsignmentConsignmentItemTransportCharges)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemTransportCharges object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemTransportCharges object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemTransportCharges object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemTransportCharges, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemTransportCharges) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemTransportCharges) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemTransportCharges + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemTransportCharges) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemTransportCharges + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemTransportCharges) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemTransportCharges object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemTransportCharges object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemTransportCharges object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemTransportCharges, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemTransportCharges) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemTransportCharges) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemTransportCharges + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransference + +#Region "Private fields" + Private _summaryDeclaration As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration + + Private _customsWarehousing As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing + + Private _inwardProcessing As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._inwardProcessing = New DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing() + Me._customsWarehousing = New DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing() + Me._summaryDeclaration = New DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration() + End Sub + + Public Property SummaryDeclaration() As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration + Get + Return Me._summaryDeclaration + End Get + Set + Me._summaryDeclaration = Value + End Set + End Property + + Public Property CustomsWarehousing() As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing + Get + Return Me._customsWarehousing + End Get + Set + Me._customsWarehousing = Value + End Set + End Property + + Public Property InwardProcessing() As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing + 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(DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransference)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransference object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransference object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransference) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransference) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransference + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransference) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransference + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransference) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransference object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransference object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransference) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransference) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransference + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration + +#Region "Private fields" + Private _identificationType As String + + Private _goodsReference As List(Of DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsReference = New List(Of DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference)() + End Sub + + + 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 DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference) + 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(DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclaration + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference + +#Region "Private fields" + Private _sequenceNumber As String + + Private _identificationByKey As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey + + Private _identificationByRegistrationNumber As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber + + Private _packaging As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._packaging = New DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging() + Me._identificationByRegistrationNumber = New DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber() + Me._identificationByKey = New DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey() + 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 DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey + Get + Return Me._identificationByKey + End Get + Set + Me._identificationByKey = Value + End Set + End Property + + Public Property IdentificationByRegistrationNumber() As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber + Get + Return Me._identificationByRegistrationNumber + End Get + Set + Me._identificationByRegistrationNumber = Value + End Set + End Property + + Public Property Packaging() As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging + 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(DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReference + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey + +#Region "Private fields" + Private _type As String + + Private _referenceNumber As String + + Private _custodian As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._custodian = New DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian() + 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 DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian + 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(DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKey + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian + +#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(DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByKeyCustodian + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber + +#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(DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferenceIdentificationByRegistrationNumber + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging + +#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(DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceSummaryDeclarationGoodsReferencePackaging + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing + +#Region "Private fields" + Private _lRN As String + + Private _authorisation As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation + + Private _goodsReference As List(Of DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsReference = New List(Of DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference)() + Me._authorisation = New DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation() + End Sub + + + Public Property LRN() As String + Get + Return Me._lRN + End Get + Set + Me._lRN = Value + End Set + End Property + + Public Property Authorisation() As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation + Get + Return Me._authorisation + End Get + Set + Me._authorisation = Value + End Set + End Property + + + Public Property GoodsReference() As List(Of DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference) + 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(DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousing + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation + +#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(DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingAuthorisation + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference + +#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 DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._commodity = New DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity() + 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 DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity + 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(DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReference + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity + +#Region "Private fields" + Private _commodityCode As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode + + Private _goodsReduction As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction + + Private _goodsReductionAfterTreatment As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsReductionAfterTreatment = New DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment() + Me._goodsReduction = New DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction() + Me._commodityCode = New DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode() + End Sub + + Public Property CommodityCode() As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode + Get + Return Me._commodityCode + End Get + Set + Me._commodityCode = Value + End Set + End Property + + Public Property GoodsReduction() As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction + Get + Return Me._goodsReduction + End Get + Set + Me._goodsReduction = Value + End Set + End Property + + Public Property GoodsReductionAfterTreatment() As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment + 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(DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode + +#Region "Private fields" + Private _harmonizedSystemSubHeadingCode As String + + Private _combinedNomenclatureCode As String + + Private _taricCode As String + + Private _nationalAdditionalCode As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._nationalAdditionalCode = New DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode() + 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 DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode + 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(DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode + +#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(DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction + +#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(DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment + +#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(DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing + +#Region "Private fields" + Private _simplyGrantedAuthorisation As String + + Private _authorisation As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation + + Private _customsOfficeOfSupervision As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision + + Private _goodsReference As List(Of DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsReference = New List(Of DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference)() + Me._customsOfficeOfSupervision = New DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision() + Me._authorisation = New DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation() + End Sub + + + Public Property simplyGrantedAuthorisation() As String + Get + Return Me._simplyGrantedAuthorisation + End Get + Set + Me._simplyGrantedAuthorisation = Value + End Set + End Property + + Public Property Authorisation() As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation + Get + Return Me._authorisation + End Get + Set + Me._authorisation = Value + End Set + End Property + + Public Property CustomsOfficeOfSupervision() As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision + Get + Return Me._customsOfficeOfSupervision + End Get + Set + Me._customsOfficeOfSupervision = Value + End Set + End Property + + + Public Property GoodsReference() As List(Of DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference) + 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(DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessing + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation + +#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(DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingAuthorisation + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision + +#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(DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference + +#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 DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._commodity = New DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity() + 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 DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity + 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(DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReference + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity + +#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(DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object + ''' + ''' string to deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity + Return CType(SerializerXml.Deserialize(s), DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity) + End Function +#End Region + + ''' + ''' Serializes current DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object + ''' + ''' File to load and deserialize + ''' Output DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DETPDDConsignmentHouseConsignmentConsignmentItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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/Versandanmeldung/ATLAS_9.1/e_dep_dat.xsd b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Versandanmeldung/ATLAS_9.1/e_dep_dat.xsd new file mode 100644 index 0000000..1e15339 --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Versandanmeldung/ATLAS_9.1/e_dep_dat.xsd @@ -0,0 +1,6469 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/VersandanmeldungNCTSDE_004.Designer.vb b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/VersandanmeldungNCTSDE_004.Designer.vb new file mode 100644 index 0000000..7d93196 --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/VersandanmeldungNCTSDE_004.Designer.vb @@ -0,0 +1,10048 @@ +'' ------------------------------------------------------------------------------ +'' +'' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com +'' {"TargetFramework":"Net47","NameSpace":"VersandanmeldungNCTSDE_004","Language":"VisualBasic","Properties":{},"XmlAttribute":{"Enabled":true},"ClassParams":{},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{},"JsonOutput":{},"Enabled":true},"Miscellaneous":{}} +'' +'' ------------------------------------------------------------------------------ +#Disable Warning +Imports System +Imports System.Diagnostics +Imports System.Xml.Serialization +Imports System.Runtime.Serialization +Imports System.Collections +Imports System.Xml.Schema +Imports System.ComponentModel +Imports System.Xml +Imports System.IO +Imports System.Text +Imports System.Collections.Generic + +Namespace VersandanmeldungNCTSDE_004 + + + Partial Public Class VersandanmeldungVATayp + Inherits DatenaustauschNCTSTyp + +#Region "Private fields" + Private _einzelVersandanmeldung As EinzelVersandanmeldungTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._einzelVersandanmeldung = New EinzelVersandanmeldungTyp() + End Sub + + + Public Property EinzelVersandanmeldung() As EinzelVersandanmeldungTyp + Get + Return Me._einzelVersandanmeldung + End Get + Set + Me._einzelVersandanmeldung = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(VersandanmeldungVATayp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize VersandanmeldungVATayp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes VersandanmeldungVATayp object + ''' + ''' string to deserialize + ''' Output VersandanmeldungVATayp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VersandanmeldungVATayp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VersandanmeldungVATayp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VersandanmeldungVATayp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As VersandanmeldungVATayp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), VersandanmeldungVATayp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As VersandanmeldungVATayp + Return CType(SerializerXml.Deserialize(s), VersandanmeldungVATayp) + End Function +#End Region + + ''' + ''' Serializes current VersandanmeldungVATayp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an VersandanmeldungVATayp object + ''' + ''' File to load and deserialize + ''' Output VersandanmeldungVATayp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VersandanmeldungVATayp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VersandanmeldungVATayp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VersandanmeldungVATayp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As VersandanmeldungVATayp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class EinzelVersandanmeldungTyp + +#Region "Private fields" + Private _objektIdentifizierung As ObjektIdentifizierungVATyp + + Private _transitOperation As TransitOperationType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._transitOperation = New TransitOperationType() + Me._objektIdentifizierung = New ObjektIdentifizierungVATyp() + End Sub + + + Public Property ObjektIdentifizierung() As ObjektIdentifizierungVATyp + Get + Return Me._objektIdentifizierung + End Get + Set + Me._objektIdentifizierung = Value + End Set + End Property + + + Public Property TransitOperation() As TransitOperationType + Get + Return Me._transitOperation + End Get + Set + Me._transitOperation = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(EinzelVersandanmeldungTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize EinzelVersandanmeldungTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes EinzelVersandanmeldungTyp object + ''' + ''' string to deserialize + ''' Output EinzelVersandanmeldungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelVersandanmeldungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EinzelVersandanmeldungTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelVersandanmeldungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As EinzelVersandanmeldungTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), EinzelVersandanmeldungTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As EinzelVersandanmeldungTyp + Return CType(SerializerXml.Deserialize(s), EinzelVersandanmeldungTyp) + End Function +#End Region + + ''' + ''' Serializes current EinzelVersandanmeldungTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an EinzelVersandanmeldungTyp object + ''' + ''' File to load and deserialize + ''' Output EinzelVersandanmeldungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelVersandanmeldungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EinzelVersandanmeldungTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelVersandanmeldungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As EinzelVersandanmeldungTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ObjektIdentifizierungVATyp + +#Region "Private fields" + Private _objektName As String + + Private _objektAliasname As String + + Private _bezugsnummerVorblendung As String + + Private _userVorblendung As String + + Private _kopieVon As String + + Private _objektAktion As List(Of String) + + Private _compliancePruefung As String + + Private _bearbeiter As String + + Private _anfBemerkungStatusanzeige As String + + Private _nameAbsendendesSystem As String + + Private _shipmentReferenz As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._objektAktion = New List(Of String)() + End Sub + + + Public Property ObjektName() As String + Get + Return Me._objektName + End Get + Set + Me._objektName = Value + End Set + End Property + + + Public Property ObjektAliasname() As String + Get + Return Me._objektAliasname + End Get + Set + Me._objektAliasname = Value + End Set + End Property + + + Public Property BezugsnummerVorblendung() As String + Get + Return Me._bezugsnummerVorblendung + End Get + Set + Me._bezugsnummerVorblendung = Value + End Set + End Property + + + Public Property UserVorblendung() As String + Get + Return Me._userVorblendung + End Get + Set + Me._userVorblendung = Value + End Set + End Property + + + Public Property KopieVon() As String + Get + Return Me._kopieVon + End Get + Set + Me._kopieVon = Value + End Set + End Property + + + Public Property ObjektAktion() As List(Of String) + Get + Return Me._objektAktion + End Get + Set + Me._objektAktion = Value + End Set + End Property + + + Public Property CompliancePruefung() As String + Get + Return Me._compliancePruefung + End Get + Set + Me._compliancePruefung = Value + End Set + End Property + + + Public Property Bearbeiter() As String + Get + Return Me._bearbeiter + End Get + Set + Me._bearbeiter = Value + End Set + End Property + + + Public Property AnfBemerkungStatusanzeige() As String + Get + Return Me._anfBemerkungStatusanzeige + End Get + Set + Me._anfBemerkungStatusanzeige = Value + End Set + End Property + + + Public Property NameAbsendendesSystem() As String + Get + Return Me._nameAbsendendesSystem + End Get + Set + Me._nameAbsendendesSystem = Value + End Set + End Property + + + Public Property ShipmentReferenz() As String + Get + Return Me._shipmentReferenz + End Get + Set + Me._shipmentReferenz = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ObjektIdentifizierungVATyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ObjektIdentifizierungVATyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ObjektIdentifizierungVATyp object + ''' + ''' string to deserialize + ''' Output ObjektIdentifizierungVATyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ObjektIdentifizierungVATyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ObjektIdentifizierungVATyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ObjektIdentifizierungVATyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ObjektIdentifizierungVATyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ObjektIdentifizierungVATyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ObjektIdentifizierungVATyp + Return CType(SerializerXml.Deserialize(s), ObjektIdentifizierungVATyp) + End Function +#End Region + + ''' + ''' Serializes current ObjektIdentifizierungVATyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ObjektIdentifizierungVATyp object + ''' + ''' File to load and deserialize + ''' Output ObjektIdentifizierungVATyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ObjektIdentifizierungVATyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ObjektIdentifizierungVATyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ObjektIdentifizierungVATyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ObjektIdentifizierungVATyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AdditionalInformationPositionVAType + +#Region "Private fields" + Private _code As String + + Private _text As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Code() As String + Get + Return Me._code + End Get + Set + Me._code = Value + End Set + End Property + + + Public Property Text() As String + Get + Return Me._text + End Get + Set + Me._text = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdditionalInformationPositionVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AdditionalInformationPositionVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AdditionalInformationPositionVAType object + ''' + ''' string to deserialize + ''' Output AdditionalInformationPositionVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalInformationPositionVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalInformationPositionVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalInformationPositionVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AdditionalInformationPositionVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalInformationPositionVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdditionalInformationPositionVAType + Return CType(SerializerXml.Deserialize(s), AdditionalInformationPositionVAType) + End Function +#End Region + + ''' + ''' Serializes current AdditionalInformationPositionVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AdditionalInformationPositionVAType object + ''' + ''' File to load and deserialize + ''' Output AdditionalInformationPositionVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalInformationPositionVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalInformationPositionVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalInformationPositionVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdditionalInformationPositionVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AdditionalReferencePositionVAType + +#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(AdditionalReferencePositionVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AdditionalReferencePositionVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AdditionalReferencePositionVAType object + ''' + ''' string to deserialize + ''' Output AdditionalReferencePositionVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalReferencePositionVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalReferencePositionVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalReferencePositionVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AdditionalReferencePositionVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalReferencePositionVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdditionalReferencePositionVAType + Return CType(SerializerXml.Deserialize(s), AdditionalReferencePositionVAType) + End Function +#End Region + + ''' + ''' Serializes current AdditionalReferencePositionVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AdditionalReferencePositionVAType object + ''' + ''' File to load and deserialize + ''' Output AdditionalReferencePositionVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalReferencePositionVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalReferencePositionVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalReferencePositionVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdditionalReferencePositionVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class SupportingDocumentPositionVAType + +#Region "Private fields" + Private _type As String + + Private _referenceNumber As String + + Private _complementOfInformation As String + + Private _documentLineItemNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Type() As String + Get + Return Me._type + End Get + Set + Me._type = Value + End Set + End Property + + + Public Property ReferenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + + Public Property ComplementOfInformation() As String + Get + Return Me._complementOfInformation + End Get + Set + Me._complementOfInformation = Value + End Set + End Property + + + Public Property DocumentLineItemNumber() As String + Get + Return Me._documentLineItemNumber + End Get + Set + Me._documentLineItemNumber = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(SupportingDocumentPositionVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize SupportingDocumentPositionVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes SupportingDocumentPositionVAType object + ''' + ''' string to deserialize + ''' Output SupportingDocumentPositionVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SupportingDocumentPositionVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SupportingDocumentPositionVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SupportingDocumentPositionVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As SupportingDocumentPositionVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), SupportingDocumentPositionVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As SupportingDocumentPositionVAType + Return CType(SerializerXml.Deserialize(s), SupportingDocumentPositionVAType) + End Function +#End Region + + ''' + ''' Serializes current SupportingDocumentPositionVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an SupportingDocumentPositionVAType object + ''' + ''' File to load and deserialize + ''' Output SupportingDocumentPositionVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SupportingDocumentPositionVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SupportingDocumentPositionVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SupportingDocumentPositionVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As SupportingDocumentPositionVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ProcedureTransferenceItemVAType + +#Region "Private fields" + Private _numberOfPackages As String + + Private _mRN As String + + Private _registrationNumber As String + + Private _goodsItemNumber As String + + Private _articleCode As String + + Private _owner As String + + Private _chargeNumber As String + + Private _countryOfOrigin As String + + Private _identificationNumberOfCustodian As String + + Private _typeOfIdentificationByKey As String + + Private _referenceNumberOfIdentificationByKey As String + + Private _commodityCode As String + + Private _accessViaATLAS As String + + Private _usualTreatment As String + + Private _complement As String + + Private _qualifierOfGoodsReduction As String + + Private _measurementUnitOfGoodsReduction As String + + Private _quantityOfGoodsReduction As String + + Private _qualifierOfGoodsReductionAfterTreatment As String + + Private _measurementUnitOfGoodsReductionAfterTreatment As String + + Private _quantityOfGoodsReductionAfterTreatment As String + + Private _goodsRelatedData As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property NumberOfPackages() As String + Get + Return Me._numberOfPackages + End Get + Set + Me._numberOfPackages = Value + End Set + End Property + + + Public Property 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 ArticleCode() As String + Get + Return Me._articleCode + End Get + Set + Me._articleCode = Value + End Set + End Property + + + Public Property Owner() As String + Get + Return Me._owner + End Get + Set + Me._owner = Value + End Set + End Property + + + Public Property ChargeNumber() As String + Get + Return Me._chargeNumber + End Get + Set + Me._chargeNumber = Value + End Set + End Property + + + Public Property CountryOfOrigin() As String + Get + Return Me._countryOfOrigin + End Get + Set + Me._countryOfOrigin = Value + End Set + End Property + + + Public Property IdentificationNumberOfCustodian() As String + Get + Return Me._identificationNumberOfCustodian + End Get + Set + Me._identificationNumberOfCustodian = Value + End Set + End Property + + + Public Property TypeOfIdentificationByKey() As String + Get + Return Me._typeOfIdentificationByKey + End Get + Set + Me._typeOfIdentificationByKey = Value + End Set + End Property + + + Public Property ReferenceNumberOfIdentificationByKey() As String + Get + Return Me._referenceNumberOfIdentificationByKey + End Get + Set + Me._referenceNumberOfIdentificationByKey = Value + End Set + End Property + + + Public Property CommodityCode() As String + Get + Return Me._commodityCode + End Get + Set + Me._commodityCode = Value + End Set + End Property + + + Public Property AccessViaATLAS() As String + Get + Return Me._accessViaATLAS + End Get + Set + Me._accessViaATLAS = 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 QualifierOfGoodsReduction() As String + Get + Return Me._qualifierOfGoodsReduction + End Get + Set + Me._qualifierOfGoodsReduction = Value + End Set + End Property + + + Public Property MeasurementUnitOfGoodsReduction() As String + Get + Return Me._measurementUnitOfGoodsReduction + End Get + Set + Me._measurementUnitOfGoodsReduction = Value + End Set + End Property + + + Public Property QuantityOfGoodsReduction() As String + Get + Return Me._quantityOfGoodsReduction + End Get + Set + Me._quantityOfGoodsReduction = Value + End Set + End Property + + + Public Property QualifierOfGoodsReductionAfterTreatment() As String + Get + Return Me._qualifierOfGoodsReductionAfterTreatment + End Get + Set + Me._qualifierOfGoodsReductionAfterTreatment = Value + End Set + End Property + + + Public Property MeasurementUnitOfGoodsReductionAfterTreatment() As String + Get + Return Me._measurementUnitOfGoodsReductionAfterTreatment + End Get + Set + Me._measurementUnitOfGoodsReductionAfterTreatment = Value + End Set + End Property + + + Public Property QuantityOfGoodsReductionAfterTreatment() As String + Get + Return Me._quantityOfGoodsReductionAfterTreatment + End Get + Set + Me._quantityOfGoodsReductionAfterTreatment = Value + End Set + End Property + + + Public Property GoodsRelatedData() As String + Get + Return Me._goodsRelatedData + End Get + Set + Me._goodsRelatedData = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ProcedureTransferenceItemVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ProcedureTransferenceItemVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ProcedureTransferenceItemVAType object + ''' + ''' string to deserialize + ''' Output ProcedureTransferenceItemVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ProcedureTransferenceItemVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ProcedureTransferenceItemVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ProcedureTransferenceItemVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ProcedureTransferenceItemVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ProcedureTransferenceItemVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ProcedureTransferenceItemVAType + Return CType(SerializerXml.Deserialize(s), ProcedureTransferenceItemVAType) + End Function +#End Region + + ''' + ''' Serializes current ProcedureTransferenceItemVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ProcedureTransferenceItemVAType object + ''' + ''' File to load and deserialize + ''' Output ProcedureTransferenceItemVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ProcedureTransferenceItemVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ProcedureTransferenceItemVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ProcedureTransferenceItemVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ProcedureTransferenceItemVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ProcedureTransferenceVAType + +#Region "Private fields" + Private _identificationType As String + + Private _lRN As String + + Private _typeOfAuthorisation As String + + Private _referenceNumberOfAuthorisation As String + + Private _simplyGrantedAuthorisation As String + + Private _customsOfficeOfSupervision As String + + Private _procedureTransferenceItem As List(Of ProcedureTransferenceItemVAType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._procedureTransferenceItem = New List(Of ProcedureTransferenceItemVAType)() + End Sub + + + Public Property IdentificationType() As String + Get + Return Me._identificationType + End Get + Set + Me._identificationType = 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 TypeOfAuthorisation() As String + Get + Return Me._typeOfAuthorisation + End Get + Set + Me._typeOfAuthorisation = Value + End Set + End Property + + + Public Property ReferenceNumberOfAuthorisation() As String + Get + Return Me._referenceNumberOfAuthorisation + End Get + Set + Me._referenceNumberOfAuthorisation = 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 CustomsOfficeOfSupervision() As String + Get + Return Me._customsOfficeOfSupervision + End Get + Set + Me._customsOfficeOfSupervision = Value + End Set + End Property + + + Public Property ProcedureTransferenceItem() As List(Of ProcedureTransferenceItemVAType) + Get + Return Me._procedureTransferenceItem + End Get + Set + Me._procedureTransferenceItem = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ProcedureTransferenceVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ProcedureTransferenceVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ProcedureTransferenceVAType object + ''' + ''' string to deserialize + ''' Output ProcedureTransferenceVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ProcedureTransferenceVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ProcedureTransferenceVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ProcedureTransferenceVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ProcedureTransferenceVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ProcedureTransferenceVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ProcedureTransferenceVAType + Return CType(SerializerXml.Deserialize(s), ProcedureTransferenceVAType) + End Function +#End Region + + ''' + ''' Serializes current ProcedureTransferenceVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ProcedureTransferenceVAType object + ''' + ''' File to load and deserialize + ''' Output ProcedureTransferenceVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ProcedureTransferenceVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ProcedureTransferenceVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ProcedureTransferenceVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ProcedureTransferenceVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class PreviousDocumentsPositionVAType + +#Region "Private fields" + Private _referenceNumber As String + + Private _complementOfInformation As String + + Private _goodsItemNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property ReferenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + + Public Property ComplementOfInformation() As String + Get + Return Me._complementOfInformation + End Get + Set + Me._complementOfInformation = 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(PreviousDocumentsPositionVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize PreviousDocumentsPositionVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes PreviousDocumentsPositionVAType object + ''' + ''' string to deserialize + ''' Output PreviousDocumentsPositionVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PreviousDocumentsPositionVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PreviousDocumentsPositionVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PreviousDocumentsPositionVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As PreviousDocumentsPositionVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PreviousDocumentsPositionVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As PreviousDocumentsPositionVAType + Return CType(SerializerXml.Deserialize(s), PreviousDocumentsPositionVAType) + End Function +#End Region + + ''' + ''' Serializes current PreviousDocumentsPositionVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an PreviousDocumentsPositionVAType object + ''' + ''' File to load and deserialize + ''' Output PreviousDocumentsPositionVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PreviousDocumentsPositionVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PreviousDocumentsPositionVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PreviousDocumentsPositionVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PreviousDocumentsPositionVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class PreviousDocumentPositionVAType + +#Region "Private fields" + Private _type As String + + Private _previousDocumentDetails As PreviousDocumentsPositionVAType + + Private _procedureTransference As ProcedureTransferenceVAType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._procedureTransference = New ProcedureTransferenceVAType() + Me._previousDocumentDetails = New PreviousDocumentsPositionVAType() + End Sub + + + Public Property Type() As String + Get + Return Me._type + End Get + Set + Me._type = Value + End Set + End Property + + + Public Property PreviousDocumentDetails() As PreviousDocumentsPositionVAType + Get + Return Me._previousDocumentDetails + End Get + Set + Me._previousDocumentDetails = Value + End Set + End Property + + + Public Property ProcedureTransference() As ProcedureTransferenceVAType + 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(PreviousDocumentPositionVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize PreviousDocumentPositionVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes PreviousDocumentPositionVAType object + ''' + ''' string to deserialize + ''' Output PreviousDocumentPositionVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PreviousDocumentPositionVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PreviousDocumentPositionVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PreviousDocumentPositionVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As PreviousDocumentPositionVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PreviousDocumentPositionVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As PreviousDocumentPositionVAType + Return CType(SerializerXml.Deserialize(s), PreviousDocumentPositionVAType) + End Function +#End Region + + ''' + ''' Serializes current PreviousDocumentPositionVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an PreviousDocumentPositionVAType object + ''' + ''' File to load and deserialize + ''' Output PreviousDocumentPositionVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PreviousDocumentPositionVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PreviousDocumentPositionVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PreviousDocumentPositionVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PreviousDocumentPositionVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class PackstueckVATyp + +#Region "Private fields" + Private _numberOfPackages As String + + Private _typeOfPackages As String + + Private _shippingMarks As String + + Private _goodsItemNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property NumberOfPackages() As String + Get + Return Me._numberOfPackages + End Get + Set + Me._numberOfPackages = Value + End Set + End Property + + + Public Property TypeOfPackages() As String + Get + Return Me._typeOfPackages + End Get + Set + Me._typeOfPackages = Value + End Set + End Property + + + Public Property ShippingMarks() As String + Get + Return Me._shippingMarks + End Get + Set + Me._shippingMarks = Value + End Set + End Property + + + Public Property 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(PackstueckVATyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize PackstueckVATyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes PackstueckVATyp object + ''' + ''' string to deserialize + ''' Output PackstueckVATyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PackstueckVATyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PackstueckVATyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PackstueckVATyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As PackstueckVATyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PackstueckVATyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As PackstueckVATyp + Return CType(SerializerXml.Deserialize(s), PackstueckVATyp) + End Function +#End Region + + ''' + ''' Serializes current PackstueckVATyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an PackstueckVATyp object + ''' + ''' File to load and deserialize + ''' Output PackstueckVATyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PackstueckVATyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PackstueckVATyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PackstueckVATyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PackstueckVATyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ConsignmentItemVAType + +#Region "Private fields" + Private _goodsItemNumber As String + + Private _declarationGoodsItemNumber As String + + Private _commodityCode As String + + Private _referenceNumberUCR As String + + Private _methodOfPayment As String + + Private _uNNumber As List(Of String) + + Private _declarationType As String + + Private _articleCode As String + + Private _descriptionOfGoods As String + + Private _cusCode As String + + Private _countryOfDispatch As String + + Private _countryOfDestination As String + + Private _grossMass As String + + Private _netMass As String + + Private _consignee As AddressVA1Type + + Private _additionalSupplyChainActor As List(Of AdditionalSupplyChainActorVAType) + + Private _goodsValue As String + + Private _currencyOfGoodsValue As String + + Private _exchangeRate As String + + Private _exchangeDate As Date + + Private _currencyExchangeRateType As String + + Private _fractionOfGoodsValue As String + + Private _guaranteeAmount As String + + Private _packaging As List(Of PackstueckVATyp) + + Private _previousDocument As List(Of PreviousDocumentPositionVAType) + + Private _supportingDocument As List(Of SupportingDocumentPositionVAType) + + Private _additionalReference As List(Of AdditionalReferencePositionVAType) + + Private _additionalInformation As List(Of AdditionalInformationPositionVAType) + + Private _applicationInternalData As ApplicationInternalDataType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._applicationInternalData = New ApplicationInternalDataType() + Me._additionalInformation = New List(Of AdditionalInformationPositionVAType)() + Me._additionalReference = New List(Of AdditionalReferencePositionVAType)() + Me._supportingDocument = New List(Of SupportingDocumentPositionVAType)() + Me._previousDocument = New List(Of PreviousDocumentPositionVAType)() + Me._packaging = New List(Of PackstueckVATyp)() + Me._additionalSupplyChainActor = New List(Of AdditionalSupplyChainActorVAType)() + Me._consignee = New AddressVA1Type() + Me._uNNumber = New List(Of String)() + End Sub + + + 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 CommodityCode() As String + Get + Return Me._commodityCode + End Get + Set + Me._commodityCode = 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 MethodOfPayment() As String + Get + Return Me._methodOfPayment + End Get + Set + Me._methodOfPayment = Value + End Set + End Property + + + Public Property UNNumber() As List(Of String) + Get + Return Me._uNNumber + End Get + Set + Me._uNNumber = Value + End Set + End Property + + + Public Property DeclarationType() As String + Get + Return Me._declarationType + End Get + Set + Me._declarationType = Value + End Set + End Property + + + Public Property ArticleCode() As String + Get + Return Me._articleCode + End Get + Set + Me._articleCode = Value + End Set + End Property + + + Public Property 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 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 String + Get + Return Me._grossMass + End Get + Set + Me._grossMass = Value + End Set + End Property + + + Public Property NetMass() As String + Get + Return Me._netMass + End Get + Set + Me._netMass = Value + End Set + End Property + + + Public Property Consignee() As AddressVA1Type + Get + Return Me._consignee + End Get + Set + Me._consignee = Value + End Set + End Property + + + Public Property AdditionalSupplyChainActor() As List(Of AdditionalSupplyChainActorVAType) + Get + Return Me._additionalSupplyChainActor + End Get + Set + Me._additionalSupplyChainActor = Value + End Set + End Property + + + Public Property GoodsValue() As String + Get + Return Me._goodsValue + End Get + Set + Me._goodsValue = Value + End Set + End Property + + + Public Property CurrencyOfGoodsValue() As String + Get + Return Me._currencyOfGoodsValue + End Get + Set + Me._currencyOfGoodsValue = Value + End Set + End Property + + + Public Property ExchangeRate() As String + Get + Return Me._exchangeRate + End Get + Set + Me._exchangeRate = Value + End Set + End Property + + + Public Property ExchangeDate() As Date + Get + Return Me._exchangeDate + End Get + Set + Me._exchangeDate = Value + End Set + End Property + + + Public Property CurrencyExchangeRateType() As String + Get + Return Me._currencyExchangeRateType + End Get + Set + Me._currencyExchangeRateType = Value + End Set + End Property + + + Public Property FractionOfGoodsValue() As String + Get + Return Me._fractionOfGoodsValue + End Get + Set + Me._fractionOfGoodsValue = Value + End Set + End Property + + + Public Property GuaranteeAmount() As String + Get + Return Me._guaranteeAmount + End Get + Set + Me._guaranteeAmount = Value + End Set + End Property + + + Public Property Packaging() As List(Of PackstueckVATyp) + Get + Return Me._packaging + End Get + Set + Me._packaging = Value + End Set + End Property + + + Public Property PreviousDocument() As List(Of PreviousDocumentPositionVAType) + Get + Return Me._previousDocument + End Get + Set + Me._previousDocument = Value + End Set + End Property + + + Public Property SupportingDocument() As List(Of SupportingDocumentPositionVAType) + Get + Return Me._supportingDocument + End Get + Set + Me._supportingDocument = Value + End Set + End Property + + + Public Property AdditionalReference() As List(Of AdditionalReferencePositionVAType) + Get + Return Me._additionalReference + End Get + Set + Me._additionalReference = Value + End Set + End Property + + + Public Property AdditionalInformation() As List(Of AdditionalInformationPositionVAType) + Get + Return Me._additionalInformation + End Get + Set + Me._additionalInformation = Value + End Set + End Property + + + Public Property ApplicationInternalData() As ApplicationInternalDataType + Get + Return Me._applicationInternalData + End Get + Set + Me._applicationInternalData = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ConsignmentItemVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ConsignmentItemVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ConsignmentItemVAType object + ''' + ''' string to deserialize + ''' Output ConsignmentItemVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ConsignmentItemVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ConsignmentItemVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ConsignmentItemVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ConsignmentItemVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ConsignmentItemVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ConsignmentItemVAType + Return CType(SerializerXml.Deserialize(s), ConsignmentItemVAType) + End Function +#End Region + + ''' + ''' Serializes current ConsignmentItemVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ConsignmentItemVAType object + ''' + ''' File to load and deserialize + ''' Output ConsignmentItemVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ConsignmentItemVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ConsignmentItemVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ConsignmentItemVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ConsignmentItemVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AddressVA1Type + +#Region "Private fields" + Private _addressCode As String + + Private _identificationNumber As String + + Private _subsidiaryNumber As String + + Private _name As String + + Private _streetAndNumber As String + + Private _city As String + + Private _postcode As String + + Private _country As String + + Private _contactPerson As ContactPersonVAType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contactPerson = New ContactPersonVAType() + End Sub + + + Public Property AddressCode() As String + Get + Return Me._addressCode + End Get + Set + Me._addressCode = Value + End Set + End Property + + + Public Property IdentificationNumber() As String + Get + Return Me._identificationNumber + End Get + Set + Me._identificationNumber = Value + End Set + End Property + + + Public Property SubsidiaryNumber() As String + Get + Return Me._subsidiaryNumber + End Get + Set + Me._subsidiaryNumber = Value + End Set + End Property + + + Public Property Name() As String + Get + Return Me._name + End Get + Set + Me._name = Value + End Set + End Property + + + Public Property StreetAndNumber() As String + Get + Return Me._streetAndNumber + End Get + Set + Me._streetAndNumber = Value + End Set + End Property + + + Public Property City() As String + Get + Return Me._city + End Get + Set + Me._city = Value + End Set + End Property + + + Public Property Postcode() As String + Get + Return Me._postcode + End Get + Set + Me._postcode = Value + End Set + End Property + + + Public Property Country() As String + Get + Return Me._country + End Get + Set + Me._country = Value + End Set + End Property + + + Public Property ContactPerson() As ContactPersonVAType + 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(AddressVA1Type)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AddressVA1Type object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AddressVA1Type object + ''' + ''' string to deserialize + ''' Output AddressVA1Type object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AddressVA1Type, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AddressVA1Type) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AddressVA1Type) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AddressVA1Type + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AddressVA1Type) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AddressVA1Type + Return CType(SerializerXml.Deserialize(s), AddressVA1Type) + End Function +#End Region + + ''' + ''' Serializes current AddressVA1Type object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AddressVA1Type object + ''' + ''' File to load and deserialize + ''' Output AddressVA1Type object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AddressVA1Type, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AddressVA1Type) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AddressVA1Type) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AddressVA1Type + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ContactPersonVAType + +#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(ContactPersonVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ContactPersonVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ContactPersonVAType object + ''' + ''' string to deserialize + ''' Output ContactPersonVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ContactPersonVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ContactPersonVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ContactPersonVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ContactPersonVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ContactPersonVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ContactPersonVAType + Return CType(SerializerXml.Deserialize(s), ContactPersonVAType) + End Function +#End Region + + ''' + ''' Serializes current ContactPersonVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ContactPersonVAType object + ''' + ''' File to load and deserialize + ''' Output ContactPersonVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ContactPersonVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ContactPersonVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ContactPersonVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ContactPersonVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AdditionalSupplyChainActorVAType + +#Region "Private fields" + Private _role As String + + Private _identificationNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Role() As String + Get + Return Me._role + End Get + Set + Me._role = Value + End Set + End Property + + + Public Property IdentificationNumber() As String + Get + Return Me._identificationNumber + End Get + Set + Me._identificationNumber = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdditionalSupplyChainActorVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AdditionalSupplyChainActorVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AdditionalSupplyChainActorVAType object + ''' + ''' string to deserialize + ''' Output AdditionalSupplyChainActorVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalSupplyChainActorVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalSupplyChainActorVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalSupplyChainActorVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AdditionalSupplyChainActorVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalSupplyChainActorVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdditionalSupplyChainActorVAType + Return CType(SerializerXml.Deserialize(s), AdditionalSupplyChainActorVAType) + End Function +#End Region + + ''' + ''' Serializes current AdditionalSupplyChainActorVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AdditionalSupplyChainActorVAType object + ''' + ''' File to load and deserialize + ''' Output AdditionalSupplyChainActorVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalSupplyChainActorVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalSupplyChainActorVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalSupplyChainActorVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdditionalSupplyChainActorVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ApplicationInternalDataType + +#Region "Private fields" + Private _additionalDetails As List(Of ApplicationInternalDataAdditionalDetailsDataType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._additionalDetails = New List(Of ApplicationInternalDataAdditionalDetailsDataType)() + End Sub + + + Public Property AdditionalDetails() As List(Of ApplicationInternalDataAdditionalDetailsDataType) + Get + Return Me._additionalDetails + End Get + Set + Me._additionalDetails = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ApplicationInternalDataType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ApplicationInternalDataType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ApplicationInternalDataType object + ''' + ''' string to deserialize + ''' Output ApplicationInternalDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ApplicationInternalDataType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ApplicationInternalDataType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ApplicationInternalDataType + Return CType(SerializerXml.Deserialize(s), ApplicationInternalDataType) + End Function +#End Region + + ''' + ''' Serializes current ApplicationInternalDataType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ApplicationInternalDataType object + ''' + ''' File to load and deserialize + ''' Output ApplicationInternalDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ApplicationInternalDataType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ApplicationInternalDataAdditionalDetailsDataType + +#Region "Private fields" + Private _key As String + + Private _value As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Key() As String + Get + Return Me._key + End Get + Set + Me._key = Value + End Set + End Property + + + Public Property Value() As String + Get + Return Me._value + End Get + Set + Me._value = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ApplicationInternalDataAdditionalDetailsDataType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' string to deserialize + ''' Output ApplicationInternalDataAdditionalDetailsDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsDataType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ApplicationInternalDataAdditionalDetailsDataType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ApplicationInternalDataAdditionalDetailsDataType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ApplicationInternalDataAdditionalDetailsDataType + Return CType(SerializerXml.Deserialize(s), ApplicationInternalDataAdditionalDetailsDataType) + End Function +#End Region + + ''' + ''' Serializes current ApplicationInternalDataAdditionalDetailsDataType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' File to load and deserialize + ''' Output ApplicationInternalDataAdditionalDetailsDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsDataType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ApplicationInternalDataAdditionalDetailsDataType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AdditionalInformationHouseVAType + +#Region "Private fields" + Private _code As String + + Private _text As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Code() As String + Get + Return Me._code + End Get + Set + Me._code = Value + End Set + End Property + + + Public Property Text() As String + Get + Return Me._text + End Get + Set + Me._text = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdditionalInformationHouseVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AdditionalInformationHouseVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AdditionalInformationHouseVAType object + ''' + ''' string to deserialize + ''' Output AdditionalInformationHouseVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalInformationHouseVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalInformationHouseVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalInformationHouseVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AdditionalInformationHouseVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalInformationHouseVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdditionalInformationHouseVAType + Return CType(SerializerXml.Deserialize(s), AdditionalInformationHouseVAType) + End Function +#End Region + + ''' + ''' Serializes current AdditionalInformationHouseVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AdditionalInformationHouseVAType object + ''' + ''' File to load and deserialize + ''' Output AdditionalInformationHouseVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalInformationHouseVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalInformationHouseVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalInformationHouseVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdditionalInformationHouseVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AdditionalReferenceHouseVAType + +#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(AdditionalReferenceHouseVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AdditionalReferenceHouseVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AdditionalReferenceHouseVAType object + ''' + ''' string to deserialize + ''' Output AdditionalReferenceHouseVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalReferenceHouseVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalReferenceHouseVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalReferenceHouseVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AdditionalReferenceHouseVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalReferenceHouseVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdditionalReferenceHouseVAType + Return CType(SerializerXml.Deserialize(s), AdditionalReferenceHouseVAType) + End Function +#End Region + + ''' + ''' Serializes current AdditionalReferenceHouseVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AdditionalReferenceHouseVAType object + ''' + ''' File to load and deserialize + ''' Output AdditionalReferenceHouseVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalReferenceHouseVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalReferenceHouseVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalReferenceHouseVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdditionalReferenceHouseVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransportDocumentVAHouseType + +#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(TransportDocumentVAHouseType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransportDocumentVAHouseType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransportDocumentVAHouseType object + ''' + ''' string to deserialize + ''' Output TransportDocumentVAHouseType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransportDocumentVAHouseType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransportDocumentVAHouseType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransportDocumentVAHouseType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransportDocumentVAHouseType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransportDocumentVAHouseType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransportDocumentVAHouseType + Return CType(SerializerXml.Deserialize(s), TransportDocumentVAHouseType) + End Function +#End Region + + ''' + ''' Serializes current TransportDocumentVAHouseType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransportDocumentVAHouseType object + ''' + ''' File to load and deserialize + ''' Output TransportDocumentVAHouseType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransportDocumentVAHouseType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransportDocumentVAHouseType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransportDocumentVAHouseType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransportDocumentVAHouseType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class SupportingDocumentHouseVAType + +#Region "Private fields" + 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 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(SupportingDocumentHouseVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize SupportingDocumentHouseVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes SupportingDocumentHouseVAType object + ''' + ''' string to deserialize + ''' Output SupportingDocumentHouseVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SupportingDocumentHouseVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SupportingDocumentHouseVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SupportingDocumentHouseVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As SupportingDocumentHouseVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), SupportingDocumentHouseVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As SupportingDocumentHouseVAType + Return CType(SerializerXml.Deserialize(s), SupportingDocumentHouseVAType) + End Function +#End Region + + ''' + ''' Serializes current SupportingDocumentHouseVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an SupportingDocumentHouseVAType object + ''' + ''' File to load and deserialize + ''' Output SupportingDocumentHouseVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SupportingDocumentHouseVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SupportingDocumentHouseVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SupportingDocumentHouseVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As SupportingDocumentHouseVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class HouseConsignmentVAType + +#Region "Private fields" + Private _houseConsignmentReference As String + + Private _countryOfDispatch As String + + Private _countryOfDestination As String + + Private _grossMass As String + + Private _referenceNumberUCR As String + + Private _consignor As AddressVA1Type + + Private _consignee As AddressVA1Type + + Private _additionalSupplyChainActor As List(Of AdditionalSupplyChainActorVAType) + + Private _previousDocument As List(Of PreviousDocumentVAType) + + Private _supportingDocument As List(Of SupportingDocumentHouseVAType) + + Private _transportDocument As List(Of TransportDocumentVAHouseType) + + Private _additionalReference As List(Of AdditionalReferenceHouseVAType) + + Private _additionalInformation As List(Of AdditionalInformationHouseVAType) + + Private _transportCharges As String + + Private _applicationInternalData As ApplicationInternalDataType + + Private _consignmentItem As List(Of ConsignmentItemVAType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._consignmentItem = New List(Of ConsignmentItemVAType)() + Me._applicationInternalData = New ApplicationInternalDataType() + Me._additionalInformation = New List(Of AdditionalInformationHouseVAType)() + Me._additionalReference = New List(Of AdditionalReferenceHouseVAType)() + Me._transportDocument = New List(Of TransportDocumentVAHouseType)() + Me._supportingDocument = New List(Of SupportingDocumentHouseVAType)() + Me._previousDocument = New List(Of PreviousDocumentVAType)() + Me._additionalSupplyChainActor = New List(Of AdditionalSupplyChainActorVAType)() + Me._consignee = New AddressVA1Type() + Me._consignor = New AddressVA1Type() + End Sub + + + Public Property HouseConsignmentReference() As String + Get + Return Me._houseConsignmentReference + End Get + Set + Me._houseConsignmentReference = 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 String + 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 AddressVA1Type + Get + Return Me._consignor + End Get + Set + Me._consignor = Value + End Set + End Property + + + Public Property Consignee() As AddressVA1Type + Get + Return Me._consignee + End Get + Set + Me._consignee = Value + End Set + End Property + + + Public Property AdditionalSupplyChainActor() As List(Of AdditionalSupplyChainActorVAType) + Get + Return Me._additionalSupplyChainActor + End Get + Set + Me._additionalSupplyChainActor = Value + End Set + End Property + + + Public Property PreviousDocument() As List(Of PreviousDocumentVAType) + Get + Return Me._previousDocument + End Get + Set + Me._previousDocument = Value + End Set + End Property + + + Public Property SupportingDocument() As List(Of SupportingDocumentHouseVAType) + Get + Return Me._supportingDocument + End Get + Set + Me._supportingDocument = Value + End Set + End Property + + + Public Property TransportDocument() As List(Of TransportDocumentVAHouseType) + Get + Return Me._transportDocument + End Get + Set + Me._transportDocument = Value + End Set + End Property + + + Public Property AdditionalReference() As List(Of AdditionalReferenceHouseVAType) + Get + Return Me._additionalReference + End Get + Set + Me._additionalReference = Value + End Set + End Property + + + Public Property AdditionalInformation() As List(Of AdditionalInformationHouseVAType) + Get + Return Me._additionalInformation + End Get + Set + Me._additionalInformation = Value + End Set + End Property + + + Public Property TransportCharges() As String + Get + Return Me._transportCharges + End Get + Set + Me._transportCharges = Value + End Set + End Property + + + Public Property ApplicationInternalData() As ApplicationInternalDataType + Get + Return Me._applicationInternalData + End Get + Set + Me._applicationInternalData = Value + End Set + End Property + + + Public Property ConsignmentItem() As List(Of ConsignmentItemVAType) + 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(HouseConsignmentVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize HouseConsignmentVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes HouseConsignmentVAType object + ''' + ''' string to deserialize + ''' Output HouseConsignmentVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As HouseConsignmentVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, HouseConsignmentVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As HouseConsignmentVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As HouseConsignmentVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), HouseConsignmentVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As HouseConsignmentVAType + Return CType(SerializerXml.Deserialize(s), HouseConsignmentVAType) + End Function +#End Region + + ''' + ''' Serializes current HouseConsignmentVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an HouseConsignmentVAType object + ''' + ''' File to load and deserialize + ''' Output HouseConsignmentVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HouseConsignmentVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, HouseConsignmentVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HouseConsignmentVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As HouseConsignmentVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class PreviousDocumentVAType + +#Region "Private fields" + Private _type As String + + Private _referenceNumber As String + + Private _complementOfInformation As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Type() As String + Get + Return Me._type + End Get + Set + Me._type = Value + End Set + End Property + + + Public Property 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(PreviousDocumentVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize PreviousDocumentVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes PreviousDocumentVAType object + ''' + ''' string to deserialize + ''' Output PreviousDocumentVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PreviousDocumentVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PreviousDocumentVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PreviousDocumentVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As PreviousDocumentVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PreviousDocumentVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As PreviousDocumentVAType + Return CType(SerializerXml.Deserialize(s), PreviousDocumentVAType) + End Function +#End Region + + ''' + ''' Serializes current PreviousDocumentVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an PreviousDocumentVAType object + ''' + ''' File to load and deserialize + ''' Output PreviousDocumentVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PreviousDocumentVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PreviousDocumentVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PreviousDocumentVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PreviousDocumentVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AdditionalInformationVAType + +#Region "Private fields" + Private _code As String + + Private _text As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Code() As String + Get + Return Me._code + End Get + Set + Me._code = Value + End Set + End Property + + + Public Property Text() As String + Get + Return Me._text + End Get + Set + Me._text = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdditionalInformationVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AdditionalInformationVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AdditionalInformationVAType object + ''' + ''' string to deserialize + ''' Output AdditionalInformationVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalInformationVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalInformationVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalInformationVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AdditionalInformationVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalInformationVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdditionalInformationVAType + Return CType(SerializerXml.Deserialize(s), AdditionalInformationVAType) + End Function +#End Region + + ''' + ''' Serializes current AdditionalInformationVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AdditionalInformationVAType object + ''' + ''' File to load and deserialize + ''' Output AdditionalInformationVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalInformationVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalInformationVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalInformationVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdditionalInformationVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AdditionalReferenceVAType + +#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(AdditionalReferenceVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AdditionalReferenceVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AdditionalReferenceVAType object + ''' + ''' string to deserialize + ''' Output AdditionalReferenceVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalReferenceVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalReferenceVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalReferenceVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AdditionalReferenceVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalReferenceVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdditionalReferenceVAType + Return CType(SerializerXml.Deserialize(s), AdditionalReferenceVAType) + End Function +#End Region + + ''' + ''' Serializes current AdditionalReferenceVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AdditionalReferenceVAType object + ''' + ''' File to load and deserialize + ''' Output AdditionalReferenceVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalReferenceVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalReferenceVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalReferenceVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdditionalReferenceVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransportDocumentVAType + +#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(TransportDocumentVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransportDocumentVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransportDocumentVAType object + ''' + ''' string to deserialize + ''' Output TransportDocumentVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransportDocumentVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransportDocumentVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransportDocumentVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransportDocumentVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransportDocumentVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransportDocumentVAType + Return CType(SerializerXml.Deserialize(s), TransportDocumentVAType) + End Function +#End Region + + ''' + ''' Serializes current TransportDocumentVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransportDocumentVAType object + ''' + ''' File to load and deserialize + ''' Output TransportDocumentVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransportDocumentVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransportDocumentVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransportDocumentVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransportDocumentVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class SupportingDocumentVAType + +#Region "Private fields" + 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 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(SupportingDocumentVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize SupportingDocumentVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes SupportingDocumentVAType object + ''' + ''' string to deserialize + ''' Output SupportingDocumentVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SupportingDocumentVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SupportingDocumentVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SupportingDocumentVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As SupportingDocumentVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), SupportingDocumentVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As SupportingDocumentVAType + Return CType(SerializerXml.Deserialize(s), SupportingDocumentVAType) + End Function +#End Region + + ''' + ''' Serializes current SupportingDocumentVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an SupportingDocumentVAType object + ''' + ''' File to load and deserialize + ''' Output SupportingDocumentVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SupportingDocumentVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SupportingDocumentVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SupportingDocumentVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As SupportingDocumentVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AddressVAType + +#Region "Private fields" + Private _addressCode As String + + Private _identificationNumber As String + + Private _subsidiaryNumber As String + + Private _contactPerson As ContactPersonVAType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contactPerson = New ContactPersonVAType() + End Sub + + + Public Property AddressCode() As String + Get + Return Me._addressCode + End Get + Set + Me._addressCode = Value + End Set + End Property + + + Public Property IdentificationNumber() As String + Get + Return Me._identificationNumber + End Get + Set + Me._identificationNumber = Value + End Set + End Property + + + Public Property SubsidiaryNumber() As String + Get + Return Me._subsidiaryNumber + End Get + Set + Me._subsidiaryNumber = Value + End Set + End Property + + + Public Property ContactPerson() As ContactPersonVAType + 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(AddressVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AddressVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AddressVAType object + ''' + ''' string to deserialize + ''' Output AddressVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AddressVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AddressVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AddressVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AddressVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AddressVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AddressVAType + Return CType(SerializerXml.Deserialize(s), AddressVAType) + End Function +#End Region + + ''' + ''' Serializes current AddressVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AddressVAType object + ''' + ''' File to load and deserialize + ''' Output AddressVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AddressVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AddressVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AddressVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AddressVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class PlaceOfLoadingOrUnloadingVAType + +#Region "Private fields" + Private _location As String + + Private _country As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Location() As String + Get + Return Me._location + End Get + Set + Me._location = Value + End Set + End Property + + + Public Property Country() As String + Get + Return Me._country + End Get + Set + Me._country = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PlaceOfLoadingOrUnloadingVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize PlaceOfLoadingOrUnloadingVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes PlaceOfLoadingOrUnloadingVAType object + ''' + ''' string to deserialize + ''' Output PlaceOfLoadingOrUnloadingVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PlaceOfLoadingOrUnloadingVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PlaceOfLoadingOrUnloadingVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PlaceOfLoadingOrUnloadingVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As PlaceOfLoadingOrUnloadingVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PlaceOfLoadingOrUnloadingVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As PlaceOfLoadingOrUnloadingVAType + Return CType(SerializerXml.Deserialize(s), PlaceOfLoadingOrUnloadingVAType) + End Function +#End Region + + ''' + ''' Serializes current PlaceOfLoadingOrUnloadingVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an PlaceOfLoadingOrUnloadingVAType object + ''' + ''' File to load and deserialize + ''' Output PlaceOfLoadingOrUnloadingVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PlaceOfLoadingOrUnloadingVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PlaceOfLoadingOrUnloadingVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PlaceOfLoadingOrUnloadingVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PlaceOfLoadingOrUnloadingVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class RepresentativeVAType + +#Region "Private fields" + Private _addressCode As String + + Private _identificationNumber As String + + Private _contactPerson As ContactPersonVAType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contactPerson = New ContactPersonVAType() + End Sub + + + Public Property AddressCode() As String + Get + Return Me._addressCode + End Get + Set + Me._addressCode = Value + End Set + End Property + + + Public Property IdentificationNumber() As String + Get + Return Me._identificationNumber + End Get + Set + Me._identificationNumber = Value + End Set + End Property + + + Public Property ContactPerson() As ContactPersonVAType + 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(RepresentativeVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize RepresentativeVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes RepresentativeVAType object + ''' + ''' string to deserialize + ''' Output RepresentativeVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As RepresentativeVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, RepresentativeVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As RepresentativeVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As RepresentativeVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), RepresentativeVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As RepresentativeVAType + Return CType(SerializerXml.Deserialize(s), RepresentativeVAType) + End Function +#End Region + + ''' + ''' Serializes current RepresentativeVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an RepresentativeVAType object + ''' + ''' File to load and deserialize + ''' Output RepresentativeVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As RepresentativeVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, RepresentativeVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As RepresentativeVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As RepresentativeVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class HolderOfTheTransitProcedureVAType + +#Region "Private fields" + Private _addressCode As String + + Private _identificationNumber As String + + Private _tIRHolderIdentificationNumber As String + + Private _name As String + + Private _streetAndNumber As String + + Private _city As String + + Private _postcode As String + + Private _country As String + + Private _contactPerson As ContactPersonVAType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contactPerson = New ContactPersonVAType() + End Sub + + + Public Property AddressCode() As String + Get + Return Me._addressCode + End Get + Set + Me._addressCode = Value + End Set + End Property + + + Public Property IdentificationNumber() As String + Get + Return Me._identificationNumber + End Get + Set + Me._identificationNumber = Value + End Set + End Property + + + Public Property 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 StreetAndNumber() As String + Get + Return Me._streetAndNumber + End Get + Set + Me._streetAndNumber = Value + End Set + End Property + + + Public Property City() As String + Get + Return Me._city + End Get + Set + Me._city = Value + End Set + End Property + + + Public Property Postcode() As String + Get + Return Me._postcode + End Get + Set + Me._postcode = Value + End Set + End Property + + + Public Property Country() As String + Get + Return Me._country + End Get + Set + Me._country = Value + End Set + End Property + + + Public Property ContactPerson() As ContactPersonVAType + 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(HolderOfTheTransitProcedureVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize HolderOfTheTransitProcedureVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes HolderOfTheTransitProcedureVAType object + ''' + ''' string to deserialize + ''' Output HolderOfTheTransitProcedureVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As HolderOfTheTransitProcedureVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, HolderOfTheTransitProcedureVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As HolderOfTheTransitProcedureVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As HolderOfTheTransitProcedureVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), HolderOfTheTransitProcedureVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As HolderOfTheTransitProcedureVAType + Return CType(SerializerXml.Deserialize(s), HolderOfTheTransitProcedureVAType) + End Function +#End Region + + ''' + ''' Serializes current HolderOfTheTransitProcedureVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an HolderOfTheTransitProcedureVAType object + ''' + ''' File to load and deserialize + ''' Output HolderOfTheTransitProcedureVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HolderOfTheTransitProcedureVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, HolderOfTheTransitProcedureVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As HolderOfTheTransitProcedureVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As HolderOfTheTransitProcedureVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransitOperationAuthorisationVAType + +#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(TransitOperationAuthorisationVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransitOperationAuthorisationVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransitOperationAuthorisationVAType object + ''' + ''' string to deserialize + ''' Output TransitOperationAuthorisationVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransitOperationAuthorisationVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransitOperationAuthorisationVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransitOperationAuthorisationVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransitOperationAuthorisationVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransitOperationAuthorisationVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransitOperationAuthorisationVAType + Return CType(SerializerXml.Deserialize(s), TransitOperationAuthorisationVAType) + End Function +#End Region + + ''' + ''' Serializes current TransitOperationAuthorisationVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransitOperationAuthorisationVAType object + ''' + ''' File to load and deserialize + ''' Output TransitOperationAuthorisationVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransitOperationAuthorisationVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransitOperationAuthorisationVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransitOperationAuthorisationVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransitOperationAuthorisationVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ActiveBorderTransportMeansVAType + +#Region "Private fields" + Private _typeOfIdentification As String + + Private _identificationNumber As String + + Private _nationality As String + + Private _conveyanceReferenceNumber As String + + Private _customsOfficeAtBorderDeclared As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property TypeOfIdentification() As String + Get + Return Me._typeOfIdentification + End Get + Set + Me._typeOfIdentification = Value + End Set + End Property + + + Public Property IdentificationNumber() As String + Get + Return Me._identificationNumber + End Get + Set + Me._identificationNumber = Value + End Set + End Property + + + Public Property Nationality() As String + Get + Return Me._nationality + End Get + Set + Me._nationality = Value + End Set + End Property + + + Public Property ConveyanceReferenceNumber() As String + Get + Return Me._conveyanceReferenceNumber + End Get + Set + Me._conveyanceReferenceNumber = Value + End Set + End Property + + + Public Property CustomsOfficeAtBorderDeclared() As String + 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(ActiveBorderTransportMeansVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ActiveBorderTransportMeansVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ActiveBorderTransportMeansVAType object + ''' + ''' string to deserialize + ''' Output ActiveBorderTransportMeansVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ActiveBorderTransportMeansVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ActiveBorderTransportMeansVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ActiveBorderTransportMeansVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ActiveBorderTransportMeansVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ActiveBorderTransportMeansVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ActiveBorderTransportMeansVAType + Return CType(SerializerXml.Deserialize(s), ActiveBorderTransportMeansVAType) + End Function +#End Region + + ''' + ''' Serializes current ActiveBorderTransportMeansVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ActiveBorderTransportMeansVAType object + ''' + ''' File to load and deserialize + ''' Output ActiveBorderTransportMeansVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ActiveBorderTransportMeansVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ActiveBorderTransportMeansVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ActiveBorderTransportMeansVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ActiveBorderTransportMeansVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DepartureTransportMeansVAType + +#Region "Private fields" + Private _typeOfIdentification As String + + Private _identificationNumber As String + + Private _nationality As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property TypeOfIdentification() As String + Get + Return Me._typeOfIdentification + End Get + Set + Me._typeOfIdentification = Value + End Set + End Property + + + Public Property IdentificationNumber() As String + Get + Return Me._identificationNumber + End Get + Set + Me._identificationNumber = Value + End Set + End Property + + + Public Property Nationality() As String + Get + Return Me._nationality + End Get + Set + Me._nationality = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DepartureTransportMeansVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DepartureTransportMeansVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DepartureTransportMeansVAType object + ''' + ''' string to deserialize + ''' Output DepartureTransportMeansVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DepartureTransportMeansVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DepartureTransportMeansVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DepartureTransportMeansVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DepartureTransportMeansVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DepartureTransportMeansVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DepartureTransportMeansVAType + Return CType(SerializerXml.Deserialize(s), DepartureTransportMeansVAType) + End Function +#End Region + + ''' + ''' Serializes current DepartureTransportMeansVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DepartureTransportMeansVAType object + ''' + ''' File to load and deserialize + ''' Output DepartureTransportMeansVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DepartureTransportMeansVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DepartureTransportMeansVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DepartureTransportMeansVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DepartureTransportMeansVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class GuaranteeReferenceVAType + +#Region "Private fields" + Private _currency As String + + Private _amountToBeCovered As String + + Private _gRN As String + + Private _accessCode As String + + Private _accountName As String + + Private _goodsValue As String + + Private _currencyOfGoodsValue As String + + Private _fractionOfGoodsValue As String + + Private _currencyExchangeRateCustoms As String + + Private _currencyExchangeRateAccount As String + + Private _exchangeDateCustoms As Date + + Private _exchangeDateAccount As Date + + Private _currencyExchangeRateTypeCustoms As String + + Private _currencyExchangeRateTypeAccount As String + + Private _calculateGoodsValueFromGoodsItems As String + + Private _commentary As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Currency() As String + Get + Return Me._currency + End Get + Set + Me._currency = Value + End Set + End Property + + + Public Property AmountToBeCovered() As String + Get + Return Me._amountToBeCovered + End Get + Set + Me._amountToBeCovered = 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 AccessCode() As String + Get + Return Me._accessCode + End Get + Set + Me._accessCode = Value + End Set + End Property + + + Public Property AccountName() As String + Get + Return Me._accountName + End Get + Set + Me._accountName = Value + End Set + End Property + + + Public Property GoodsValue() As String + Get + Return Me._goodsValue + End Get + Set + Me._goodsValue = Value + End Set + End Property + + + Public Property CurrencyOfGoodsValue() As String + Get + Return Me._currencyOfGoodsValue + End Get + Set + Me._currencyOfGoodsValue = Value + End Set + End Property + + + Public Property FractionOfGoodsValue() As String + Get + Return Me._fractionOfGoodsValue + End Get + Set + Me._fractionOfGoodsValue = Value + End Set + End Property + + + Public Property CurrencyExchangeRateCustoms() As String + Get + Return Me._currencyExchangeRateCustoms + End Get + Set + Me._currencyExchangeRateCustoms = Value + End Set + End Property + + + Public Property CurrencyExchangeRateAccount() As String + Get + Return Me._currencyExchangeRateAccount + End Get + Set + Me._currencyExchangeRateAccount = Value + End Set + End Property + + + Public Property ExchangeDateCustoms() As Date + Get + Return Me._exchangeDateCustoms + End Get + Set + Me._exchangeDateCustoms = Value + End Set + End Property + + + Public Property ExchangeDateAccount() As Date + Get + Return Me._exchangeDateAccount + End Get + Set + Me._exchangeDateAccount = Value + End Set + End Property + + + Public Property CurrencyExchangeRateTypeCustoms() As String + Get + Return Me._currencyExchangeRateTypeCustoms + End Get + Set + Me._currencyExchangeRateTypeCustoms = Value + End Set + End Property + + + Public Property CurrencyExchangeRateTypeAccount() As String + Get + Return Me._currencyExchangeRateTypeAccount + End Get + Set + Me._currencyExchangeRateTypeAccount = Value + End Set + End Property + + + Public Property CalculateGoodsValueFromGoodsItems() As String + Get + Return Me._calculateGoodsValueFromGoodsItems + End Get + Set + Me._calculateGoodsValueFromGoodsItems = Value + End Set + End Property + + + Public Property Commentary() As String + Get + Return Me._commentary + End Get + Set + Me._commentary = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(GuaranteeReferenceVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize GuaranteeReferenceVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes GuaranteeReferenceVAType object + ''' + ''' string to deserialize + ''' Output GuaranteeReferenceVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GuaranteeReferenceVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, GuaranteeReferenceVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GuaranteeReferenceVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As GuaranteeReferenceVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), GuaranteeReferenceVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As GuaranteeReferenceVAType + Return CType(SerializerXml.Deserialize(s), GuaranteeReferenceVAType) + End Function +#End Region + + ''' + ''' Serializes current GuaranteeReferenceVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an GuaranteeReferenceVAType object + ''' + ''' File to load and deserialize + ''' Output GuaranteeReferenceVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GuaranteeReferenceVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, GuaranteeReferenceVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GuaranteeReferenceVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As GuaranteeReferenceVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class GuaranteeVAType + +#Region "Private fields" + Private _guaranteeType As String + + Private _otherGuaranteeReference As String + + Private _guaranteeReference As List(Of GuaranteeReferenceVAType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._guaranteeReference = New List(Of GuaranteeReferenceVAType)() + End Sub + + + 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 GuaranteeReferenceVAType) + 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(GuaranteeVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize GuaranteeVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes GuaranteeVAType object + ''' + ''' string to deserialize + ''' Output GuaranteeVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GuaranteeVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, GuaranteeVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GuaranteeVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As GuaranteeVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), GuaranteeVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As GuaranteeVAType + Return CType(SerializerXml.Deserialize(s), GuaranteeVAType) + End Function +#End Region + + ''' + ''' Serializes current GuaranteeVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an GuaranteeVAType object + ''' + ''' File to load and deserialize + ''' Output GuaranteeVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GuaranteeVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, GuaranteeVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GuaranteeVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As GuaranteeVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransportEquipmentVAType + +#Region "Private fields" + Private _numberOfSeals As String + + Private _seal As List(Of String) + + Private _containerIdentificationNumber As String + + Private _goodsReference As List(Of String) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsReference = New List(Of String)() + Me._seal = New List(Of String)() + End Sub + + + Public Property NumberOfSeals() As String + Get + Return Me._numberOfSeals + End Get + Set + Me._numberOfSeals = Value + End Set + End Property + + + Public Property Seal() As List(Of String) + Get + Return Me._seal + End Get + Set + Me._seal = Value + End Set + End Property + + + Public Property ContainerIdentificationNumber() As String + Get + Return Me._containerIdentificationNumber + End Get + Set + Me._containerIdentificationNumber = Value + End Set + End Property + + + Public Property GoodsReference() As List(Of String) + Get + Return Me._goodsReference + End Get + Set + Me._goodsReference = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransportEquipmentVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransportEquipmentVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransportEquipmentVAType object + ''' + ''' string to deserialize + ''' Output TransportEquipmentVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransportEquipmentVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransportEquipmentVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransportEquipmentVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransportEquipmentVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransportEquipmentVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransportEquipmentVAType + Return CType(SerializerXml.Deserialize(s), TransportEquipmentVAType) + End Function +#End Region + + ''' + ''' Serializes current TransportEquipmentVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransportEquipmentVAType object + ''' + ''' File to load and deserialize + ''' Output TransportEquipmentVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransportEquipmentVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransportEquipmentVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransportEquipmentVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransportEquipmentVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class CustomsOfficeOfTransitDeclaredVAType + +#Region "Private fields" + Private _referenceNumber As String + + Private _arrivalDateAndTimeEstimated As Date + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property ReferenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + + Public Property 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(CustomsOfficeOfTransitDeclaredVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize CustomsOfficeOfTransitDeclaredVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes CustomsOfficeOfTransitDeclaredVAType object + ''' + ''' string to deserialize + ''' Output CustomsOfficeOfTransitDeclaredVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CustomsOfficeOfTransitDeclaredVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, CustomsOfficeOfTransitDeclaredVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CustomsOfficeOfTransitDeclaredVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As CustomsOfficeOfTransitDeclaredVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CustomsOfficeOfTransitDeclaredVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As CustomsOfficeOfTransitDeclaredVAType + Return CType(SerializerXml.Deserialize(s), CustomsOfficeOfTransitDeclaredVAType) + End Function +#End Region + + ''' + ''' Serializes current CustomsOfficeOfTransitDeclaredVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an CustomsOfficeOfTransitDeclaredVAType object + ''' + ''' File to load and deserialize + ''' Output CustomsOfficeOfTransitDeclaredVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CustomsOfficeOfTransitDeclaredVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, CustomsOfficeOfTransitDeclaredVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CustomsOfficeOfTransitDeclaredVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As CustomsOfficeOfTransitDeclaredVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class LocationOfGoodsVAType + +#Region "Private fields" + Private _typeOfLocation As String + + Private _qualifierOfIdentification As String + + Private _additionalIdentifier As String + + Private _contactPerson As ContactPersonVAType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contactPerson = New ContactPersonVAType() + 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 ContactPersonVAType + 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(LocationOfGoodsVAType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize LocationOfGoodsVAType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes LocationOfGoodsVAType object + ''' + ''' string to deserialize + ''' Output LocationOfGoodsVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As LocationOfGoodsVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, LocationOfGoodsVAType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As LocationOfGoodsVAType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As LocationOfGoodsVAType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), LocationOfGoodsVAType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As LocationOfGoodsVAType + Return CType(SerializerXml.Deserialize(s), LocationOfGoodsVAType) + End Function +#End Region + + ''' + ''' Serializes current LocationOfGoodsVAType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an LocationOfGoodsVAType object + ''' + ''' File to load and deserialize + ''' Output LocationOfGoodsVAType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As LocationOfGoodsVAType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, LocationOfGoodsVAType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As LocationOfGoodsVAType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As LocationOfGoodsVAType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransitOperationType + +#Region "Private fields" + Private _countryOfDispatch As String + + Private _countryOfDestination As String + + Private _declarationType As String + + Private _tIRCarnetNumber As String + + Private _reducedDatasetIndicator As String + + Private _locationOfGoods As LocationOfGoodsVAType + + Private _customsOfficeOfTransitDeclared As List(Of CustomsOfficeOfTransitDeclaredVAType) + + Private _customsOfficeOfDestinationDeclared As String + + Private _customsOfficeOfDeparture As String + + Private _customsOfficeOfExitForTransitDeclared As List(Of String) + + Private _limitDate As Date + + Private _transitDeclarationType As String + + Private _grossMass As String + + Private _transportEquipment As List(Of TransportEquipmentVAType) + + Private _bindingItinerary As String + + Private _guarantee As List(Of GuaranteeVAType) + + Private _containerIndicator As String + + Private _inlandModeOfTransport As String + + Private _departureTransportMeans As List(Of DepartureTransportMeansVAType) + + Private _modeOfTransportAtTheBorder As String + + Private _activeBorderTransportMeans As List(Of ActiveBorderTransportMeansVAType) + + Private _authorisation As List(Of TransitOperationAuthorisationVAType) + + Private _consignor As AddressVA1Type + + Private _consignee As AddressVA1Type + + Private _holderOfTheTransitProcedure As HolderOfTheTransitProcedureVAType + + Private _representative As RepresentativeVAType + + Private _additionalSupplyChainActor As List(Of AdditionalSupplyChainActorVAType) + + Private _security As String + + Private _referenceNumberUCR As String + + Private _specificCircumstanceIndicator As String + + Private _placeOfLoading As PlaceOfLoadingOrUnloadingVAType + + Private _placeOfUnloading As PlaceOfLoadingOrUnloadingVAType + + Private _transportCharges As String + + Private _countryOfRoutingOfConsignment As List(Of String) + + Private _carrier As AddressVAType + + Private _previousDocument As List(Of PreviousDocumentVAType) + + Private _supportingDocument As List(Of SupportingDocumentVAType) + + Private _transportDocument As List(Of TransportDocumentVAType) + + Private _additionalReference As List(Of AdditionalReferenceVAType) + + Private _additionalInformation As List(Of AdditionalInformationVAType) + + Private _aUTOIMPIndicator As String + + Private _applicationInternalData As ApplicationInternalDataType + + Private _houseConsignment As List(Of HouseConsignmentVAType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._houseConsignment = New List(Of HouseConsignmentVAType)() + Me._applicationInternalData = New ApplicationInternalDataType() + Me._additionalInformation = New List(Of AdditionalInformationVAType)() + Me._additionalReference = New List(Of AdditionalReferenceVAType)() + Me._transportDocument = New List(Of TransportDocumentVAType)() + Me._supportingDocument = New List(Of SupportingDocumentVAType)() + Me._previousDocument = New List(Of PreviousDocumentVAType)() + Me._carrier = New AddressVAType() + Me._countryOfRoutingOfConsignment = New List(Of String)() + Me._placeOfUnloading = New PlaceOfLoadingOrUnloadingVAType() + Me._placeOfLoading = New PlaceOfLoadingOrUnloadingVAType() + Me._additionalSupplyChainActor = New List(Of AdditionalSupplyChainActorVAType)() + Me._representative = New RepresentativeVAType() + Me._holderOfTheTransitProcedure = New HolderOfTheTransitProcedureVAType() + Me._consignee = New AddressVA1Type() + Me._consignor = New AddressVA1Type() + Me._authorisation = New List(Of TransitOperationAuthorisationVAType)() + Me._activeBorderTransportMeans = New List(Of ActiveBorderTransportMeansVAType)() + Me._departureTransportMeans = New List(Of DepartureTransportMeansVAType)() + Me._guarantee = New List(Of GuaranteeVAType)() + Me._transportEquipment = New List(Of TransportEquipmentVAType)() + Me._customsOfficeOfExitForTransitDeclared = New List(Of String)() + Me._customsOfficeOfTransitDeclared = New List(Of CustomsOfficeOfTransitDeclaredVAType)() + Me._locationOfGoods = New LocationOfGoodsVAType() + 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 DeclarationType() As String + Get + Return Me._declarationType + End Get + Set + Me._declarationType = 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 ReducedDatasetIndicator() As String + Get + Return Me._reducedDatasetIndicator + End Get + Set + Me._reducedDatasetIndicator = Value + End Set + End Property + + + Public Property LocationOfGoods() As LocationOfGoodsVAType + Get + Return Me._locationOfGoods + End Get + Set + Me._locationOfGoods = Value + End Set + End Property + + + Public Property CustomsOfficeOfTransitDeclared() As List(Of CustomsOfficeOfTransitDeclaredVAType) + Get + Return Me._customsOfficeOfTransitDeclared + End Get + Set + Me._customsOfficeOfTransitDeclared = Value + End Set + End Property + + + Public Property CustomsOfficeOfDestinationDeclared() As String + Get + Return Me._customsOfficeOfDestinationDeclared + End Get + Set + Me._customsOfficeOfDestinationDeclared = Value + End Set + End Property + + + Public Property CustomsOfficeOfDeparture() As String + Get + Return Me._customsOfficeOfDeparture + End Get + Set + Me._customsOfficeOfDeparture = Value + End Set + End Property + + + Public Property CustomsOfficeOfExitForTransitDeclared() As List(Of String) + Get + Return Me._customsOfficeOfExitForTransitDeclared + End Get + Set + Me._customsOfficeOfExitForTransitDeclared = 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 TransitDeclarationType() As String + Get + Return Me._transitDeclarationType + End Get + Set + Me._transitDeclarationType = Value + End Set + End Property + + + Public Property GrossMass() As String + Get + Return Me._grossMass + End Get + Set + Me._grossMass = Value + End Set + End Property + + + Public Property TransportEquipment() As List(Of TransportEquipmentVAType) + Get + Return Me._transportEquipment + End Get + Set + Me._transportEquipment = Value + End Set + End Property + + + Public Property BindingItinerary() As String + Get + Return Me._bindingItinerary + End Get + Set + Me._bindingItinerary = Value + End Set + End Property + + + Public Property Guarantee() As List(Of GuaranteeVAType) + Get + Return Me._guarantee + End Get + Set + Me._guarantee = 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 DepartureTransportMeans() As List(Of DepartureTransportMeansVAType) + Get + Return Me._departureTransportMeans + End Get + Set + Me._departureTransportMeans = 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 ActiveBorderTransportMeans() As List(Of ActiveBorderTransportMeansVAType) + Get + Return Me._activeBorderTransportMeans + End Get + Set + Me._activeBorderTransportMeans = Value + End Set + End Property + + + Public Property Authorisation() As List(Of TransitOperationAuthorisationVAType) + Get + Return Me._authorisation + End Get + Set + Me._authorisation = Value + End Set + End Property + + + Public Property Consignor() As AddressVA1Type + Get + Return Me._consignor + End Get + Set + Me._consignor = Value + End Set + End Property + + + Public Property Consignee() As AddressVA1Type + Get + Return Me._consignee + End Get + Set + Me._consignee = Value + End Set + End Property + + + Public Property HolderOfTheTransitProcedure() As HolderOfTheTransitProcedureVAType + Get + Return Me._holderOfTheTransitProcedure + End Get + Set + Me._holderOfTheTransitProcedure = Value + End Set + End Property + + + Public Property Representative() As RepresentativeVAType + Get + Return Me._representative + End Get + Set + Me._representative = Value + End Set + End Property + + + Public Property AdditionalSupplyChainActor() As List(Of AdditionalSupplyChainActorVAType) + Get + Return Me._additionalSupplyChainActor + End Get + Set + Me._additionalSupplyChainActor = 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 ReferenceNumberUCR() As String + Get + Return Me._referenceNumberUCR + End Get + Set + Me._referenceNumberUCR = 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 PlaceOfLoading() As PlaceOfLoadingOrUnloadingVAType + Get + Return Me._placeOfLoading + End Get + Set + Me._placeOfLoading = Value + End Set + End Property + + + Public Property PlaceOfUnloading() As PlaceOfLoadingOrUnloadingVAType + Get + Return Me._placeOfUnloading + End Get + Set + Me._placeOfUnloading = Value + End Set + End Property + + + Public Property TransportCharges() As String + Get + Return Me._transportCharges + End Get + Set + Me._transportCharges = Value + End Set + End Property + + + Public Property CountryOfRoutingOfConsignment() As List(Of String) + Get + Return Me._countryOfRoutingOfConsignment + End Get + Set + Me._countryOfRoutingOfConsignment = Value + End Set + End Property + + + Public Property Carrier() As AddressVAType + Get + Return Me._carrier + End Get + Set + Me._carrier = Value + End Set + End Property + + + Public Property PreviousDocument() As List(Of PreviousDocumentVAType) + Get + Return Me._previousDocument + End Get + Set + Me._previousDocument = Value + End Set + End Property + + + Public Property SupportingDocument() As List(Of SupportingDocumentVAType) + Get + Return Me._supportingDocument + End Get + Set + Me._supportingDocument = Value + End Set + End Property + + + Public Property TransportDocument() As List(Of TransportDocumentVAType) + Get + Return Me._transportDocument + End Get + Set + Me._transportDocument = Value + End Set + End Property + + + Public Property AdditionalReference() As List(Of AdditionalReferenceVAType) + Get + Return Me._additionalReference + End Get + Set + Me._additionalReference = Value + End Set + End Property + + + Public Property AdditionalInformation() As List(Of AdditionalInformationVAType) + Get + Return Me._additionalInformation + End Get + Set + Me._additionalInformation = Value + End Set + End Property + + + Public Property AUTOIMPIndicator() As String + Get + Return Me._aUTOIMPIndicator + End Get + Set + Me._aUTOIMPIndicator = Value + End Set + End Property + + + Public Property ApplicationInternalData() As ApplicationInternalDataType + Get + Return Me._applicationInternalData + End Get + Set + Me._applicationInternalData = Value + End Set + End Property + + + Public Property HouseConsignment() As List(Of HouseConsignmentVAType) + 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(TransitOperationType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransitOperationType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransitOperationType object + ''' + ''' string to deserialize + ''' Output TransitOperationType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransitOperationType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransitOperationType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransitOperationType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransitOperationType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransitOperationType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransitOperationType + Return CType(SerializerXml.Deserialize(s), TransitOperationType) + End Function +#End Region + + ''' + ''' Serializes current TransitOperationType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransitOperationType object + ''' + ''' File to load and deserialize + ''' Output TransitOperationType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransitOperationType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransitOperationType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransitOperationType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransitOperationType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransaktionNCTSTyp + +#Region "Private fields" + Private _iOPartner As String + + Private _iODivision1 As String + + Private _iODivision2 As String + + Private _iODivision3 As String + + Private _iOReferenz As String + + Private _iODatumZeit As Date + + Private _version As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property IOPartner() As String + Get + Return Me._iOPartner + End Get + Set + Me._iOPartner = Value + End Set + End Property + + + Public Property IODivision1() As String + Get + Return Me._iODivision1 + End Get + Set + Me._iODivision1 = Value + End Set + End Property + + + Public Property IODivision2() As String + Get + Return Me._iODivision2 + End Get + Set + Me._iODivision2 = Value + End Set + End Property + + + Public Property IODivision3() As String + Get + Return Me._iODivision3 + End Get + Set + Me._iODivision3 = Value + End Set + End Property + + + Public Property IOReferenz() As String + Get + Return Me._iOReferenz + End Get + Set + Me._iOReferenz = Value + End Set + End Property + + + Public Property IODatumZeit() As Date + Get + Return Me._iODatumZeit + End Get + Set + Me._iODatumZeit = Value + End Set + End Property + + + Public Property Version() As String + Get + Return Me._version + End Get + Set + Me._version = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransaktionNCTSTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransaktionNCTSTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransaktionNCTSTyp object + ''' + ''' string to deserialize + ''' Output TransaktionNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransaktionNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransaktionNCTSTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransaktionNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransaktionNCTSTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransaktionNCTSTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransaktionNCTSTyp + Return CType(SerializerXml.Deserialize(s), TransaktionNCTSTyp) + End Function +#End Region + + ''' + ''' Serializes current TransaktionNCTSTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransaktionNCTSTyp object + ''' + ''' File to load and deserialize + ''' Output TransaktionNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransaktionNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransaktionNCTSTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransaktionNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransaktionNCTSTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DatenaustauschNCTSTyp + +#Region "Private fields" + Private _transaktion As TransaktionNCTSTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._transaktion = New TransaktionNCTSTyp() + End Sub + + + Public Property Transaktion() As TransaktionNCTSTyp + Get + Return Me._transaktion + End Get + Set + Me._transaktion = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DatenaustauschNCTSTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DatenaustauschNCTSTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DatenaustauschNCTSTyp object + ''' + ''' string to deserialize + ''' Output DatenaustauschNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DatenaustauschNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DatenaustauschNCTSTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DatenaustauschNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DatenaustauschNCTSTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DatenaustauschNCTSTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DatenaustauschNCTSTyp + Return CType(SerializerXml.Deserialize(s), DatenaustauschNCTSTyp) + End Function +#End Region + + ''' + ''' Serializes current DatenaustauschNCTSTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DatenaustauschNCTSTyp object + ''' + ''' File to load and deserialize + ''' Output DatenaustauschNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DatenaustauschNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DatenaustauschNCTSTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DatenaustauschNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DatenaustauschNCTSTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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/VersandanmeldungNCTSDE_004.xsd b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/VersandanmeldungNCTSDE_004.xsd new file mode 100644 index 0000000..69bb591 --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/VersandanmeldungNCTSDE_004.xsd @@ -0,0 +1,661 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Versandbestaetigung/VersandbestaetigungNCTSDE_002.Designer.vb b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Versandbestaetigung/VersandbestaetigungNCTSDE_002.Designer.vb new file mode 100644 index 0000000..ac7ce86 --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Versandbestaetigung/VersandbestaetigungNCTSDE_002.Designer.vb @@ -0,0 +1,1808 @@ +'' ------------------------------------------------------------------------------ +'' +'' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com +'' {"TargetFramework":"Net47","NameSpace":"VersandbestaetigungNCTSDE_002","Language":"VisualBasic","Properties":{},"XmlAttribute":{"Enabled":true},"ClassParams":{},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{},"JsonOutput":{},"Enabled":true},"Miscellaneous":{}} +'' +'' ------------------------------------------------------------------------------ +#Disable Warning +Imports System +Imports System.Diagnostics +Imports System.Xml.Serialization +Imports System.Runtime.Serialization +Imports System.Collections +Imports System.Xml.Schema +Imports System.ComponentModel +Imports System.Xml +Imports System.IO +Imports System.Text +Imports System.Collections.Generic + +Namespace VersandbestaetigungNCTSDE_002 + + + Partial Public Class VersandbestaetigungMCTyp + Inherits DatenaustauschNCTSTyp + +#Region "Private fields" + Private _einzelVersandbestaetigung As EinzelVersandbestaetigungTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._einzelVersandbestaetigung = New EinzelVersandbestaetigungTyp() + End Sub + + + Public Property EinzelVersandbestaetigung() As EinzelVersandbestaetigungTyp + Get + Return Me._einzelVersandbestaetigung + End Get + Set + Me._einzelVersandbestaetigung = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(VersandbestaetigungMCTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize VersandbestaetigungMCTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes VersandbestaetigungMCTyp object + ''' + ''' string to deserialize + ''' Output VersandbestaetigungMCTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VersandbestaetigungMCTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VersandbestaetigungMCTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VersandbestaetigungMCTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As VersandbestaetigungMCTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), VersandbestaetigungMCTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As VersandbestaetigungMCTyp + Return CType(SerializerXml.Deserialize(s), VersandbestaetigungMCTyp) + End Function +#End Region + + ''' + ''' Serializes current VersandbestaetigungMCTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an VersandbestaetigungMCTyp object + ''' + ''' File to load and deserialize + ''' Output VersandbestaetigungMCTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VersandbestaetigungMCTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VersandbestaetigungMCTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VersandbestaetigungMCTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As VersandbestaetigungMCTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class EinzelVersandbestaetigungTyp + +#Region "Private fields" + Private _objektIdentifizierung As ObjektIdentifizierungMCTyp + + Private _kopfDaten As KopfDatenVersandbestaetigungTyp + + Private _transitOperation As TransitOperationMCType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._transitOperation = New TransitOperationMCType() + Me._kopfDaten = New KopfDatenVersandbestaetigungTyp() + Me._objektIdentifizierung = New ObjektIdentifizierungMCTyp() + End Sub + + + Public Property ObjektIdentifizierung() As ObjektIdentifizierungMCTyp + Get + Return Me._objektIdentifizierung + End Get + Set + Me._objektIdentifizierung = Value + End Set + End Property + + + Public Property KopfDaten() As KopfDatenVersandbestaetigungTyp + Get + Return Me._kopfDaten + End Get + Set + Me._kopfDaten = Value + End Set + End Property + + + Public Property TransitOperation() As TransitOperationMCType + Get + Return Me._transitOperation + End Get + Set + Me._transitOperation = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(EinzelVersandbestaetigungTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize EinzelVersandbestaetigungTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes EinzelVersandbestaetigungTyp object + ''' + ''' string to deserialize + ''' Output EinzelVersandbestaetigungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelVersandbestaetigungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EinzelVersandbestaetigungTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelVersandbestaetigungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As EinzelVersandbestaetigungTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), EinzelVersandbestaetigungTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As EinzelVersandbestaetigungTyp + Return CType(SerializerXml.Deserialize(s), EinzelVersandbestaetigungTyp) + End Function +#End Region + + ''' + ''' Serializes current EinzelVersandbestaetigungTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an EinzelVersandbestaetigungTyp object + ''' + ''' File to load and deserialize + ''' Output EinzelVersandbestaetigungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelVersandbestaetigungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EinzelVersandbestaetigungTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelVersandbestaetigungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As EinzelVersandbestaetigungTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ObjektIdentifizierungMCTyp + +#Region "Private fields" + Private _objektName As String + + Private _objektAlias As String + + Private _eDIFACTNachrichtenNr As String + + Private _zeitpunktEingang As Date + + Private _shipmentReferenz As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property ObjektName() As String + Get + Return Me._objektName + End Get + Set + Me._objektName = Value + End Set + End Property + + + Public Property ObjektAlias() As String + Get + Return Me._objektAlias + End Get + Set + Me._objektAlias = Value + End Set + End Property + + + Public Property EDIFACTNachrichtenNr() As String + Get + Return Me._eDIFACTNachrichtenNr + End Get + Set + Me._eDIFACTNachrichtenNr = Value + End Set + End Property + + + Public Property ZeitpunktEingang() As Date + Get + Return Me._zeitpunktEingang + End Get + Set + Me._zeitpunktEingang = Value + End Set + End Property + + + Public Property ShipmentReferenz() As String + Get + Return Me._shipmentReferenz + End Get + Set + Me._shipmentReferenz = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ObjektIdentifizierungMCTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ObjektIdentifizierungMCTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ObjektIdentifizierungMCTyp object + ''' + ''' string to deserialize + ''' Output ObjektIdentifizierungMCTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ObjektIdentifizierungMCTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ObjektIdentifizierungMCTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ObjektIdentifizierungMCTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ObjektIdentifizierungMCTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ObjektIdentifizierungMCTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ObjektIdentifizierungMCTyp + Return CType(SerializerXml.Deserialize(s), ObjektIdentifizierungMCTyp) + End Function +#End Region + + ''' + ''' Serializes current ObjektIdentifizierungMCTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ObjektIdentifizierungMCTyp object + ''' + ''' File to load and deserialize + ''' Output ObjektIdentifizierungMCTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ObjektIdentifizierungMCTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ObjektIdentifizierungMCTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ObjektIdentifizierungMCTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ObjektIdentifizierungMCTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ApplicationInternalDataAdditionalDetailsDataType + +#Region "Private fields" + Private _key As String + + Private _value As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Key() As String + Get + Return Me._key + End Get + Set + Me._key = Value + End Set + End Property + + + Public Property Value() As String + Get + Return Me._value + End Get + Set + Me._value = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ApplicationInternalDataAdditionalDetailsDataType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' string to deserialize + ''' Output ApplicationInternalDataAdditionalDetailsDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsDataType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ApplicationInternalDataAdditionalDetailsDataType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ApplicationInternalDataAdditionalDetailsDataType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ApplicationInternalDataAdditionalDetailsDataType + Return CType(SerializerXml.Deserialize(s), ApplicationInternalDataAdditionalDetailsDataType) + End Function +#End Region + + ''' + ''' Serializes current ApplicationInternalDataAdditionalDetailsDataType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' File to load and deserialize + ''' Output ApplicationInternalDataAdditionalDetailsDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsDataType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ApplicationInternalDataAdditionalDetailsDataType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ApplicationInternalDataType + +#Region "Private fields" + Private _additionalDetails As List(Of ApplicationInternalDataAdditionalDetailsDataType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._additionalDetails = New List(Of ApplicationInternalDataAdditionalDetailsDataType)() + End Sub + + + Public Property AdditionalDetails() As List(Of ApplicationInternalDataAdditionalDetailsDataType) + Get + Return Me._additionalDetails + End Get + Set + Me._additionalDetails = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ApplicationInternalDataType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ApplicationInternalDataType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ApplicationInternalDataType object + ''' + ''' string to deserialize + ''' Output ApplicationInternalDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ApplicationInternalDataType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ApplicationInternalDataType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ApplicationInternalDataType + Return CType(SerializerXml.Deserialize(s), ApplicationInternalDataType) + End Function +#End Region + + ''' + ''' Serializes current ApplicationInternalDataType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ApplicationInternalDataType object + ''' + ''' File to load and deserialize + ''' Output ApplicationInternalDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ApplicationInternalDataType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransitOperationMCType + +#Region "Private fields" + Private _departureStatus As String + + Private _receptionDateAndTime As Date + + Private _applicationInternalData As ApplicationInternalDataType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._applicationInternalData = New ApplicationInternalDataType() + End Sub + + + Public Property DepartureStatus() As String + Get + Return Me._departureStatus + End Get + Set + Me._departureStatus = Value + End Set + End Property + + + Public Property ReceptionDateAndTime() As Date + Get + Return Me._receptionDateAndTime + End Get + Set + Me._receptionDateAndTime = Value + End Set + End Property + + + Public Property ApplicationInternalData() As ApplicationInternalDataType + Get + Return Me._applicationInternalData + End Get + Set + Me._applicationInternalData = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransitOperationMCType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransitOperationMCType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransitOperationMCType object + ''' + ''' string to deserialize + ''' Output TransitOperationMCType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransitOperationMCType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransitOperationMCType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransitOperationMCType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransitOperationMCType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransitOperationMCType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransitOperationMCType + Return CType(SerializerXml.Deserialize(s), TransitOperationMCType) + End Function +#End Region + + ''' + ''' Serializes current TransitOperationMCType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransitOperationMCType object + ''' + ''' File to load and deserialize + ''' Output TransitOperationMCType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransitOperationMCType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransitOperationMCType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransitOperationMCType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransitOperationMCType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class KopfDatenVersandbestaetigungTyp + +#Region "Private fields" + Private _aNR As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property ANR() As String + Get + Return Me._aNR + End Get + Set + Me._aNR = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(KopfDatenVersandbestaetigungTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize KopfDatenVersandbestaetigungTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes KopfDatenVersandbestaetigungTyp object + ''' + ''' string to deserialize + ''' Output KopfDatenVersandbestaetigungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As KopfDatenVersandbestaetigungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, KopfDatenVersandbestaetigungTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As KopfDatenVersandbestaetigungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As KopfDatenVersandbestaetigungTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), KopfDatenVersandbestaetigungTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As KopfDatenVersandbestaetigungTyp + Return CType(SerializerXml.Deserialize(s), KopfDatenVersandbestaetigungTyp) + End Function +#End Region + + ''' + ''' Serializes current KopfDatenVersandbestaetigungTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an KopfDatenVersandbestaetigungTyp object + ''' + ''' File to load and deserialize + ''' Output KopfDatenVersandbestaetigungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As KopfDatenVersandbestaetigungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, KopfDatenVersandbestaetigungTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As KopfDatenVersandbestaetigungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As KopfDatenVersandbestaetigungTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransaktionNCTSTyp + +#Region "Private fields" + Private _iOPartner As String + + Private _iODivision1 As String + + Private _iODivision2 As String + + Private _iODivision3 As String + + Private _iOReferenz As String + + Private _iODatumZeit As Date + + Private _version As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property IOPartner() As String + Get + Return Me._iOPartner + End Get + Set + Me._iOPartner = Value + End Set + End Property + + + Public Property IODivision1() As String + Get + Return Me._iODivision1 + End Get + Set + Me._iODivision1 = Value + End Set + End Property + + + Public Property IODivision2() As String + Get + Return Me._iODivision2 + End Get + Set + Me._iODivision2 = Value + End Set + End Property + + + Public Property IODivision3() As String + Get + Return Me._iODivision3 + End Get + Set + Me._iODivision3 = Value + End Set + End Property + + + Public Property IOReferenz() As String + Get + Return Me._iOReferenz + End Get + Set + Me._iOReferenz = Value + End Set + End Property + + + Public Property IODatumZeit() As Date + Get + Return Me._iODatumZeit + End Get + Set + Me._iODatumZeit = Value + End Set + End Property + + + Public Property Version() As String + Get + Return Me._version + End Get + Set + Me._version = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransaktionNCTSTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransaktionNCTSTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransaktionNCTSTyp object + ''' + ''' string to deserialize + ''' Output TransaktionNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransaktionNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransaktionNCTSTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransaktionNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransaktionNCTSTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransaktionNCTSTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransaktionNCTSTyp + Return CType(SerializerXml.Deserialize(s), TransaktionNCTSTyp) + End Function +#End Region + + ''' + ''' Serializes current TransaktionNCTSTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransaktionNCTSTyp object + ''' + ''' File to load and deserialize + ''' Output TransaktionNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransaktionNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransaktionNCTSTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransaktionNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransaktionNCTSTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DatenaustauschNCTSTyp + +#Region "Private fields" + Private _transaktion As TransaktionNCTSTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._transaktion = New TransaktionNCTSTyp() + End Sub + + + Public Property Transaktion() As TransaktionNCTSTyp + Get + Return Me._transaktion + End Get + Set + Me._transaktion = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DatenaustauschNCTSTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DatenaustauschNCTSTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DatenaustauschNCTSTyp object + ''' + ''' string to deserialize + ''' Output DatenaustauschNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DatenaustauschNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DatenaustauschNCTSTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DatenaustauschNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DatenaustauschNCTSTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DatenaustauschNCTSTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DatenaustauschNCTSTyp + Return CType(SerializerXml.Deserialize(s), DatenaustauschNCTSTyp) + End Function +#End Region + + ''' + ''' Serializes current DatenaustauschNCTSTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DatenaustauschNCTSTyp object + ''' + ''' File to load and deserialize + ''' Output DatenaustauschNCTSTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DatenaustauschNCTSTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DatenaustauschNCTSTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DatenaustauschNCTSTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DatenaustauschNCTSTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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/Versandbestaetigung/VersandbestaetigungNCTSDE_002.xsd b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Versandbestaetigung/VersandbestaetigungNCTSDE_002.xsd new file mode 100644 index 0000000..952728c --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/Versandbestaetigung/VersandbestaetigungNCTSDE_002.xsd @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/cDakosyNCTSOut004.vb b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/cDakosyNCTSOut004.vb new file mode 100644 index 0000000..4f1388f --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/cDakosyNCTSOut004.vb @@ -0,0 +1,2580 @@ +Imports System.Data.SqlClient +Imports System.Reflection + +Public Class cDakosyNCTSOut004 + + Property ncts_Id As Integer + Property ncts_Status As Object = DAKOSY_Worker.cDY_Statusliste.S_00 + Property ncts_Status_KEWILL_Equivalent As Object = DAKOSY_Worker.cDY_Statusliste.S_00 + Property ncts_dyaArt As String = "" + Property ncts_dyaAnmID As Integer + + Property ncts_ANR As Object = Nothing + Property ncts_MRN As Object = Nothing + + Property ncts_Erstellung As DateTime = Now + Property ncts_Erstellung_SB As Object = Nothing + Property ncts_LetzteBearbeitung As DateTime = Now + Property ncts_LetzteBearbeitung_SB As Object = Nothing + Property ncts_firma As Object = Nothing + Property ncts_niederlassung As Object = Nothing + + + Property ncts_Gestellt As Boolean = False + Property ncts_GestelltAm As Object = Nothing + Property ncts_Trans_Partner As Object = Nothing + Property ncts_Trans_Div1 As Object = Nothing + Property ncts_Trans_Div2 As Object = Nothing + Property ncts_Trans_Div3 As Object = Nothing + Property ncts_Trans_Referenz As Object = Nothing + Property ncts_Trans_DatumZeit As DateTime = Now + Property ncts_Trans_Version As Object = Nothing + Property ncts_NachrichtenSenderTIN As Object = Nothing + Property ncts_NachrichtenSenderNLNR As Object = Nothing + Property ncts_NachrichtenempfaengerDST As Object = Nothing + + Property ncts_ObjectName As Object = Nothing + Property ncts_ObjectAlias As Object = Nothing + Property ncts_BezugsnummerVorblendung As Object = Nothing + Property ncts_Bearbeiter As Object = Nothing + + + Property ncts_CountryOfDispatch As Object = Nothing + Property ncts_CountryOfDestination As Object = Nothing + Property ncts_Declarationtype As Object = Nothing + Property ncts_TIRCarnetNumber As Object = Nothing + Property ncts_ReductedDatasetIndicator As Object = Nothing + Property ncts_LocationOfGoods_TypeofLocation As Object = Nothing + Property ncts_LocationOfGoods_QualifierIdenfitication As Object = Nothing + Property ncts_LocationOfGoods_AdditionalIdentifier As Object = Nothing + Property ncts_LocationOfGoods_ContactPerson_Name As Object = Nothing + Property ncts_LocationOfGoods_ContactPerson_PhoneNumber As Object = Nothing + Property ncts_LocationOfGoods_ContactPerson_EMailAddress As Object = Nothing + Property ncts_CustomsOfficeOfTransitDeclared_1_RefNumber As Object = Nothing + Property ncts_CustomsOfficeOfTransitDeclared_2_RefNumber As Object = Nothing + Property ncts_CustomsOfficeOfTransitDeclared_3_RefNumber As Object = Nothing + Property ncts_CustomsOfficeOfTransitDeclared_4_RefNumber As Object = Nothing + Property ncts_CustomsOfficeOfTransitDeclared_5_RefNumber As Object = Nothing + Property ncts_CustomsOfficeOfTransitDeclared_6_RefNumber As Object = Nothing + Property ncts_CustomsOfficeOfTransitDeclared_7_RefNumber As Object = Nothing + Property ncts_CustomsOfficeOfTransitDeclared_8_RefNumber As Object = Nothing + Property ncts_CustomsOfficeOfTransitDeclared_9_RefNumber As Object = Nothing + Property ncts_CustomsOfficeOfTransitDeclared_1_ArravialDateTime As Object = Nothing + Property ncts_CustomsOfficeOfTransitDeclared_2_ArravialDateTime As Object = Nothing + Property ncts_CustomsOfficeOfTransitDeclared_3_ArravialDateTime As Object = Nothing + Property ncts_CustomsOfficeOfTransitDeclared_4_ArravialDateTime As Object = Nothing + Property ncts_CustomsOfficeOfTransitDeclared_5_ArravialDateTime As Object = Nothing + Property ncts_CustomsOfficeOfTransitDeclared_6_ArravialDateTime As Object = Nothing + Property ncts_CustomsOfficeOfTransitDeclared_7_ArravialDateTime As Object = Nothing + Property ncts_CustomsOfficeOfTransitDeclared_8_ArravialDateTime As Object = Nothing + Property ncts_CustomsOfficeOfTransitDeclared_9_ArravialDateTime As Object = Nothing + Property ncts_CustomsOfficeOfDestinationDeclared As Object = Nothing + Property ncts_CustomsOfficeOfDeparture As Object = Nothing + Property ncts_CustomsOfficeOfExitForTransitDeclared As Object = Nothing + Property ncts_LimitDate As Object = Nothing + Property ncts_TransitDeclarationType As Object = Nothing + Property ncts_GrossMass As Object = Nothing + Property ncts_BindingItinerary As Object = Nothing + Property ncts_ContainerIndicator As Object = Nothing + Property ncts_InlandModeOfTransport As Object = Nothing + Property ncts_DepartureTransportMeans_1_TypeOfIdentification As Object = Nothing + Property ncts_DepartureTransportMeans_1_IdentificationNumber As Object = Nothing + Property ncts_DepartureTransportMeans_1_Nationality As Object = Nothing + Property ncts_DepartureTransportMeans_2_TypeOfIdentification As Object = Nothing + Property ncts_DepartureTransportMeans_2_IdentificationNumber As Object = Nothing + Property ncts_DepartureTransportMeans_2_Nationality As Object = Nothing + Property ncts_DepartureTransportMeans_3_TypeOfIdentification As Object = Nothing + Property ncts_DepartureTransportMeans_3_IdentificationNumber As Object = Nothing + Property ncts_DepartureTransportMeans_3_Nationality As Object = Nothing + Property ncts_DepartureTransportMeans_4_TypeOfIdentification As Object = Nothing + Property ncts_DepartureTransportMeans_4_IdentificationNumber As Object = Nothing + Property ncts_DepartureTransportMeans_4_Nationality As Object = Nothing + Property ncts_ActiveBorderTransportMeans_1_TypeOfIdentification As Object = Nothing + Property ncts_ActiveBorderTransportMeans_1_IdentificationNumber As Object = Nothing + Property ncts_ActiveBorderTransportMeans_1_Nationality As Object = Nothing + Property ncts_ActiveBorderTransportMeans_1_CoveyanceReferenceNumber As Object = Nothing + Property ncts_ActiveBorderTransportMeans_1_CustomsOfficeAtBorderDeclared As Object = Nothing + Property ncts_ActiveBorderTransportMeans_2_TypeOfIdentification As Object = Nothing + Property ncts_ActiveBorderTransportMeans_2_IdentificationNumber As Object = Nothing + Property ncts_ActiveBorderTransportMeans_2_Nationality As Object = Nothing + Property ncts_ActiveBorderTransportMeans_2_CoveyanceReferenceNumber As Object = Nothing + Property ncts_ActiveBorderTransportMeans_2_CustomsOfficeAtBorderDeclared As Object = Nothing + Property ncts_ActiveBorderTransportMeans_3_TypeOfIdentification As Object = Nothing + Property ncts_ActiveBorderTransportMeans_3_IdentificationNumber As Object = Nothing + Property ncts_ActiveBorderTransportMeans_3_Nationality As Object = Nothing + Property ncts_ActiveBorderTransportMeans_3_CoveyanceReferenceNumber As Object = Nothing + Property ncts_ActiveBorderTransportMeans_3_CustomsOfficeAtBorderDeclared As Object = Nothing + Property ncts_ActiveBorderTransportMeans_4_TypeOfIdentification As Object = Nothing + Property ncts_ActiveBorderTransportMeans_4_IdentificationNumber As Object = Nothing + Property ncts_ActiveBorderTransportMeans_4_Nationality As Object = Nothing + Property ncts_ActiveBorderTransportMeans_4_CoveyanceReferenceNumber As Object = Nothing + Property ncts_ActiveBorderTransportMeans_4_CustomsOfficeAtBorderDeclared As Object = Nothing + Property ncts_Authorisation_1_Type As Object = Nothing + Property ncts_Authorisation_1_ReferenceNumber As Object = Nothing + Property ncts_Authorisation_2_Type As Object = Nothing + Property ncts_Authorisation_2_ReferenceNumber As Object = Nothing + Property ncts_Authorisation_3_Type As Object = Nothing + Property ncts_Authorisation_3_ReferenceNumber As Object = Nothing + Property ncts_Authorisation_4_Type As Object = Nothing + Property ncts_Authorisation_4_ReferenceNumber As Object = Nothing + Property ncts_Authorisation_5_Type As Object = Nothing + Property ncts_Authorisation_5_ReferenceNumber As Object = Nothing + Property ncts_Authorisation_6_Type As Object = Nothing + Property ncts_Authorisation_6_ReferenceNumber As Object = Nothing + Property ncts_Authorisation_7_Type As Object = Nothing + Property ncts_Authorisation_7_ReferenceNumber As Object = Nothing + Property ncts_Authorisation_8_Type As Object = Nothing + Property ncts_Authorisation_8_ReferenceNumber As Object = Nothing + Property ncts_Authorisation_9_Type As Object = Nothing + Property ncts_Authorisation_9_ReferenceNumber As Object = Nothing + Property ncts_Consignor_AdressCode As Object = Nothing + Property ncts_Consignor_IdentificationNumber As Object = Nothing + Property ncts_Consignor_SubsidiaryNumber As Object = Nothing + Property ncts_Consignor_Name As Object = Nothing + Property ncts_Consignor_StreetNumber As Object = Nothing + Property ncts_Consignor_City As Object = Nothing + Property ncts_Consignor_Postcode As Object = Nothing + Property ncts_Consignor_Country As Object = Nothing + Property ncts_Consignor_ContactPerson_Name As Object = Nothing + Property ncts_Consignor_ContactPerson_PhoneNumber As Object = Nothing + Property ncts_Consignor_ContactPerson_EMailAddress As Object = Nothing + Property ncts_Consignee_AdressCode As Object = Nothing + Property ncts_Consignee_IdentificationNumber As Object = Nothing + Property ncts_Consignee_SubsidiaryNumber As Object = Nothing + Property ncts_Consignee_Name As Object = Nothing + Property ncts_Consignee_StreetNumber As Object = Nothing + Property ncts_Consignee_City As Object = Nothing + Property ncts_Consignee_Postcode As Object = Nothing + Property ncts_Consignee_Country As Object = Nothing + Property ncts_Consignee_ContactPerson_Name As Object = Nothing + Property ncts_Consignee_ContactPerson_PhoneNumber As Object = Nothing + Property ncts_Consignee_ContactPerson_EMailAddress As Object = Nothing + Property ncts_HolderOfTheTransitProcedure_AdressCode As Object = Nothing + Property ncts_HolderOfTheTransitProcedure_IdentificationNumber As Object = Nothing + Property ncts_HolderOfTheTransitProcedure_TIRHolderIdentificationNumber As Object = Nothing + Property ncts_HolderOfTheTransitProcedure_Name As Object = Nothing + Property ncts_HolderOfTheTransitProcedure_StreetNumber As Object = Nothing + Property ncts_HolderOfTheTransitProcedure_City As Object = Nothing + Property ncts_HolderOfTheTransitProcedure_Postcode As Object = Nothing + Property ncts_HolderOfTheTransitProcedure_Country As Object = Nothing + Property ncts_HolderOfTheTransitProcedure_ContactPerson_Name As Object = Nothing + Property ncts_HolderOfTheTransitProcedure_ContactPerson_PhoneNumber As Object = Nothing + Property ncts_HolderOfTheTransitProcedure_ContactPerson_EMailAddress As Object = Nothing + Property ncts_Representative_AdressCode As Object = Nothing + Property ncts_Representative_IdentificationNumber As Object = Nothing + Property ncts_Representative_ContactPerson_Name As Object = Nothing + Property ncts_Representative_ContactPerson_PhoneNumber As Object = Nothing + Property ncts_Representative_ContactPerson_EMailAddress As Object = Nothing + Property ncts_AdditionalSupplyChainActor_1_Role As Object = Nothing + Property ncts_AdditionalSupplyChainActor_1_IdentificationNumber As Object = Nothing + Property ncts_AdditionalSupplyChainActor_2_Role As Object = Nothing + Property ncts_AdditionalSupplyChainActor_2_IdentificationNumber As Object = Nothing + Property ncts_AdditionalSupplyChainActor_3_Role As Object = Nothing + Property ncts_AdditionalSupplyChainActor_3_IdentificationNumber As Object = Nothing + Property ncts_AdditionalSupplyChainActor_4_Role As Object = Nothing + Property ncts_AdditionalSupplyChainActor_4_IdentificationNumber As Object = Nothing + Property ncts_AdditionalSupplyChainActor_5_Role As Object = Nothing + Property ncts_AdditionalSupplyChainActor_5_IdentificationNumber As Object = Nothing + Property ncts_AdditionalSupplyChainActor_6_Role As Object = Nothing + Property ncts_AdditionalSupplyChainActor_6_IdentificationNumber As Object = Nothing + Property ncts_AdditionalSupplyChainActor_7_Role As Object = Nothing + Property ncts_AdditionalSupplyChainActor_7_IdentificationNumber As Object = Nothing + Property ncts_AdditionalSupplyChainActor_8_Role As Object = Nothing + Property ncts_AdditionalSupplyChainActor_8_IdentificationNumber As Object = Nothing + Property ncts_AdditionalSupplyChainActor_9_Role As Object = Nothing + Property ncts_AdditionalSupplyChainActor_9_IdentificationNumber As Object = Nothing + Property ncts_Security As Object = Nothing + Property ncts_ReferenceNumberUCR As Object = Nothing + Property ncts_SpecificCircomstanceIndicator As Object = Nothing + Property ncts_PlaceOfLoading_Location As Object = Nothing + Property ncts_PlaceOfLoading_Country As Object = Nothing + Property ncts_PlaceOfUnLoading_Location As Object = Nothing + Property ncts_PlaceOfUnLoading_Country As Object = Nothing + Property ncts_TransportCharges As Object = Nothing + Property ncts_CountryOfRoutingOfConsignment_1 As Object = Nothing + Property ncts_CountryOfRoutingOfConsignment_2 As Object = Nothing + Property ncts_CountryOfRoutingOfConsignment_3 As Object = Nothing + Property ncts_CountryOfRoutingOfConsignment_4 As Object = Nothing + Property ncts_CountryOfRoutingOfConsignment_5 As Object = Nothing + Property ncts_CountryOfRoutingOfConsignment_6 As Object = Nothing + Property ncts_CountryOfRoutingOfConsignment_7 As Object = Nothing + Property ncts_CountryOfRoutingOfConsignment_8 As Object = Nothing + Property ncts_CountryOfRoutingOfConsignment_9 As Object = Nothing + Property ncts_CountryOfRoutingOfConsignment_10 As Object = Nothing + Property ncts_CountryOfRoutingOfConsignment_11 As Object = Nothing + Property ncts_CountryOfRoutingOfConsignment_12 As Object = Nothing + Property ncts_CountryOfRoutingOfConsignment_13 As Object = Nothing + Property ncts_CountryOfRoutingOfConsignment_14 As Object = Nothing + Property ncts_CountryOfRoutingOfConsignment_15 As Object = Nothing + Property ncts_Carrier_AdressCode As Object = Nothing + Property ncts_Carrier_IdentificationNumber As Object = Nothing + Property ncts_Carrier_SubsidiaryNumber As Object = Nothing + Property ncts_Carrier_ContactPerson_Name As Object = Nothing + Property ncts_Carrier_ContactPerson_PhoneNumber As Object = Nothing + Property ncts_Carrier_ContactPerson_EMailAddress As Object = Nothing + Property ncts_SupportingDocument_1_Type As Object = Nothing + Property ncts_SupportingDocument_1_ReferenceNumber As Object = Nothing + Property ncts_SupportingDocument_1_DocumentLineItemNumber As Object = Nothing + Property ncts_SupportingDocument_1_ComplementOfInformation As Object = Nothing + Property ncts_SupportingDocument_2_Type As Object = Nothing + Property ncts_SupportingDocument_2_ReferenceNumber As Object = Nothing + Property ncts_SupportingDocument_2_DocumentLineItemNumber As Object = Nothing + Property ncts_SupportingDocument_2_ComplementOfInformation As Object = Nothing + Property ncts_SupportingDocument_3_Type As Object = Nothing + Property ncts_SupportingDocument_3_ReferenceNumber As Object = Nothing + Property ncts_SupportingDocument_3_DocumentLineItemNumber As Object = Nothing + Property ncts_SupportingDocument_3_ComplementOfInformation As Object = Nothing + Property ncts_SupportingDocument_4_Type As Object = Nothing + Property ncts_SupportingDocument_4_ReferenceNumber As Object = Nothing + Property ncts_SupportingDocument_4_DocumentLineItemNumber As Object = Nothing + Property ncts_SupportingDocument_4_ComplementOfInformation As Object = Nothing + Property ncts_SupportingDocument_5_Type As Object = Nothing + Property ncts_SupportingDocument_5_ReferenceNumber As Object = Nothing + Property ncts_SupportingDocument_5_DocumentLineItemNumber As Object = Nothing + Property ncts_SupportingDocument_5_ComplementOfInformation As Object = Nothing + Property ncts_SupportingDocument_6_Type As Object = Nothing + Property ncts_SupportingDocument_6_ReferenceNumber As Object = Nothing + Property ncts_SupportingDocument_6_DocumentLineItemNumber As Object = Nothing + Property ncts_SupportingDocument_6_ComplementOfInformation As Object = Nothing + Property ncts_SupportingDocument_7_Type As Object = Nothing + Property ncts_SupportingDocument_7_ReferenceNumber As Object = Nothing + Property ncts_SupportingDocument_7_DocumentLineItemNumber As Object = Nothing + Property ncts_SupportingDocument_7_ComplementOfInformation As Object = Nothing + Property ncts_SupportingDocument_8_Type As Object = Nothing + Property ncts_SupportingDocument_8_ReferenceNumber As Object = Nothing + Property ncts_SupportingDocument_8_DocumentLineItemNumber As Object = Nothing + Property ncts_SupportingDocument_8_ComplementOfInformation As Object = Nothing + Property ncts_SupportingDocument_9_Type As Object = Nothing + Property ncts_SupportingDocument_9_ReferenceNumber As Object = Nothing + Property ncts_SupportingDocument_9_DocumentLineItemNumber As Object = Nothing + Property ncts_SupportingDocument_9_ComplementOfInformation As Object = Nothing + Property ncts_TransportDocument_1_Type As Object = Nothing + Property ncts_TransportDocument_1_ReferenceNumber As Object = Nothing + Property ncts_TransportDocument_2_Type As Object = Nothing + Property ncts_TransportDocument_2_ReferenceNumber As Object = Nothing + Property ncts_TransportDocument_3_Type As Object = Nothing + Property ncts_TransportDocument_3_ReferenceNumber As Object = Nothing + Property ncts_TransportDocument_4_Type As Object = Nothing + Property ncts_TransportDocument_4_ReferenceNumber As Object = Nothing + Property ncts_TransportDocument_5_Type As Object = Nothing + Property ncts_TransportDocument_5_ReferenceNumber As Object = Nothing + Property ncts_TransportDocument_6_Type As Object = Nothing + Property ncts_TransportDocument_6_ReferenceNumber As Object = Nothing + Property ncts_TransportDocument_7_Type As Object = Nothing + Property ncts_TransportDocument_7_ReferenceNumber As Object = Nothing + Property ncts_TransportDocument_8_Type As Object = Nothing + Property ncts_TransportDocument_8_ReferenceNumber As Object = Nothing + Property ncts_TransportDocument_9_Type As Object = Nothing + Property ncts_TransportDocument_9_ReferenceNumber As Object = Nothing + Property ncts_AdditionalReference_1_Type As Object = Nothing + Property ncts_AdditionalReference_1_ReferenceNumber As Object = Nothing + Property ncts_AdditionalReference_2_Type As Object = Nothing + Property ncts_AdditionalReference_2_ReferenceNumber As Object = Nothing + Property ncts_AdditionalReference_3_Type As Object = Nothing + Property ncts_AdditionalReference_3_ReferenceNumber As Object = Nothing + Property ncts_AdditionalReference_4_Type As Object = Nothing + Property ncts_AdditionalReference_4_ReferenceNumber As Object = Nothing + Property ncts_AdditionalReference_5_Type As Object = Nothing + Property ncts_AdditionalReference_5_ReferenceNumber As Object = Nothing + Property ncts_AdditionalReference_6_Type As Object = Nothing + Property ncts_AdditionalReference_6_ReferenceNumber As Object = Nothing + Property ncts_AdditionalReference_7_Type As Object = Nothing + Property ncts_AdditionalReference_7_ReferenceNumber As Object = Nothing + Property ncts_AdditionalReference_8_Type As Object = Nothing + Property ncts_AdditionalReference_8_ReferenceNumber As Object = Nothing + Property ncts_AdditionalReference_9_Type As Object = Nothing + Property ncts_AdditionalReference_9_ReferenceNumber As Object = Nothing + Property ncts_AdditionalInformation_1_Code As Object = Nothing + Property ncts_AdditionalInformation_1_Text As Object = Nothing + Property ncts_AdditionalInformation_2_Code As Object = Nothing + Property ncts_AdditionalInformation_2_Text As Object = Nothing + Property ncts_AdditionalInformation_3_Code As Object = Nothing + Property ncts_AdditionalInformation_3_Text As Object = Nothing + Property ncts_AdditionalInformation_4_Code As Object = Nothing + Property ncts_AdditionalInformation_4_Text As Object = Nothing + Property ncts_AdditionalInformation_5_Code As Object = Nothing + Property ncts_AdditionalInformation_5_Text As Object = Nothing + Property ncts_AdditionalInformation_6_Code As Object = Nothing + Property ncts_AdditionalInformation_6_Text As Object = Nothing + Property ncts_AdditionalInformation_7_Code As Object = Nothing + Property ncts_AdditionalInformation_7_Text As Object = Nothing + Property ncts_AdditionalInformation_8_Code As Object = Nothing + Property ncts_AdditionalInformation_8_Text As Object = Nothing + Property ncts_AdditionalInformation_9_Code As Object = Nothing + Property ncts_AdditionalInformation_9_Text As Object = Nothing + Property ncts_AUTOIMPIndicator As Object = Nothing + Property ncts_Stammreferenz As Object = Nothing + + + + Property ncts_GUARANTEE As New List(Of cDakosy_NCTSOut004_Guarantee) + Property ncts_TRANSPORTEQUIPMENT As New List(Of cDakosy_NCTSOut004_TransportEquipment) + Property ncts_HOUSE_CONSIGNMENT As New List(Of cDakosy_NCTSOut004_HouseConsignment) + + + Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL + + + Sub New() + + End Sub + + Sub New(ncts_dyaAnmID As Integer, ncts_Erstellung_SB As Integer) + Me.ncts_dyaAnmID = ncts_dyaAnmID + Me.ncts_Erstellung_SB = ncts_Erstellung_SB + Me.ncts_LetzteBearbeitung_SB = ncts_Erstellung_SB + End Sub + + Sub New(ncts_Id) + Me.ncts_Id = ncts_Id + LOAD() + End Sub + + Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) + Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Id", ncts_Id, , True, True)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Status", ncts_Status)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Status_KEWILL_Equivalent", ncts_Status_KEWILL_Equivalent)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_dyaArt", ncts_dyaArt)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_dyaAnmID", ncts_dyaAnmID)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_ANR", ncts_ANR)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_MRN", ncts_MRN)) + + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Erstellung", ncts_Erstellung)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Erstellung_SB", ncts_Erstellung_SB)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_LetzteBearbeitung", ncts_LetzteBearbeitung)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_LetzteBearbeitung_SB", ncts_LetzteBearbeitung_SB)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_firma", ncts_firma)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_niederlassung", ncts_niederlassung)) + + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Gestellt", ncts_Gestellt)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_GestelltAm", ncts_GestelltAm)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Trans_Partner", ncts_Trans_Partner)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Trans_Div1", ncts_Trans_Div1)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Trans_Div2", ncts_Trans_Div2)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Trans_Div3", ncts_Trans_Div3)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Trans_Referenz", ncts_Trans_Referenz)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Trans_DatumZeit", ncts_Trans_DatumZeit)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Trans_Version", ncts_Trans_Version)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_NachrichtenSenderTIN", ncts_NachrichtenSenderTIN)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_NachrichtenSenderNLNR", ncts_NachrichtenSenderNLNR)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_NachrichtenempfaengerDST", ncts_NachrichtenempfaengerDST)) + + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_ObjectName", ncts_ObjectName)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_ObjectAlias", ncts_ObjectAlias)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_BezugsnummerVorblendung", ncts_BezugsnummerVorblendung)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Bearbeiter", ncts_Bearbeiter)) + + + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CountryOfDispatch", ncts_CountryOfDispatch)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CountryOfDestination", ncts_CountryOfDestination)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Declarationtype", ncts_Declarationtype)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_TIRCarnetNumber", ncts_TIRCarnetNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_ReductedDatasetIndicator", ncts_ReductedDatasetIndicator)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_LocationOfGoods_TypeofLocation", ncts_LocationOfGoods_TypeofLocation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_LocationOfGoods_QualifierIdenfitication", ncts_LocationOfGoods_QualifierIdenfitication)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_LocationOfGoods_AdditionalIdentifier", ncts_LocationOfGoods_AdditionalIdentifier)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_LocationOfGoods_ContactPerson_Name", ncts_LocationOfGoods_ContactPerson_Name)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_LocationOfGoods_ContactPerson_PhoneNumber", ncts_LocationOfGoods_ContactPerson_PhoneNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_LocationOfGoods_ContactPerson_EMailAddress", ncts_LocationOfGoods_ContactPerson_EMailAddress)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CustomsOfficeOfTransitDeclared_1_RefNumber", ncts_CustomsOfficeOfTransitDeclared_1_RefNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CustomsOfficeOfTransitDeclared_2_RefNumber", ncts_CustomsOfficeOfTransitDeclared_2_RefNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CustomsOfficeOfTransitDeclared_3_RefNumber", ncts_CustomsOfficeOfTransitDeclared_3_RefNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CustomsOfficeOfTransitDeclared_4_RefNumber", ncts_CustomsOfficeOfTransitDeclared_4_RefNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CustomsOfficeOfTransitDeclared_5_RefNumber", ncts_CustomsOfficeOfTransitDeclared_5_RefNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CustomsOfficeOfTransitDeclared_6_RefNumber", ncts_CustomsOfficeOfTransitDeclared_6_RefNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CustomsOfficeOfTransitDeclared_7_RefNumber", ncts_CustomsOfficeOfTransitDeclared_7_RefNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CustomsOfficeOfTransitDeclared_8_RefNumber", ncts_CustomsOfficeOfTransitDeclared_8_RefNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CustomsOfficeOfTransitDeclared_9_RefNumber", ncts_CustomsOfficeOfTransitDeclared_9_RefNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CustomsOfficeOfTransitDeclared_1_ArravialDateTime", ncts_CustomsOfficeOfTransitDeclared_1_ArravialDateTime)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CustomsOfficeOfTransitDeclared_2_ArravialDateTime", ncts_CustomsOfficeOfTransitDeclared_2_ArravialDateTime)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CustomsOfficeOfTransitDeclared_3_ArravialDateTime", ncts_CustomsOfficeOfTransitDeclared_3_ArravialDateTime)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CustomsOfficeOfTransitDeclared_4_ArravialDateTime", ncts_CustomsOfficeOfTransitDeclared_4_ArravialDateTime)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CustomsOfficeOfTransitDeclared_5_ArravialDateTime", ncts_CustomsOfficeOfTransitDeclared_5_ArravialDateTime)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CustomsOfficeOfTransitDeclared_6_ArravialDateTime", ncts_CustomsOfficeOfTransitDeclared_6_ArravialDateTime)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CustomsOfficeOfTransitDeclared_7_ArravialDateTime", ncts_CustomsOfficeOfTransitDeclared_7_ArravialDateTime)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CustomsOfficeOfTransitDeclared_8_ArravialDateTime", ncts_CustomsOfficeOfTransitDeclared_8_ArravialDateTime)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CustomsOfficeOfTransitDeclared_9_ArravialDateTime", ncts_CustomsOfficeOfTransitDeclared_9_ArravialDateTime)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CustomsOfficeOfDestinationDeclared", ncts_CustomsOfficeOfDestinationDeclared)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CustomsOfficeOfDeparture", ncts_CustomsOfficeOfDeparture)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CustomsOfficeOfExitForTransitDeclared", ncts_CustomsOfficeOfExitForTransitDeclared)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_LimitDate", ncts_LimitDate)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_TransitDeclarationType", ncts_TransitDeclarationType)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_GrossMass", ncts_GrossMass)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_BindingItinerary", ncts_BindingItinerary)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_ContainerIndicator", ncts_ContainerIndicator)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_InlandModeOfTransport", ncts_InlandModeOfTransport)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_DepartureTransportMeans_1_TypeOfIdentification", ncts_DepartureTransportMeans_1_TypeOfIdentification)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_DepartureTransportMeans_1_IdentificationNumber", ncts_DepartureTransportMeans_1_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_DepartureTransportMeans_1_Nationality", ncts_DepartureTransportMeans_1_Nationality)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_DepartureTransportMeans_2_TypeOfIdentification", ncts_DepartureTransportMeans_2_TypeOfIdentification)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_DepartureTransportMeans_2_IdentificationNumber", ncts_DepartureTransportMeans_2_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_DepartureTransportMeans_2_Nationality", ncts_DepartureTransportMeans_2_Nationality)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_DepartureTransportMeans_3_TypeOfIdentification", ncts_DepartureTransportMeans_3_TypeOfIdentification)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_DepartureTransportMeans_3_IdentificationNumber", ncts_DepartureTransportMeans_3_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_DepartureTransportMeans_3_Nationality", ncts_DepartureTransportMeans_3_Nationality)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_DepartureTransportMeans_4_TypeOfIdentification", ncts_DepartureTransportMeans_4_TypeOfIdentification)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_DepartureTransportMeans_4_IdentificationNumber", ncts_DepartureTransportMeans_4_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_DepartureTransportMeans_4_Nationality", ncts_DepartureTransportMeans_4_Nationality)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_ActiveBorderTransportMeans_1_TypeOfIdentification", ncts_ActiveBorderTransportMeans_1_TypeOfIdentification)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_ActiveBorderTransportMeans_1_IdentificationNumber", ncts_ActiveBorderTransportMeans_1_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_ActiveBorderTransportMeans_1_Nationality", ncts_ActiveBorderTransportMeans_1_Nationality)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_ActiveBorderTransportMeans_1_CoveyanceReferenceNumber", ncts_ActiveBorderTransportMeans_1_CoveyanceReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_ActiveBorderTransportMeans_1_CustomsOfficeAtBorderDeclared", ncts_ActiveBorderTransportMeans_1_CustomsOfficeAtBorderDeclared)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_ActiveBorderTransportMeans_2_TypeOfIdentification", ncts_ActiveBorderTransportMeans_2_TypeOfIdentification)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_ActiveBorderTransportMeans_2_IdentificationNumber", ncts_ActiveBorderTransportMeans_2_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_ActiveBorderTransportMeans_2_Nationality", ncts_ActiveBorderTransportMeans_2_Nationality)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_ActiveBorderTransportMeans_2_CoveyanceReferenceNumber", ncts_ActiveBorderTransportMeans_2_CoveyanceReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_ActiveBorderTransportMeans_2_CustomsOfficeAtBorderDeclared", ncts_ActiveBorderTransportMeans_2_CustomsOfficeAtBorderDeclared)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_ActiveBorderTransportMeans_3_TypeOfIdentification", ncts_ActiveBorderTransportMeans_3_TypeOfIdentification)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_ActiveBorderTransportMeans_3_IdentificationNumber", ncts_ActiveBorderTransportMeans_3_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_ActiveBorderTransportMeans_3_Nationality", ncts_ActiveBorderTransportMeans_3_Nationality)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_ActiveBorderTransportMeans_3_CoveyanceReferenceNumber", ncts_ActiveBorderTransportMeans_3_CoveyanceReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_ActiveBorderTransportMeans_3_CustomsOfficeAtBorderDeclared", ncts_ActiveBorderTransportMeans_3_CustomsOfficeAtBorderDeclared)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_ActiveBorderTransportMeans_4_TypeOfIdentification", ncts_ActiveBorderTransportMeans_4_TypeOfIdentification)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_ActiveBorderTransportMeans_4_IdentificationNumber", ncts_ActiveBorderTransportMeans_4_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_ActiveBorderTransportMeans_4_Nationality", ncts_ActiveBorderTransportMeans_4_Nationality)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_ActiveBorderTransportMeans_4_CoveyanceReferenceNumber", ncts_ActiveBorderTransportMeans_4_CoveyanceReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_ActiveBorderTransportMeans_4_CustomsOfficeAtBorderDeclared", ncts_ActiveBorderTransportMeans_4_CustomsOfficeAtBorderDeclared)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Authorisation_1_Type", ncts_Authorisation_1_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Authorisation_1_ReferenceNumber", ncts_Authorisation_1_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Authorisation_2_Type", ncts_Authorisation_2_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Authorisation_2_ReferenceNumber", ncts_Authorisation_2_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Authorisation_3_Type", ncts_Authorisation_3_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Authorisation_3_ReferenceNumber", ncts_Authorisation_3_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Authorisation_4_Type", ncts_Authorisation_4_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Authorisation_4_ReferenceNumber", ncts_Authorisation_4_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Authorisation_5_Type", ncts_Authorisation_5_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Authorisation_5_ReferenceNumber", ncts_Authorisation_5_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Authorisation_6_Type", ncts_Authorisation_6_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Authorisation_6_ReferenceNumber", ncts_Authorisation_6_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Authorisation_7_Type", ncts_Authorisation_7_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Authorisation_7_ReferenceNumber", ncts_Authorisation_7_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Authorisation_8_Type", ncts_Authorisation_8_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Authorisation_8_ReferenceNumber", ncts_Authorisation_8_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Authorisation_9_Type", ncts_Authorisation_9_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Authorisation_9_ReferenceNumber", ncts_Authorisation_9_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Consignor_AdressCode", ncts_Consignor_AdressCode)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Consignor_IdentificationNumber", ncts_Consignor_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Consignor_SubsidiaryNumber", ncts_Consignor_SubsidiaryNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Consignor_Name", ncts_Consignor_Name)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Consignor_StreetNumber", ncts_Consignor_StreetNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Consignor_City", ncts_Consignor_City)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Consignor_Postcode", ncts_Consignor_Postcode)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Consignor_Country", ncts_Consignor_Country)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Consignor_ContactPerson_Name", ncts_Consignor_ContactPerson_Name)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Consignor_ContactPerson_PhoneNumber", ncts_Consignor_ContactPerson_PhoneNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Consignor_ContactPerson_EMailAddress", ncts_Consignor_ContactPerson_EMailAddress)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Consignee_AdressCode", ncts_Consignee_AdressCode)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Consignee_IdentificationNumber", ncts_Consignee_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Consignee_SubsidiaryNumber", ncts_Consignee_SubsidiaryNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Consignee_Name", ncts_Consignee_Name)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Consignee_StreetNumber", ncts_Consignee_StreetNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Consignee_City", ncts_Consignee_City)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Consignee_Postcode", ncts_Consignee_Postcode)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Consignee_Country", ncts_Consignee_Country)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Consignee_ContactPerson_Name", ncts_Consignee_ContactPerson_Name)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Consignee_ContactPerson_PhoneNumber", ncts_Consignee_ContactPerson_PhoneNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Consignee_ContactPerson_EMailAddress", ncts_Consignee_ContactPerson_EMailAddress)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_HolderOfTheTransitProcedure_AdressCode", ncts_HolderOfTheTransitProcedure_AdressCode)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_HolderOfTheTransitProcedure_IdentificationNumber", ncts_HolderOfTheTransitProcedure_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_HolderOfTheTransitProcedure_TIRHolderIdentificationNumber", ncts_HolderOfTheTransitProcedure_TIRHolderIdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_HolderOfTheTransitProcedure_Name", ncts_HolderOfTheTransitProcedure_Name)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_HolderOfTheTransitProcedure_StreetNumber", ncts_HolderOfTheTransitProcedure_StreetNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_HolderOfTheTransitProcedure_City", ncts_HolderOfTheTransitProcedure_City)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_HolderOfTheTransitProcedure_Postcode", ncts_HolderOfTheTransitProcedure_Postcode)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_HolderOfTheTransitProcedure_Country", ncts_HolderOfTheTransitProcedure_Country)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_HolderOfTheTransitProcedure_ContactPerson_Name", ncts_HolderOfTheTransitProcedure_ContactPerson_Name)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_HolderOfTheTransitProcedure_ContactPerson_PhoneNumber", ncts_HolderOfTheTransitProcedure_ContactPerson_PhoneNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_HolderOfTheTransitProcedure_ContactPerson_EMailAddress", ncts_HolderOfTheTransitProcedure_ContactPerson_EMailAddress)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Representative_AdressCode", ncts_Representative_AdressCode)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Representative_IdentificationNumber", ncts_Representative_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Representative_ContactPerson_Name", ncts_Representative_ContactPerson_Name)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Representative_ContactPerson_PhoneNumber", ncts_Representative_ContactPerson_PhoneNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Representative_ContactPerson_EMailAddress", ncts_Representative_ContactPerson_EMailAddress)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalSupplyChainActor_1_Role", ncts_AdditionalSupplyChainActor_1_Role)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalSupplyChainActor_1_IdentificationNumber", ncts_AdditionalSupplyChainActor_1_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalSupplyChainActor_2_Role", ncts_AdditionalSupplyChainActor_2_Role)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalSupplyChainActor_2_IdentificationNumber", ncts_AdditionalSupplyChainActor_2_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalSupplyChainActor_3_Role", ncts_AdditionalSupplyChainActor_3_Role)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalSupplyChainActor_3_IdentificationNumber", ncts_AdditionalSupplyChainActor_3_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalSupplyChainActor_4_Role", ncts_AdditionalSupplyChainActor_4_Role)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalSupplyChainActor_4_IdentificationNumber", ncts_AdditionalSupplyChainActor_4_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalSupplyChainActor_5_Role", ncts_AdditionalSupplyChainActor_5_Role)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalSupplyChainActor_5_IdentificationNumber", ncts_AdditionalSupplyChainActor_5_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalSupplyChainActor_6_Role", ncts_AdditionalSupplyChainActor_6_Role)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalSupplyChainActor_6_IdentificationNumber", ncts_AdditionalSupplyChainActor_6_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalSupplyChainActor_7_Role", ncts_AdditionalSupplyChainActor_7_Role)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalSupplyChainActor_7_IdentificationNumber", ncts_AdditionalSupplyChainActor_7_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalSupplyChainActor_8_Role", ncts_AdditionalSupplyChainActor_8_Role)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalSupplyChainActor_8_IdentificationNumber", ncts_AdditionalSupplyChainActor_8_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalSupplyChainActor_9_Role", ncts_AdditionalSupplyChainActor_9_Role)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalSupplyChainActor_9_IdentificationNumber", ncts_AdditionalSupplyChainActor_9_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Security", ncts_Security)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_ReferenceNumberUCR", ncts_ReferenceNumberUCR)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SpecificCircomstanceIndicator", ncts_SpecificCircomstanceIndicator)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_PlaceOfLoading_Location", ncts_PlaceOfLoading_Location)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_PlaceOfLoading_Country", ncts_PlaceOfLoading_Country)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_PlaceOfUnLoading_Location", ncts_PlaceOfUnLoading_Location)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_PlaceOfUnLoading_Country", ncts_PlaceOfUnLoading_Country)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_TransportCharges", ncts_TransportCharges)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CountryOfRoutingOfConsignment_1", ncts_CountryOfRoutingOfConsignment_1)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CountryOfRoutingOfConsignment_2", ncts_CountryOfRoutingOfConsignment_2)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CountryOfRoutingOfConsignment_3", ncts_CountryOfRoutingOfConsignment_3)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CountryOfRoutingOfConsignment_4", ncts_CountryOfRoutingOfConsignment_4)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CountryOfRoutingOfConsignment_5", ncts_CountryOfRoutingOfConsignment_5)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CountryOfRoutingOfConsignment_6", ncts_CountryOfRoutingOfConsignment_6)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CountryOfRoutingOfConsignment_7", ncts_CountryOfRoutingOfConsignment_7)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CountryOfRoutingOfConsignment_8", ncts_CountryOfRoutingOfConsignment_8)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CountryOfRoutingOfConsignment_9", ncts_CountryOfRoutingOfConsignment_9)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CountryOfRoutingOfConsignment_10", ncts_CountryOfRoutingOfConsignment_10)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CountryOfRoutingOfConsignment_11", ncts_CountryOfRoutingOfConsignment_11)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CountryOfRoutingOfConsignment_12", ncts_CountryOfRoutingOfConsignment_12)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CountryOfRoutingOfConsignment_13", ncts_CountryOfRoutingOfConsignment_13)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CountryOfRoutingOfConsignment_14", ncts_CountryOfRoutingOfConsignment_14)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_CountryOfRoutingOfConsignment_15", ncts_CountryOfRoutingOfConsignment_15)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Carrier_AdressCode", ncts_Carrier_AdressCode)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Carrier_IdentificationNumber", ncts_Carrier_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Carrier_SubsidiaryNumber", ncts_Carrier_SubsidiaryNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Carrier_ContactPerson_Name", ncts_Carrier_ContactPerson_Name)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Carrier_ContactPerson_PhoneNumber", ncts_Carrier_ContactPerson_PhoneNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Carrier_ContactPerson_EMailAddress", ncts_Carrier_ContactPerson_EMailAddress)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_1_Type", ncts_SupportingDocument_1_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_1_ReferenceNumber", ncts_SupportingDocument_1_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_1_DocumentLineItemNumber", ncts_SupportingDocument_1_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_1_ComplementOfInformation", ncts_SupportingDocument_1_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_2_Type", ncts_SupportingDocument_2_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_2_ReferenceNumber", ncts_SupportingDocument_2_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_2_DocumentLineItemNumber", ncts_SupportingDocument_2_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_2_ComplementOfInformation", ncts_SupportingDocument_2_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_3_Type", ncts_SupportingDocument_3_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_3_ReferenceNumber", ncts_SupportingDocument_3_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_3_DocumentLineItemNumber", ncts_SupportingDocument_3_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_3_ComplementOfInformation", ncts_SupportingDocument_3_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_4_Type", ncts_SupportingDocument_4_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_4_ReferenceNumber", ncts_SupportingDocument_4_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_4_DocumentLineItemNumber", ncts_SupportingDocument_4_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_4_ComplementOfInformation", ncts_SupportingDocument_4_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_5_Type", ncts_SupportingDocument_5_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_5_ReferenceNumber", ncts_SupportingDocument_5_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_5_DocumentLineItemNumber", ncts_SupportingDocument_5_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_5_ComplementOfInformation", ncts_SupportingDocument_5_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_6_Type", ncts_SupportingDocument_6_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_6_ReferenceNumber", ncts_SupportingDocument_6_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_6_DocumentLineItemNumber", ncts_SupportingDocument_6_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_6_ComplementOfInformation", ncts_SupportingDocument_6_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_7_Type", ncts_SupportingDocument_7_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_7_ReferenceNumber", ncts_SupportingDocument_7_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_7_DocumentLineItemNumber", ncts_SupportingDocument_7_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_7_ComplementOfInformation", ncts_SupportingDocument_7_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_8_Type", ncts_SupportingDocument_8_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_8_ReferenceNumber", ncts_SupportingDocument_8_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_8_DocumentLineItemNumber", ncts_SupportingDocument_8_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_8_ComplementOfInformation", ncts_SupportingDocument_8_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_9_Type", ncts_SupportingDocument_9_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_9_ReferenceNumber", ncts_SupportingDocument_9_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_9_DocumentLineItemNumber", ncts_SupportingDocument_9_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_SupportingDocument_9_ComplementOfInformation", ncts_SupportingDocument_9_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_TransportDocument_1_Type", ncts_TransportDocument_1_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_TransportDocument_1_ReferenceNumber", ncts_TransportDocument_1_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_TransportDocument_2_Type", ncts_TransportDocument_2_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_TransportDocument_2_ReferenceNumber", ncts_TransportDocument_2_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_TransportDocument_3_Type", ncts_TransportDocument_3_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_TransportDocument_3_ReferenceNumber", ncts_TransportDocument_3_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_TransportDocument_4_Type", ncts_TransportDocument_4_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_TransportDocument_4_ReferenceNumber", ncts_TransportDocument_4_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_TransportDocument_5_Type", ncts_TransportDocument_5_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_TransportDocument_5_ReferenceNumber", ncts_TransportDocument_5_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_TransportDocument_6_Type", ncts_TransportDocument_6_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_TransportDocument_6_ReferenceNumber", ncts_TransportDocument_6_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_TransportDocument_7_Type", ncts_TransportDocument_7_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_TransportDocument_7_ReferenceNumber", ncts_TransportDocument_7_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_TransportDocument_8_Type", ncts_TransportDocument_8_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_TransportDocument_8_ReferenceNumber", ncts_TransportDocument_8_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_TransportDocument_9_Type", ncts_TransportDocument_9_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_TransportDocument_9_ReferenceNumber", ncts_TransportDocument_9_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalReference_1_Type", ncts_AdditionalReference_1_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalReference_1_ReferenceNumber", ncts_AdditionalReference_1_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalReference_2_Type", ncts_AdditionalReference_2_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalReference_2_ReferenceNumber", ncts_AdditionalReference_2_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalReference_3_Type", ncts_AdditionalReference_3_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalReference_3_ReferenceNumber", ncts_AdditionalReference_3_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalReference_4_Type", ncts_AdditionalReference_4_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalReference_4_ReferenceNumber", ncts_AdditionalReference_4_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalReference_5_Type", ncts_AdditionalReference_5_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalReference_5_ReferenceNumber", ncts_AdditionalReference_5_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalReference_6_Type", ncts_AdditionalReference_6_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalReference_6_ReferenceNumber", ncts_AdditionalReference_6_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalReference_7_Type", ncts_AdditionalReference_7_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalReference_7_ReferenceNumber", ncts_AdditionalReference_7_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalReference_8_Type", ncts_AdditionalReference_8_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalReference_8_ReferenceNumber", ncts_AdditionalReference_8_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalReference_9_Type", ncts_AdditionalReference_9_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalReference_9_ReferenceNumber", ncts_AdditionalReference_9_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalInformation_1_Code", ncts_AdditionalInformation_1_Code)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalInformation_1_Text", ncts_AdditionalInformation_1_Text)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalInformation_2_Code", ncts_AdditionalInformation_2_Code)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalInformation_2_Text", ncts_AdditionalInformation_2_Text)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalInformation_3_Code", ncts_AdditionalInformation_3_Code)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalInformation_3_Text", ncts_AdditionalInformation_3_Text)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalInformation_4_Code", ncts_AdditionalInformation_4_Code)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalInformation_4_Text", ncts_AdditionalInformation_4_Text)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalInformation_5_Code", ncts_AdditionalInformation_5_Code)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalInformation_5_Text", ncts_AdditionalInformation_5_Text)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalInformation_6_Code", ncts_AdditionalInformation_6_Code)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalInformation_6_Text", ncts_AdditionalInformation_6_Text)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalInformation_7_Code", ncts_AdditionalInformation_7_Code)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalInformation_7_Text", ncts_AdditionalInformation_7_Text)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalInformation_8_Code", ncts_AdditionalInformation_8_Code)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalInformation_8_Text", ncts_AdditionalInformation_8_Text)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalInformation_9_Code", ncts_AdditionalInformation_9_Code)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AdditionalInformation_9_Text", ncts_AdditionalInformation_9_Text)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_AUTOIMPIndicator", ncts_AUTOIMPIndicator)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Stammreferenz", ncts_Stammreferenz)) + + + + Return list + End Function + + Public Function UPDATE_STATUS(status) As Boolean + Me.ncts_Status = status + Return Me.SAVE + End Function + + Public Function SAVE(Optional errHinweis = "") As Boolean + Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList() + + Dim sqlstr = " BEGIN TRAN IF EXISTS(SELECT * FROM tblDakosy_NCTSOut004 WITH(updlock,serializable) WHERE ncts_Id=@ncts_Id) " & + " BEGIN " & getUpdateCmd() & " END " & + " Else " & + " BEGIN " & getInsertCmd() & " END " & + " commit tran " + + Dim ncts_IdTMP = ncts_Id + ncts_IdTMP = SQL.doSQLVarListID(ncts_IdTMP, sqlstr, "FMZOLL", , list, , errHinweis) + If ncts_Id <= 0 Then ncts_Id = ncts_IdTMP + Return ncts_Id > 0 + End Function + + Public Function SAVE_ALL(Optional errHinweis = "") As Boolean + If Not SAVE(errHinweis) Then Return False + If Not SAVE_Guarantee() Or Not SAVE_TransportEquipment() Or Not SAVE_HouseConsignment() Then Return False + + Return True + End Function + + Public Function LOAD(Optional loadALL As Boolean = True) As Boolean + Try + LOAD = False + If loadALL Then + ncts_GUARANTEE.Clear() + ncts_HOUSE_CONSIGNMENT.Clear() + ncts_TRANSPORTEQUIPMENT.Clear() + End If + Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL() + Using cmd As New SqlCommand("SELECT * FROM tblDakosy_NCTSOut004 WHERE ncts_Id=@ncts_Id ", conn) + cmd.Parameters.AddWithValue("@ncts_Id", ncts_Id) + Dim dr = cmd.ExecuteReader() + If dr.Read Then + For Each l In getParameterList() + Dim propInfo As PropertyInfo = Me.GetType.GetProperty(l.Scalarvariable) + + If dr.Item(l.Text) Is DBNull.Value Then + propInfo.SetValue(Me, Nothing) + Else + propInfo.SetValue(Me, dr.Item(l.Text)) + End If + + Next + If loadALL Then + LOAD_GUARANTEE() + LOAD_HouseConsignment() + LOAD_TransportEquipment() + End If + LOAD = True + End If + dr.Close() + + End Using + End Using + Catch ex As Exception + MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + End Try + Return LOAD + End Function + + + Shared Function LOADByAnmIDFull(ncts_dyaAnmID As String, loadALL As Boolean) As cDakosyNCTSOut004 + Try + Dim NCTS As New cDakosyNCTSOut004 + Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL + + Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL() + Using cmd As New SqlCommand("SELECT TOP 1 * FROM tblDakosy_NCTSOut004 WHERE ncts_dyaAnmID=@ncts_dyaAnmID ", conn) + cmd.Parameters.AddWithValue("@ncts_dyaAnmID", ncts_dyaAnmID) + Dim dr = cmd.ExecuteReader() + If dr.Read Then + For Each l In NCTS.getParameterList() + Dim propInfo As PropertyInfo = NCTS.GetType.GetProperty(l.Scalarvariable) + + If dr.Item(l.Text) Is DBNull.Value Then + propInfo.SetValue(NCTS, Nothing) + Else + propInfo.SetValue(NCTS, dr.Item(l.Text)) + End If + + Next + If loadALL Then + NCTS.LOAD_Guarantee() + NCTS.LOAD_HouseConsignment() + NCTS.LOAD_TransportEquipment() + End If + + dr.Close() + Return NCTS + End If + dr.Close() + End Using + End Using + Catch ex As Exception + MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + End Try + Return Nothing + End Function + + Shared Function UPDATE_StatusById(ncts_Id As Integer, status As Integer) As String + If ncts_Id > 0 Then + Try + Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Id", ncts_Id, , True)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Status_KEWILL_Equivalent", status, , True)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Status", status, , True)) + 'dy_Status_KEWILL_Equivalent = status + 'dy_Status = status + Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL + + Return SQL.doSQLVarList(" UPDATE [tblDakosy_NCTSOut004] SET ncts_Status_KEWILL_Equivalent=@ncts_Status_KEWILL_Equivalent,ncts_Status=@ncts_Status WHERE ncts_Id=@ncts_Id ", "FMZOLL", , list) + + Catch ex As Exception + MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + End Try + End If + Return "" + End Function + + + Public Function LOADByAnmID(ncts_dyaAnmID As String, loadALL As Boolean) As Boolean + Try + LOADByAnmID = False + If loadALL Then + ncts_GUARANTEE.Clear() + ncts_HOUSE_CONSIGNMENT.Clear() + ncts_TRANSPORTEQUIPMENT.Clear() + End If + Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL() + Using cmd As New SqlCommand("SELECT TOP 1 * FROM tblDakosy_NCTSOut004 WHERE ncts_dyaAnmID=@ncts_dyaAnmID ", conn) + cmd.Parameters.AddWithValue("@ncts_dyaAnmID", ncts_dyaAnmID) + Dim dr = cmd.ExecuteReader() + If dr.Read Then + For Each l In getParameterList() + Dim propInfo As PropertyInfo = Me.GetType.GetProperty(l.Scalarvariable) + + If dr.Item(l.Text) Is DBNull.Value Then + propInfo.SetValue(Me, Nothing) + Else + propInfo.SetValue(Me, dr.Item(l.Text)) + End If + + Next + If loadALL Then + LOAD_GUARANTEE() + LOAD_HouseConsignment() + LOAD_TransportEquipment() + End If + LOADByAnmID = True + End If + dr.Close() + End Using + End Using + Catch ex As Exception + MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + End Try + Return LOADByAnmID + End Function + Shared Function LOADByBezugsNr(bezugsNr As String, loadALL As Boolean, Optional checkValidStatus As Boolean = False) As cDakosyNCTSOut004 + Try + Dim NCTS As New cDakosyNCTSOut004 + Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL + + Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL() + ' Using cmd As New SqlCommand("SELECT TOP 1 * FROM (SELECT * FROM tblDakosy_NCTSOut WHERE ncts_ObjectName LIKE @bezugsNr " & If(checkValidStatus, " AND ncts_status BETWEEN 40 and 90 ", "") & " ) AS T order by ncts_status desc, (SELECT top 1 dySt_ts FROM [tblDakosy_Statusmeldungen] WHERE ncts_dyaAnmID=ncts_dyaAnmID order by dySt_ts desc) desc,ncts_LetzteBearbeitung desc ", conn) + 'Using cmd As New SqlCommand("SELECT TOP 1 * FROM tblDakosy_NCTSOut WHERE ncts_ObjectName LIKE @bezugsNr " & If(checkValidStatus, " AND ncts_status BETWEEN 40 and 90 ", "") & " order by ncts_status desc, (SELECT top 1 dySt_ts FROM [tblDakosy_Statusmeldungen] WHERE ncts_dyaAnmID=ncts_dyaAnmID order by dySt_ts desc) desc,ncts_LetzteBearbeitung desc ", conn) + Using cmd As New SqlCommand("SELECT TOP 1 * FROM tblDakosy_NCTSOut004 WHERE ncts_ObjectName LIKE @bezugsNr " & If(checkValidStatus, " AND ncts_status BETWEEN 40 and 90 ", "") & " order by ncts_LetzteBearbeitung desc", conn) + 'MsgBox("SELECT TOP 1 * FROM tblDakosy_NCTSOut WHERE ncts_ObjectName LIKE " & bezugsNr & " " & If(checkValidStatus, " AND ncts_status BETWEEN 40 and 90 ", "") & " order by ncts_status desc, (SELECT top 1 dySt_ts FROM [tblDakosy_Statusmeldungen] inner join tblDakosy_Zollanmeldungen on dy_id = dySt_dyId WHERE ncts_dyaAnmID=dy_id order by dySt_ts desc) desc,ncts_LetzteBearbeitung desc ") + cmd.Parameters.AddWithValue("@bezugsNr", bezugsNr) + Dim dr = cmd.ExecuteReader() + If dr.Read Then + For Each l In NCTS.getParameterList() + Dim propInfo As PropertyInfo = NCTS.GetType.GetProperty(l.Scalarvariable) + + If dr.Item(l.Text) Is DBNull.Value Then + propInfo.SetValue(NCTS, Nothing) + Else + propInfo.SetValue(NCTS, dr.Item(l.Text)) + End If + + Next + If loadALL Then + NCTS.LOAD_Guarantee() + NCTS.LOAD_HouseConsignment() + NCTS.LOAD_TransportEquipment() + + End If + + dr.Close() + Return NCTS + End If + dr.Close() + End Using + End Using + Catch ex As Exception + MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + End Try + Return Nothing + End Function + + + Public Function UPDATE_Status(status As Integer) As String + If ncts_Id > 0 Then + Try + Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Id", ncts_Id, , True)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Status", status, , True)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("ncts_Status_KEWILL_Equivalent", status, , True)) + ncts_Status = status + ncts_Status_KEWILL_Equivalent = status + Return SQL.doSQLVarList(" UPDATE [tblDakosy_NCTSOut004] SET ncts_Status_KEWILL_Equivalent=@ncts_Status_KEWILL_Equivalent,ncts_Status=@ncts_Status WHERE ncts_Id=@ncts_Id ", "FMZOLL", , list) + + Catch ex As Exception + MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + End Try + End If + Return "" + End Function + + + Public Function getUpdateCmd() As String + Try + Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList() + + Dim str As String = "" + For Each i In list + If Not i.isPrimaryParam Then + str &= "[" & i.Text & "] = @" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & "," + End If + Next + str = str.Substring(0, str.Length - 1) 'wg. ',' + Return (" UPDATE [tblDakosy_NCTSOut004] SET " & str & " WHERE ncts_Id=@ncts_Id ") + + Catch ex As Exception + MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + End Try + Return "" + End Function + + + Public Function getInsertCmd() As String + Try + Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList() + Dim str As String = "" + Dim values As String = "" + For Each i In list + If Not i.isPrimaryParam Then + str &= "[" & i.Text & "]," + values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & "," + End If + Next + str = str.Substring(0, str.Length - 1) 'wg. ',' + values = values.Substring(0, values.Length - 1) 'wg. ',' + Return (" INSERT INTO tblDakosy_NCTSOut004 (" & str & ") VALUES(" & values & ") ") + Catch ex As Exception + MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + End Try + Return "" + End Function + + Public Sub LOAD_Guarantee() + Try + ncts_GUARANTEE.Clear() + Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL() + Using cmd As New SqlCommand("SELECT * FROM tblDakosy_NCTSOut004_Guarantee WHERE nctsGRT_NctsId=@ncts_Id ", conn) + cmd.Parameters.AddWithValue("@ncts_Id", Me.ncts_Id) + Dim dr = cmd.ExecuteReader() + While dr.Read + Dim l As New cDakosy_NCTSOut004_Guarantee + For Each i In l.getParameterList() + Dim propInfo As PropertyInfo = l.GetType.GetProperty(i.Scalarvariable) + If dr.Item(i.Text) Is DBNull.Value Then + propInfo.SetValue(l, Nothing) + Else + propInfo.SetValue(l, dr.Item(i.Text)) + End If + Next + ncts_GUARANTEE.Add(l) + End While + dr.Close() + End Using + End Using + Catch ex As Exception + MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + End Try + End Sub + Public Sub LOAD_TransportEquipment() + Try + ncts_TRANSPORTEQUIPMENT.Clear() + Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL() + Using cmd As New SqlCommand("SELECT * FROM tblDakosy_NCTSOut004_TransportEquipment WHERE nctsTE_NctsId=@ncts_Id ", conn) + cmd.Parameters.AddWithValue("@ncts_Id", Me.ncts_Id) + Dim dr = cmd.ExecuteReader() + While dr.Read + Dim l As New cDakosy_NCTSOut004_TransportEquipment + For Each i In l.getParameterList() + Dim propInfo As PropertyInfo = l.GetType.GetProperty(i.Scalarvariable) + If dr.Item(i.Text) Is DBNull.Value Then + propInfo.SetValue(l, Nothing) + Else + propInfo.SetValue(l, dr.Item(i.Text)) + End If + Next + ncts_TRANSPORTEQUIPMENT.Add(l) + End While + dr.Close() + End Using + End Using + Catch ex As Exception + MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + End Try + End Sub + + Public Sub LOAD_HouseConsignment() + Try + ncts_HOUSE_CONSIGNMENT.Clear() + Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL() + Using cmd As New SqlCommand("SELECT * FROM tblDakosy_NCTSOut004_HouseConsignment WHERE nctsWP_NctsId=@ncts_Id ", conn) + cmd.Parameters.AddWithValue("@ncts_Id", Me.ncts_Id) + Dim dr = cmd.ExecuteReader() + While dr.Read + Dim l As New cDakosy_NCTSOut004_HouseConsignment + For Each i In l.getParameterList() + Dim propInfo As PropertyInfo = l.GetType.GetProperty(i.Scalarvariable) + If dr.Item(i.Text) Is DBNull.Value Then + propInfo.SetValue(l, Nothing) + Else + propInfo.SetValue(l, dr.Item(i.Text)) + End If + Next + l.LOAD_ConsignmentItem() + ncts_HOUSE_CONSIGNMENT.Add(l) + End While + dr.Close() + End Using + End Using + Catch ex As Exception + MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + End Try + End Sub + + + Public Shared Function get_HOUSE_CONSIGNMENT(ncts_Id As Integer, Optional loadAll As Boolean = False) As List(Of cDakosy_NCTSOut004_HouseConsignment) + Try + Dim ncts_HOUSE_CONSIGNMENT As New List(Of cDakosy_NCTSOut004_HouseConsignment) + Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL + Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL() + Using cmd As New SqlCommand("SELECT * FROM tblDakosy_NCTSOut004_HouseConsignment WHERE nctsHC_NctsId=@ncts_Id ", conn) + cmd.Parameters.AddWithValue("@ncts_Id", ncts_Id) + Dim dr = cmd.ExecuteReader() + While dr.Read + Dim l As New cDakosy_NCTSOut004_HouseConsignment() + For Each i In l.getParameterList() + Dim propInfo As PropertyInfo = l.GetType.GetProperty(i.Scalarvariable) + If dr.Item(i.Text) Is DBNull.Value Then + propInfo.SetValue(l, Nothing) + Else + propInfo.SetValue(l, dr.Item(i.Text)) + End If + Next + l.LOAD_ConsignmentItem() + ncts_HOUSE_CONSIGNMENT.Add(l) + End While + dr.Close() + End Using + End Using + Return ncts_HOUSE_CONSIGNMENT + Catch ex As Exception + MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + End Try + Return Nothing + End Function + + Function DELETE_HouseConsignment() As Boolean 'obj As Object, tablename As String, where As String) As Boolean + Dim sqlstr = " DELETE FROM [tblDakosy_NCTSOut004_HouseConsignment] WHERE nctsHC_NctsId=" & Me.ncts_Id & " " + ' MsgBox(sqlstr) + Return SQL.doSQL(sqlstr, "FMZOLL") + End Function + + Function DELETE_ConsignmentItem() As Boolean 'obj As Object, tablename As String, where As String) As Boolean + Dim sqlstr = " DELETE FROM [tblDakosy_NCTSOut004_HouseConsignment_ConsignmentItem] WHERE nctsHCCI_NctsId=" & Me.ncts_Id & " " + Return SQL.doSQL(sqlstr, "FMZOLL") + End Function + + Function DELETE_ConsignmentItem_Packaging() As Boolean 'obj As Object, tablename As String, where As String) As Boolean + Dim sqlstr = " DELETE FROM [tblDakosy_NCTSOut004_HouseConsignment_ConsignmentItem_Packaging] WHERE nctsHCCIPK_NctsId =" & Me.ncts_Id & " " + Return SQL.doSQL(sqlstr, "FMZOLL") + End Function + + + ' If Not SAVE_Guarantee() Or Not SAVE_TransportEquipment() Or Not SAVE_HouseConsignment + Public Function SAVE_HouseConsignment() As Boolean + 'Zuserst alle OffertenPos von dem Offert löschen + If DELETE_HouseConsignment() And DELETE_ConsignmentItem() And DELETE_ConsignmentItem_Packaging() Then + 'jetzt die Standartofferten einfügen + For Each p In ncts_HOUSE_CONSIGNMENT + p.nctsHC_NctsId = ncts_Id + If p.INSERT() Then + p.INSERT_ConsignmentItem(p.nctsHC_Id, Me.ncts_Id) + Else + Return False + End If + Next + Else + Return False + End If + + Return True + End Function + + 'Public Function SAVE_Warenposition() As Boolean + ' 'Zuserst alle OffertenPos von dem Offert löschen + ' If DELETE_Warenpositionen() And DELETE_WarenpositionPackstuecke() And DELETE_WarenpositionUnterlagen() Then + ' 'jetzt die Standartofferten einfügen + ' For Each p In ncts_WARENPOS + ' p.nctsWP_NctsId = ncts_Id + ' If p.INSERT() Then + ' p.INSERT_WarenpositionPackstuecke(p.nctsWP_Id, Me.ncts_Id) + ' p.INSERT_WarenpositionUnterlagen(p.nctsWP_Id, Me.ncts_Id) + ' Else + ' Return False + ' End If + ' Next + ' Else + ' Return False + ' End If + + ' Return True + 'End Function + + Function DELETE_Guarantee() As Boolean 'obj As Object, tablename As String, where As String) As Boolean + Dim sqlstr = " DELETE FROM [tblDakosy_NCTSOut004_Guarantee] WHERE nctsGRT_NctsId=" & Me.ncts_Id & " " + Return SQL.doSQL(sqlstr, "FMZOLL") + End Function + + Public Function SAVE_Guarantee() As Boolean + 'Zuserst alle OffertenPos von dem Offert löschen + If DELETE_Guarantee() Then + 'jetzt die Standartofferten einfügen + For Each p In ncts_GUARANTEE + p.nctsGRT_NctsId = ncts_Id + If Not p.INSERT() Then + Return False + End If + Next + Else + Return False + End If + Return True + End Function + + Function DELETE_TransportEquipment() As Boolean 'obj As Object, tablename As String, where As String) As Boolean + Dim sqlstr = " DELETE FROM [tblDakosy_NCTSOut004_TransportEquipment] WHERE nctsTE_NctsId=" & Me.ncts_Id & " " + Return SQL.doSQL(sqlstr, "FMZOLL") + End Function + + Public Function SAVE_TransportEquipment() As Boolean + 'Zuserst alle OffertenPos von dem Offert löschen + If DELETE_TransportEquipment() Then + 'jetzt die Standartofferten einfügen + For Each p In ncts_TRANSPORTEQUIPMENT + p.nctsTE_NctsId = ncts_Id + If Not p.INSERT() Then + Return False + End If + Next + Else + Return False + End If + Return True + End Function + + Function countSpedbuchEntrys(filiale, ncts) As Integer + If If(ncts, "") = "" Then Return 0 + Return SQL.getValueTxtBySqlVarList("SELECT isnull(count(*),0) FROM Speditionsbuch WHERE [FilialenNr]='" & filiale & "' AND AtlasBezNrNCTS='" & ncts & "'", "FMZOLL") + End Function + + + + Function countSpedbuchEntrysFilialeAbf(filiale, abfertigungsnummer) As Integer + If If(abfertigungsnummer, "") = "" Then Return 0 + Return SQL.getValueTxtBySqlVarList("SELECT isnull(count(*),0) FROM Speditionsbuch WHERE [FilialenNr]='" & filiale & "' AND AbfertigungsNr='" & abfertigungsnummer & "'", "FMZOLL") + End Function + + + Function insertIntoSpedBuch(DY As cDakosy_Zollanmeldungen) As Boolean + Dim SPEDBUCH As New VERAG_PROG_ALLGEMEIN.cSpeditionsbuch + If False Then 'If(Me.ncts_firma, "") = "IMEX" Then + + 'If countSpedbuchEntrys(5501, Me.ncts_ObjectName) = 0 Then + ' SPEDBUCH.FilialenNr = 5501 + ' SPEDBUCH.AbfertigungsNr = VERAG_PROG_ALLGEMEIN.cAllgemein.getMaxPosNrIncrement(SPEDBUCH.FilialenNr, Now.Year) + ' SPEDBUCH.NewUNTER_NR() + ' 'SPEDBUCH.Abfertigungsart= If dy. + + ' SPEDBUCH.AtlasBezNrNCTS = Me.ncts_ObjectName + ' SPEDBUCH.Zollsystem = "D" + ' SPEDBUCH.Fakturiert = 1 + ' SPEDBUCH.Sachbearbeiter = "AUTO" + + ' Dim notfound = False + ' DakosyNCTSDatenbereitstellung(SPEDBUCH, Me.ncts_ObjectName, notfound) + + ' If Not notfound Then + ' Return SPEDBUCH.SAVE + ' Else + ' Return False + ' End If + 'End If + + 'If DY.dy_SendungsId IsNot Nothing Then + + 'Else + ' Return False 'Ohne Sendungsverweis kein eintrag... + 'End If + + 'Return SPEDBUCH.SAVE + Else + Dim firmaTmp = VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA + VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = If(If(Me.ncts_firma, "") <> "", Me.ncts_firma, "VERAG") + If DY.dy_SendungsId IsNot Nothing Then + 'Filiale erkennen: + Dim filialeBez = "" + Dim filiale = getFiliale(Me.ncts_ObjectName, filialeBez) + Dim abfertigungsnummer = getAbfertigungsnummer(Me.ncts_ObjectName) + + If abfertigungsnummer = "" Then + getFilialeAbfertigungsnummerFromSendung(filiale, abfertigungsnummer, DY.dy_SendungsId) + End If + + If filiale <> "" And abfertigungsnummer <> "" Then + ' If countSpedbuchEntrysFilialeAbf(filiale, abfertigungsnummer) = 0 Then + If countSpedbuchEntrys(filiale, Me.ncts_ObjectName) = 0 Then + ' VERAG_PROG_ALLGEMEIN.cErrorHandler.sendERRORperMail("HEUREKA NCTS ", "" & Me.ncts_ObjectName, Now.ToString("yyyy.MM.dd HH:mm"), "al@verag.ag", "") + + SPEDBUCH.FilialenNr = filiale + SPEDBUCH.AbfertigungsNr = abfertigungsnummer + SPEDBUCH.NewUNTER_NR() + + SPEDBUCH.Abfertigungsanzahl = 1 + SPEDBUCH.Fakturiert = 0 + + SPEDBUCH.AtlasBezNrNCTS = Me.ncts_ObjectName + SPEDBUCH.Zollsystem = "D" + SPEDBUCH.Sachbearbeiter = "AUTO" + + SPEDBUCH.AvisoID = DY.dy_AvisoId + SPEDBUCH.SendungID = DY.dy_SendungsId + + Dim ZOLL_IMPORT As New cZOLL_IMPORT + Dim notfound = False + Dim posAnzahl = 0 + SPEDBUCH = ZOLL_IMPORT.IMPORT(SPEDBUCH, DY.dy_AvisoId, DY.dy_SendungsId, "VERA", filialeBez, 2, "", Me.ncts_ObjectName, notfound, True) + + If notfound Then Return False + ' VERAG_PROG_ALLGEMEIN.cErrorHandler.sendERRORperMail("HEUREKA NCTS!! ", "" & Me.ncts_ObjectName, Now.ToString("yyyy.MM.dd HH:mm"), "al@verag.ag", "") + + VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = firmaTmp + If SPEDBUCH.SAVE Then + VERAG_PROG_ALLGEMEIN.cSendungen.SET_SpedbuchEntry(DY.dy_SendungsId, True) + Return True + Else + Return False + End If + End If + End If + Else + Return False 'Ohne Sendungsverweis kein eintrag... + End If + End If + Return False + + End Function + + + Shared Function getFiliale(ByVal bezugsNr, ByRef filialeBez) As String + getFiliale = "" + If If(bezugsNr, "").ToString.Length > 4 Then + Select Case bezugsNr.ToString.Substring(0, 4) + Case "4803" : Return bezugsNr.ToString.Substring(0, 4) '...... derzeit nur 4803 + Case "4811" : Return bezugsNr.ToString.Substring(0, 4) '...... derzeit nur 4803 + Case "5003" : Return bezugsNr.ToString.Substring(0, 4) '...... derzeit nur 4803 + Case "5103" : Return bezugsNr.ToString.Substring(0, 4) '...... derzeit nur 4803 + Case "5303" : Return bezugsNr.ToString.Substring(0, 4) '...... derzeit nur 4803 + Case "5501", "5601", "5701", "5801" : Return bezugsNr.ToString.Substring(0, 4) '...... derzeit nur 4803 + Case Else + If IsNumeric(bezugsNr.ToString.Substring(0, 4)) Then Return bezugsNr.ToString.Substring(0, 4) 'Case Else : Return bezugsNr.ToString.Substring(0, 4) '...... derzeit nur 4803 + 'Case "4801", "4803", "4805", "4807", "4811", "5003", "5103", "5303" : Return bezugsNr.ToString.Substring(0, 4) ...... derzeit nur 4803 + 'filialeBez SUB, NKD, WAI,.-.. + End Select + End If + End Function + + + Shared Function getAbfertigungsnummer(ByVal bezugsNr) As String + getAbfertigungsnummer = "" + If If(bezugsNr, "").ToString.Length > 5 Then + + Dim abf = "" + For Each s In bezugsNr.ToString.Substring(5) + If Not IsNumeric(s) Then Exit For + abf &= s + Next + + + If IsNumeric(abf) Then + If CLng(abf) < 99000000 Then ' wenn zu groß, fehlerhaft + If CLng(abf) > 18000000 And CLng(abf) < 99000000 Then + Return abf + Else + Return "18" & CInt(abf).ToString("000000") + End If + End If + End If + End If + Return "" + End Function + Sub getFilialeAbfertigungsnummerFromSendung(ByRef filiale, ByRef abfertigungsnummer, dy_SendungsId) + If dy_SendungsId IsNot Nothing AndAlso IsNumeric(dy_SendungsId) Then + Dim SND As New VERAG_PROG_ALLGEMEIN.cSendungen(dy_SendungsId) + If SND IsNot Nothing Then + If SND.FilialenNr > 0 Then filiale = SND.FilialenNr + If SND.AbfertigungsNr > 0 Then abfertigungsnummer = SND.AbfertigungsNr + End If + End If + End Sub + + + Public Shared Sub DakosyNCTSDatenbereitstellung(ByRef SPEDITIONSBUCH As VERAG_PROG_ALLGEMEIN.cSpeditionsbuch, NCTS_Nr As String, ByRef notFound As Boolean) + Dim DY As DAKOSY_Worker.cDakosyNCTSOut004 = DAKOSY_Worker.cDakosyNCTSOut004.LOADByBezugsNr(NCTS_Nr, True) + If DY Is Nothing Then + notFound = True + Exit Sub + End If + DakosyNCTSDatenbereitstellung(SPEDITIONSBUCH, DY, notFound) + End Sub + + Public Shared Sub DakosyNCTSDatenbereitstellung(ByRef SPEDITIONSBUCH As VERAG_PROG_ALLGEMEIN.cSpeditionsbuch, DY As DAKOSY_Worker.cDakosyNCTSOut004, ByRef notFound As Boolean) + Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL + + notFound = False + + + 'Ermittlung ob T1 oder T2 + If If(SPEDITIONSBUCH.Abfertigungsart, "") = "" Then + If If(DY.ncts_ArtAnmeldung, "").ToString.Contains("T2") Then + SPEDITIONSBUCH.Abfertigungsart = 6 + For Each s In DY.ncts_SICHERHEITSANGABEN + Select Case If(s.nctsSA_GRN, "") + Case "15TR0004000020917", "12TR0004000004665", "17TR0004000032349", "17TR0004000029518", "21TR0004000079552", "21TR0004000078157", "21TR0004000092350", "20TR0004000069756", "21TR0004000090364" : SPEDITIONSBUCH.Abfertigungsart = 34 + Case "16DE0000000068410" : SPEDITIONSBUCH.Abfertigungsart = 33 + Case "15TR0004000020908", "13TR0004000005094", "18DE0000000073276" : SPEDITIONSBUCH.Abfertigungsart = 37 + End Select + Next + ElseIf If(DY.ncts_ArtAnmeldung, "").ToString.Contains("TIR") Then + 'For Each s In DY.ncts_SICHERHEITSANGABEN + ' If If(s.nctsSA_ArtCode, "") = "B" Then + ' SPEDITIONSBUCH.Abfertigungsart = 8 + ' End If + 'Next + If DY.ncts_BestimmungslandCode = "TR" Then + SPEDITIONSBUCH.Abfertigungsart = 12 + Else + SPEDITIONSBUCH.Abfertigungsart = 8 + End If + + Else + + SPEDITIONSBUCH.Abfertigungsart = 5 + End If + + End If + VERAG_PROG_ALLGEMEIN.cAllgemein.ERR_OP_GLOBAL = VERAG_PROG_ALLGEMEIN.ERROR_OP.SHOW + Try + + Dim ANM As New DAKOSY_Worker.cDakosy_Zollanmeldungen(DY.ncts_dyaAnmID) + SPEDITIONSBUCH.DokumentId_Steuerbeleg = ANM.dy_Steuerbescheid_dsId + SPEDITIONSBUCH.DokumentId_VBD = ANM.dy_VBD_dsId + + Catch ex As Exception + MsgBox("ERR: " & ex.Message & ex.StackTrace) + + End Try + + + + + If SPEDITIONSBUCH.Abfertigungsdatum Is Nothing Then SPEDITIONSBUCH.Abfertigungsdatum = Now ' CDate(DY.ncts_Trans_DatumZeit).ToShortDateString + + SPEDITIONSBUCH.Bestimmungszollstelle = DY.ncts_CustomsOfficeOfDestinationDeclared + SPEDITIONSBUCH.Versendungsland = DY.ncts_CountryOfDispatch + SPEDITIONSBUCH.Bestimmungsland = DY.ncts_CountryOfDestination + + If DY.ncts_GUARANTEE.Count > 0 Then + SPEDITIONSBUCH.Bürgschaft = DY.ncts_GUARANTEE(0).nctsGRT_GRN + + Dim sumBrg As Double = 0 + For Each S In DY.ncts_GUARANTEE + sumBrg += If(S.nctsGRT_AmountToBeCovered, 0) + Next + If sumBrg > 0 Then SPEDITIONSBUCH.Sicherheitsbetrag = sumBrg + End If + 'SPEDITIONSBUCH.Abfertigungsdatum= + + SPEDITIONSBUCH.BelegNr = DY.ncts_MRN + SPEDITIONSBUCH.LKW_Kennzeichen = If(DY.ncts_DepartureTransportMeans_1_IdentificationNumber, "") + + Dim AD = getAdresseFromEORI(DY.ncts_Consignor_IdentificationNumber, DY.ncts_Consignor_SubsidiaryNumber, SQL) + If AD IsNot Nothing Then + SPEDITIONSBUCH.AbsenderKundenNr = AD.AdressenNr + SPEDITIONSBUCH.Absender = AD.Ordnungsbegriff + End If + If If(SPEDITIONSBUCH.Absender, "").Trim = "" Then + If If(DY.ncts_Consignor_Name, "").ToString.Trim <> "" Then + SPEDITIONSBUCH.Absender = If(DY.ncts_Consignor_Name, "") + SPEDITIONSBUCH.Absender &= ", " & If(DY.ncts_Consignor_Country, "") + SPEDITIONSBUCH.Absender &= " " & If(DY.ncts_Consignor_Postcode, "") + SPEDITIONSBUCH.Absender &= " " & If(DY.ncts_Consignor_City, "") + ElseIf DY.ncts_HOUSE_CONSIGNMENT.Count > 0 Then + Dim WP = DY.ncts_HOUSE_CONSIGNMENT(0) + Dim AD_pos = getAdresseFromEORI(WP.nctsHC_Consignor_IdentificationNumber, WP.nctsHC_Consignor_SubsidiaryNumber, SQL) + If AD_pos IsNot Nothing Then + SPEDITIONSBUCH.AbsenderKundenNr = AD_pos.AdressenNr + SPEDITIONSBUCH.Absender = AD_pos.Ordnungsbegriff + End If + If If(WP.nctsHC_Consignor_Name, "").ToString.Trim <> "" Then + SPEDITIONSBUCH.Absender = If(WP.nctsHC_Consignor_Name, "") + SPEDITIONSBUCH.Absender &= ", " & If(WP.nctsHC_Consignor_Country, "") + SPEDITIONSBUCH.Absender &= " " & If(WP.nctsHC_Consignor_Postcode, "") + SPEDITIONSBUCH.Absender &= " " & If(WP.nctsHC_Consignor_City, "") + End If + If If(SPEDITIONSBUCH.Absender, "").Trim = String.Empty Then SPEDITIONSBUCH.Absender &= (" " & If(WP.nctsHC_Consignor_IdentificationNumber, "")).ToString.Trim + End If + If If(SPEDITIONSBUCH.Absender, "").Trim = String.Empty Then SPEDITIONSBUCH.Absender &= (" " & If(DY.ncts_Consignor_IdentificationNumber, "")).ToString.Trim + + End If + + + Dim AD2 = getAdresseFromEORI(DY.ncts_Consignee_IdentificationNumber, DY.ncts_Consignee_SubsidiaryNumber, SQL) + If AD2 IsNot Nothing Then + SPEDITIONSBUCH.EmpfängerKundenNr = AD2.AdressenNr + SPEDITIONSBUCH.Empfänger = AD2.Ordnungsbegriff + End If + If If(SPEDITIONSBUCH.Empfänger, "") = "" Then + If If(DY.ncts_Consignee_Name, "").ToString.Trim <> "" Then + SPEDITIONSBUCH.Empfänger = If(DY.ncts_Consignee_Name, "") + SPEDITIONSBUCH.Empfänger &= ", " & If(DY.ncts_Consignee_Country, "") + SPEDITIONSBUCH.Empfänger &= " " & If(DY.ncts_Consignee_Postcode, "") + SPEDITIONSBUCH.Empfänger &= " " & If(DY.ncts_Consignee_City, "") + ElseIf DY.ncts_HOUSE_CONSIGNMENT.Count > 0 Then + Dim WP = DY.ncts_HOUSE_CONSIGNMENT(0) + Dim AD_pos = getAdresseFromEORI(WP.nctsHC_Consignee_IdentificationNumber, WP.nctsHC_Consignee_SubsidiaryNumber, SQL) + If AD_pos IsNot Nothing Then + SPEDITIONSBUCH.EmpfängerKundenNr = AD_pos.AdressenNr + SPEDITIONSBUCH.Empfänger = AD_pos.Ordnungsbegriff + End If + + If AD2 IsNot Nothing Then + SPEDITIONSBUCH.EmpfängerKundenNr = AD2.AdressenNr + SPEDITIONSBUCH.Empfänger = AD2.Ordnungsbegriff + End If + + If If(WP.nctsHC_Consignee_Name, "").ToString.Trim <> "" Then + SPEDITIONSBUCH.Empfänger = If(WP.nctsHC_Consignee_Name, "") + SPEDITIONSBUCH.Empfänger &= ", " & If(WP.nctsHC_Consignee_Country, "") + SPEDITIONSBUCH.Empfänger &= " " & If(WP.nctsHC_Consignee_Postcode, "") + SPEDITIONSBUCH.Empfänger &= " " & If(WP.nctsHC_Consignee_City, "") + End If + If If(SPEDITIONSBUCH.Empfänger, "").Trim = String.Empty Then SPEDITIONSBUCH.Empfänger &= (" " & If(WP.nctsHC_Consignee_IdentificationNumber, "")).ToString.Trim + End If + If If(SPEDITIONSBUCH.Empfänger, "").Trim = String.Empty Then SPEDITIONSBUCH.Empfänger &= (" " & If(DY.ncts_Consignee_IdentificationNumber, "")).ToString.Trim + + End If + + If If(SPEDITIONSBUCH.Empfänger, "").ToString.Length > 35 Then + SPEDITIONSBUCH.Empfänger = SPEDITIONSBUCH.Empfänger.Substring(0, 35) + End If + + Dim packSt = "" + + Dim PkCnt = 0 + For Each HC In DY.ncts_HOUSE_CONSIGNMENT + For Each HCCI In HC.nctsWP_CONSIGNMENT_ITEM + For Each PK In HCCI.nctsHCCI_PACKAGING + If PK.nctsHCCIPK_NumberOfPackages Is Not Nothing Then + PkCnt += PK.nctsHCCIPK_NumberOfPackages + End If + Next + Next + + Next + If DY.ncts_GesamtAnzahlPackstuecke IsNot Nothing Then packSt = DY.ncts_GesamtAnzahlPackstuecke & " Pk. " + + + If DY.ncts_WARENPOS.Count > 0 Then + 'SPEDITIONSBUCH.Währungsschlüssel = If(DY.ncts_WARENPOS(0).nctsWP_WarenwertWaehrung, "") + SPEDITIONSBUCH.Währungsschlüssel = "900" + If DY.ncts_GesamtRohmasse IsNot Nothing Then packSt &= If(DY.ncts_WARENPOS(0).nctsWP_Warenbezeichnung, "") + + Dim sumBrg As Double = 0 + For Each S In DY.ncts_WARENPOS + sumBrg += If(S.nctsWP_Warenwert, 0) + Next + If sumBrg > 0 Then SPEDITIONSBUCH.Rechnungsbetrag = sumBrg + End If + + If packSt.Trim <> String.Empty Then SPEDITIONSBUCH.Packstücke = packSt.Trim & ", " & CDbl(DY.ncts_GesamtRohmasse).ToString("N1") & " kg" + + If DY.ncts_GesamtRohmasse IsNot Nothing AndAlso IsNumeric(DY.ncts_GesamtRohmasse) Then SPEDITIONSBUCH.Rohmasse = CInt(DY.ncts_GesamtRohmasse) 'CDbl(DY.ncts_GesamtRohmasse).ToString("N2") + 'Personal Abfertigung: + Try + If DY.ncts_Bearbeiter IsNot Nothing Then + Dim p = SQL.getValueTxtBySql("SELECT ISNULL(CASE WHEN [mit_FMZollPersIDKasseIsnotSpedBuch]=1 THEN [mit_FMZollPersIDSpedBuch] ELSE [mit_FMZollPersID] END ,-1) as [mit_FMZollPersID] FROM [ADMIN].[dbo].[tblMitarbeiter] WHERE [mit_DAKOSY_SB]='" & DY.ncts_Bearbeiter & "'", "ADMIN") + + SPEDITIONSBUCH.Personalnummer = If(IsNumeric(p), p, Nothing) + End If + Catch ex As Exception + MsgBox("Fehler DAKOSY Personal: " & vbNewLine & ex.Message & vbNewLine & ex.StackTrace) + End Try + + End Sub + + Shared Function getAdresseFromEORI(EORI As String, EORI_NL As String, SQL As VERAG_PROG_ALLGEMEIN.SQL) + If EORI Is Nothing Then Return Nothing + If If(EORI, "") <> "" Then + Dim kdNrTmp = SQL.getFMZOLLKdNrFromEORI(EORI, EORI_NL) + If IsNumeric(kdNrTmp) Then + Dim ADRESSE As New VERAG_PROG_ALLGEMEIN.cAdressen(kdNrTmp) + Return ADRESSE + End If + End If + Return Nothing + End Function + +End Class + + + +Public Class cDakosy_NCTSOut004_Guarantee + + Property nctsGRT_Id As Integer + Property nctsGRT_NctsId As Integer + Property nctsGRT_Type As Object = Nothing ' VARCHAR(2) NULL, + Property nctsGRT_OtherGuaranteeReference As Object = Nothing ' VARCHAR(35) NULL, + Property nctsGRT_Currency As Object = Nothing ' VARCHAR(3) NULL, + Property nctsGRT_AmountToBeCovered As Object = Nothing ' Decimal (18, 2) NULL, + Property nctsGRT_GRN As Object = Nothing ' VARCHAR(24) NULL, + Property nctsGRT_AccessCode As Object = Nothing ' VARCHAR(4) NULL, + Property nctsGRT_AccountName As Object = Nothing ' VARCHAR(15) NULL, + Property nctsGRT_GoodsValue As Object = Nothing ' Decimal (18, 2) NULL, + Property nctsGRT_CurrencyOfGoodsValue As Object = Nothing ' VARCHAR(3) NULL, + Property nctsGRT_FractionOfGoodsValue As Object = Nothing ' Decimal (10, 2) NULL, + Property nctsGRT_CurrencyExchangeRateCustoms As Object = Nothing ' Decimal (15, 5) NULL, + Property nctsGRT_CurrencyExchangeRateAccount As Object = Nothing ' Decimal (15, 5) NULL, + Property nctsGRT_ExchangeDateCustoms As Object = Nothing ' Date NULL, + Property nctsGRT_ExchangeDateAccount As Object = Nothing ' Date NULL, + Property nctsGRT_CurrencyExchangeRateTypeCustoms As Object = Nothing ' VARCHAR(9) NULL, + Property nctsGRT_CurrencyExchangeRateTypeAccount As Object = Nothing ' VARCHAR(10) NULL, + Property nctsGRT_CalculateGoodsValueFromGoodsItems As Object = Nothing ' VARCHAR(1) NULL, + Property nctsGRT_Commentary As Object = Nothing ' VARCHAR(50) NULL, + + 'Public selButton As Object = Nothing ' Für die GUI + 'Public SA_OBJECT As Object = Nothing ' Für die GUI + + Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL + + Sub New() + End Sub + + 'Sub New(nctsSA_Id) + ' Me.nctsSA_Id = nctsSA_Id + ' LOAD() + ' End Sub + + + Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) + Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) + + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsGRT_Id", nctsGRT_Id, , True, True)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsGRT_NctsId", nctsGRT_NctsId)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsGRT_Type", nctsGRT_Type)) ' VARCHAR(2) NULL, + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsGRT_OtherGuaranteeReference", nctsGRT_OtherGuaranteeReference)) ' VARCHAR(35) NULL, + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsGRT_Currency", nctsGRT_Currency)) ' VARCHAR(3) NULL, + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsGRT_AmountToBeCovered", nctsGRT_AmountToBeCovered)) ' Decimal (18, 2) NULL, + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsGRT_GRN", nctsGRT_GRN)) ' VARCHAR(24) NULL, + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsGRT_AccessCode", nctsGRT_AccessCode)) ' VARCHAR(4) NULL, + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsGRT_AccountName", nctsGRT_AccountName)) ' VARCHAR(15) NULL, + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsGRT_GoodsValue", nctsGRT_GoodsValue)) ' Decimal (18, 2) NULL, + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsGRT_CurrencyOfGoodsValue", nctsGRT_CurrencyOfGoodsValue)) ' VARCHAR(3) NULL, + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsGRT_FractionOfGoodsValue", nctsGRT_FractionOfGoodsValue)) ' Decimal (10, 2) NULL, + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsGRT_CurrencyExchangeRateCustoms", nctsGRT_CurrencyExchangeRateCustoms)) ' Decimal (15, 5) NULL, + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsGRT_CurrencyExchangeRateAccount", nctsGRT_CurrencyExchangeRateAccount)) ' Decimal (15, 5) NULL, + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsGRT_ExchangeDateCustoms", nctsGRT_ExchangeDateCustoms)) ' Date NULL, + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsGRT_ExchangeDateAccount", nctsGRT_ExchangeDateAccount)) ' Date NULL, + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsGRT_CurrencyExchangeRateTypeCustoms", nctsGRT_CurrencyExchangeRateTypeCustoms)) ' VARCHAR(9) NULL, + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsGRT_CurrencyExchangeRateTypeAccount", nctsGRT_CurrencyExchangeRateTypeAccount)) ' VARCHAR(10) NULL, + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsGRT_CalculateGoodsValueFromGoodsItems", nctsGRT_CalculateGoodsValueFromGoodsItems)) ' VARCHAR(1) NULL, + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsGRT_Commentary", nctsGRT_Commentary)) ' VARCHAR(50) NULL, + + + Return list + End Function + + + Public Function INSERT() As Boolean + Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList() + 'Return SQL.doSQLVarList(getInsertCmd, "FMZOLL", , list) + nctsGRT_Id = SQL.doSQLVarListID(nctsGRT_Id, getInsertCmd, "FMZOLL", , list) + Return nctsGRT_Id > 0 + End Function + + Public Function getInsertCmd() As String + Try + Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList() + Dim str As String = "" + Dim values As String = "" + For Each i In list + If Not i.isPrimaryParam Then + str &= "[" & i.Text & "]," + values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & "," + End If + Next + str = str.Substring(0, str.Length - 1) 'wg. ',' + values = values.Substring(0, values.Length - 1) 'wg. ',' + Return (" INSERT INTO tblDakosy_NCTSOut004_Guarantee (" & str & ") VALUES(" & values & ") ") + Catch ex As Exception + MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + End Try + Return "" + End Function + +End Class + + +Public Class cDakosy_NCTSOut004_TransportEquipment + + Property nctsTE_Id As Integer + Property nctsTE_NctsId As Integer + Property nctsTE_NumberOfSeals As Object = Nothing ' VARCHAR(2) NULL, + Property nctsTE_Seal_1 As Object = Nothing ' VARCHAR(20) NULL, + Property nctsTE_Seal_2 As Object = Nothing ' VARCHAR(20) NULL, + Property nctsTE_Seal_3 As Object = Nothing ' VARCHAR(20) NULL, + Property nctsTE_Seal_4 As Object = Nothing ' VARCHAR(20) NULL, + Property nctsTE_Seal_5 As Object = Nothing ' VARCHAR(20) NULL, + Property nctsTE_Seal_6 As Object = Nothing ' VARCHAR(20) NULL, + Property nctsTE_Seal_7 As Object = Nothing ' VARCHAR(20) NULL, + Property nctsTE_Seal_8 As Object = Nothing ' VARCHAR(20) NULL, + Property nctsTE_Seal_9 As Object = Nothing ' VARCHAR(20) NULL, + Property nctsTE_Seal_10 As Object = Nothing ' VARCHAR(20) NULL, + Property nctsTE_Seal_11 As Object = Nothing ' VARCHAR(20) NULL, + Property nctsTE_Seal_12 As Object = Nothing ' VARCHAR(20) NULL, + Property nctsTE_Seal_13 As Object = Nothing ' VARCHAR(20) NULL, + Property nctsTE_Seal_14 As Object = Nothing ' VARCHAR(20) NULL, + Property nctsTE_Seal_15 As Object = Nothing ' VARCHAR(20) NULL, + Property nctsTE_ContainerIdentificationNumber As Object = Nothing ' VARCHAR(17) NULL, + Property nctsTE_GoodsReference As Object = Nothing ' VARCHAR(MAX) NULL, + + Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL + + Sub New() + End Sub + + 'Sub New(nctsSA_Id) + ' Me.nctsSA_Id = nctsSA_Id + ' LOAD() + ' End Sub + + + Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) + Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) + + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsTE_Id", nctsTE_Id, , True, True)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsTE_NctsId", nctsTE_NctsId)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsTE_NumberOfSeals", nctsTE_NumberOfSeals)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsTE_Seal_1", nctsTE_Seal_1)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsTE_Seal_2", nctsTE_Seal_2)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsTE_Seal_3", nctsTE_Seal_3)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsTE_Seal_4", nctsTE_Seal_4)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsTE_Seal_5", nctsTE_Seal_5)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsTE_Seal_6", nctsTE_Seal_6)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsTE_Seal_7", nctsTE_Seal_7)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsTE_Seal_8", nctsTE_Seal_8)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsTE_Seal_9", nctsTE_Seal_9)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsTE_Seal_10", nctsTE_Seal_10)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsTE_Seal_11", nctsTE_Seal_11)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsTE_Seal_12", nctsTE_Seal_12)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsTE_Seal_13", nctsTE_Seal_13)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsTE_Seal_14", nctsTE_Seal_14)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsTE_Seal_15", nctsTE_Seal_15)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsTE_ContainerIdentificationNumber", nctsTE_ContainerIdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsTE_GoodsReference", nctsTE_GoodsReference)) + + + Return list + End Function + + + Public Function INSERT() As Boolean + Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList() + 'Return SQL.doSQLVarList(getInsertCmd, "FMZOLL", , list) + nctsTE_Id = SQL.doSQLVarListID(nctsTE_Id, getInsertCmd, "FMZOLL", , list) + Return nctsTE_Id > 0 + End Function + + Public Function getInsertCmd() As String + Try + Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList() + Dim str As String = "" + Dim values As String = "" + For Each i In list + If Not i.isPrimaryParam Then + str &= "[" & i.Text & "]," + values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & "," + End If + Next + str = str.Substring(0, str.Length - 1) 'wg. ',' + values = values.Substring(0, values.Length - 1) 'wg. ',' + Return (" INSERT INTO tblDakosy_NCTSOut004_TransportEquipment (" & str & ") VALUES(" & values & ") ") + Catch ex As Exception + MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + End Try + Return "" + End Function + +End Class + + +Public Class cDakosy_NCTSOut004_HouseConsignment + Property nctsHC_Id As Integer + Property nctsHC_NctsId As Integer + Property nctsHC_HouseConsignMentReference As Object = Nothing + Property nctsHC_CountryOfDispatch As Object = Nothing + Property nctsHC_CountryOfDestination As Object = Nothing + Property nctsHC_GrossMass As Object = Nothing + Property nctsHC_ReferenceNumberUCR As Object = Nothing + Property nctsHC_Consignor_AdressCode As Object = Nothing + Property nctsHC_Consignor_IdentificationNumber As Object = Nothing + Property nctsHC_Consignor_SubsidiaryNumber As Object = Nothing + Property nctsHC_Consignor_Name As Object = Nothing + Property nctsHC_Consignor_StreetNumber As Object = Nothing + Property nctsHC_Consignor_City As Object = Nothing + Property nctsHC_Consignor_Postcode As Object = Nothing + Property nctsHC_Consignor_Country As Object = Nothing + Property nctsHC_Consignor_ContactPerson_Name As Object = Nothing + Property nctsHC_Consignor_ContactPerson_PhoneNumber As Object = Nothing + Property nctsHC_Consignor_ContactPerson_EMailAddress As Object = Nothing + Property nctsHC_Consignee_AdressCode As Object = Nothing + Property nctsHC_Consignee_IdentificationNumber As Object = Nothing + Property nctsHC_Consignee_SubsidiaryNumber As Object = Nothing + Property nctsHC_Consignee_Name As Object = Nothing + Property nctsHC_Consignee_StreetNumber As Object = Nothing + Property nctsHC_Consignee_City As Object = Nothing + Property nctsHC_Consignee_Postcode As Object = Nothing + Property nctsHC_Consignee_Country As Object = Nothing + Property nctsHC_Consignee_ContactPerson_Name As Object = Nothing + Property nctsHC_Consignee_ContactPerson_PhoneNumber As Object = Nothing + Property nctsHC_Consignee_ContactPerson_EMailAddress As Object = Nothing + Property nctsHC_AdditionalSupplyChainActor_1_Role As Object = Nothing + Property nctsHC_AdditionalSupplyChainActor_1_IdentificationNumber As Object = Nothing + Property nctsHC_AdditionalSupplyChainActor_2_Role As Object = Nothing + Property nctsHC_AdditionalSupplyChainActor_2_IdentificationNumber As Object = Nothing + Property nctsHC_AdditionalSupplyChainActor_3_Role As Object = Nothing + Property nctsHC_AdditionalSupplyChainActor_3_IdentificationNumber As Object = Nothing + Property nctsHC_AdditionalSupplyChainActor_4_Role As Object = Nothing + Property nctsHC_AdditionalSupplyChainActor_4_IdentificationNumber As Object = Nothing + Property nctsHC_AdditionalSupplyChainActor_5_Role As Object = Nothing + Property nctsHC_AdditionalSupplyChainActor_5_IdentificationNumber As Object = Nothing + Property nctsHC_AdditionalSupplyChainActor_6_Role As Object = Nothing + Property nctsHC_AdditionalSupplyChainActor_6_IdentificationNumber As Object = Nothing + Property nctsHC_AdditionalSupplyChainActor_7_Role As Object = Nothing + Property nctsHC_AdditionalSupplyChainActor_7_IdentificationNumber As Object = Nothing + Property nctsHC_AdditionalSupplyChainActor_8_Role As Object = Nothing + Property nctsHC_AdditionalSupplyChainActor_8_IdentificationNumber As Object = Nothing + Property nctsHC_AdditionalSupplyChainActor_9_Role As Object = Nothing + Property nctsHC_AdditionalSupplyChainActor_9_IdentificationNumber As Object = Nothing + Property nctsHC_SupportingDocument_1_Type As Object = Nothing + Property nctsHC_SupportingDocument_1_ReferenceNumber As Object = Nothing + Property nctsHC_SupportingDocument_1_DocumentLineItemNumber As Object = Nothing + Property nctsHC_SupportingDocument_1_ComplementOfInformation As Object = Nothing + Property nctsHC_SupportingDocument_2_Type As Object = Nothing + Property nctsHC_SupportingDocument_2_ReferenceNumber As Object = Nothing + Property nctsHC_SupportingDocument_2_DocumentLineItemNumber As Object = Nothing + Property nctsHC_SupportingDocument_2_ComplementOfInformation As Object = Nothing + Property nctsHC_SupportingDocument_3_Type As Object = Nothing + Property nctsHC_SupportingDocument_3_ReferenceNumber As Object = Nothing + Property nctsHC_SupportingDocument_3_DocumentLineItemNumber As Object = Nothing + Property nctsHC_SupportingDocument_3_ComplementOfInformation As Object = Nothing + Property nctsHC_SupportingDocument_4_Type As Object = Nothing + Property nctsHC_SupportingDocument_4_ReferenceNumber As Object = Nothing + Property nctsHC_SupportingDocument_4_DocumentLineItemNumber As Object = Nothing + Property nctsHC_SupportingDocument_4_ComplementOfInformation As Object = Nothing + Property nctsHC_SupportingDocument_5_Type As Object = Nothing + Property nctsHC_SupportingDocument_5_ReferenceNumber As Object = Nothing + Property nctsHC_SupportingDocument_5_DocumentLineItemNumber As Object = Nothing + Property nctsHC_SupportingDocument_5_ComplementOfInformation As Object = Nothing + Property nctsHC_SupportingDocument_6_Type As Object = Nothing + Property nctsHC_SupportingDocument_6_ReferenceNumber As Object = Nothing + Property nctsHC_SupportingDocument_6_DocumentLineItemNumber As Object = Nothing + Property nctsHC_SupportingDocument_6_ComplementOfInformation As Object = Nothing + Property nctsHC_SupportingDocument_7_Type As Object = Nothing + Property nctsHC_SupportingDocument_7_ReferenceNumber As Object = Nothing + Property nctsHC_SupportingDocument_7_DocumentLineItemNumber As Object = Nothing + Property nctsHC_SupportingDocument_7_ComplementOfInformation As Object = Nothing + Property nctsHC_SupportingDocument_8_Type As Object = Nothing + Property nctsHC_SupportingDocument_8_ReferenceNumber As Object = Nothing + Property nctsHC_SupportingDocument_8_DocumentLineItemNumber As Object = Nothing + Property nctsHC_SupportingDocument_8_ComplementOfInformation As Object = Nothing + Property nctsHC_SupportingDocument_9_Type As Object = Nothing + Property nctsHC_SupportingDocument_9_ReferenceNumber As Object = Nothing + Property nctsHC_SupportingDocument_9_DocumentLineItemNumber As Object = Nothing + Property nctsHC_SupportingDocument_9_ComplementOfInformation As Object = Nothing + Property nctsHC_TransportDocument_1_Type As Object = Nothing + Property nctsHC_TransportDocument_1_ReferenceNumber As Object = Nothing + Property nctsHC_TransportDocument_2_Type As Object = Nothing + Property nctsHC_TransportDocument_2_ReferenceNumber As Object = Nothing + Property nctsHC_TransportDocument_3_Type As Object = Nothing + Property nctsHC_TransportDocument_3_ReferenceNumber As Object = Nothing + Property nctsHC_TransportDocument_4_Type As Object = Nothing + Property nctsHC_TransportDocument_4_ReferenceNumber As Object = Nothing + Property nctsHC_TransportDocument_5_Type As Object = Nothing + Property nctsHC_TransportDocument_5_ReferenceNumber As Object = Nothing + Property nctsHC_TransportDocument_6_Type As Object = Nothing + Property nctsHC_TransportDocument_6_ReferenceNumber As Object = Nothing + Property nctsHC_TransportDocument_7_Type As Object = Nothing + Property nctsHC_TransportDocument_7_ReferenceNumber As Object = Nothing + Property nctsHC_TransportDocument_8_Type As Object = Nothing + Property nctsHC_TransportDocument_8_ReferenceNumber As Object = Nothing + Property nctsHC_TransportDocument_9_Type As Object = Nothing + Property nctsHC_TransportDocument_9_ReferenceNumber As Object = Nothing + Property nctsHC_AdditionalReference_1_Type As Object = Nothing + Property nctsHC_AdditionalReference_1_ReferenceNumber As Object = Nothing + Property nctsHC_AdditionalReference_2_Type As Object = Nothing + Property nctsHC_AdditionalReference_2_ReferenceNumber As Object = Nothing + Property nctsHC_AdditionalReference_3_Type As Object = Nothing + Property nctsHC_AdditionalReference_3_ReferenceNumber As Object = Nothing + Property nctsHC_AdditionalReference_4_Type As Object = Nothing + Property nctsHC_AdditionalReference_4_ReferenceNumber As Object = Nothing + Property nctsHC_AdditionalReference_5_Type As Object = Nothing + Property nctsHC_AdditionalReference_5_ReferenceNumber As Object = Nothing + Property nctsHC_AdditionalReference_6_Type As Object = Nothing + Property nctsHC_AdditionalReference_6_ReferenceNumber As Object = Nothing + Property nctsHC_AdditionalReference_7_Type As Object = Nothing + Property nctsHC_AdditionalReference_7_ReferenceNumber As Object = Nothing + Property nctsHC_AdditionalReference_8_Type As Object = Nothing + Property nctsHC_AdditionalReference_8_ReferenceNumber As Object = Nothing + Property nctsHC_AdditionalReference_9_Type As Object = Nothing + Property nctsHC_AdditionalReference_9_ReferenceNumber As Object = Nothing + Property nctsHC_AdditionalInformation_1_Code As Object = Nothing + Property nctsHC_AdditionalInformation_1_Text As Object = Nothing + Property nctsHC_AdditionalInformation_2_Code As Object = Nothing + Property nctsHC_AdditionalInformation_2_Text As Object = Nothing + Property nctsHC_AdditionalInformation_3_Code As Object = Nothing + Property nctsHC_AdditionalInformation_3_Text As Object = Nothing + Property nctsHC_AdditionalInformation_4_Code As Object = Nothing + Property nctsHC_AdditionalInformation_4_Text As Object = Nothing + Property nctsHC_AdditionalInformation_5_Code As Object = Nothing + Property nctsHC_AdditionalInformation_5_Text As Object = Nothing + Property nctsHC_AdditionalInformation_6_Code As Object = Nothing + Property nctsHC_AdditionalInformation_6_Text As Object = Nothing + Property nctsHC_AdditionalInformation_7_Code As Object = Nothing + Property nctsHC_AdditionalInformation_7_Text As Object = Nothing + Property nctsHC_AdditionalInformation_8_Code As Object = Nothing + Property nctsHC_AdditionalInformation_8_Text As Object = Nothing + Property nctsHC_AdditionalInformation_9_Code As Object = Nothing + Property nctsHC_AdditionalInformation_9_Text As Object = Nothing + Property nctsHC_TransportCharges As Object = Nothing + + + + Property nctsWP_CONSIGNMENT_ITEM As New List(Of cDakosy_NCTSOut004_HouseConsignment_ConsignmentItem) + + + Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL + + Sub New() + ' Me.nctsWP_NctsId = nctsWP_NctsId + End Sub + + 'Sub New(nctsSA_Id) + ' Me.nctsSA_Id = nctsSA_Id + ' LOAD() + ' End Sub + + + Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) + Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_Id", nctsHC_Id, , True, True)) + + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_NctsId", nctsHC_NctsId)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_HouseConsignMentReference", nctsHC_HouseConsignMentReference)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_CountryOfDispatch", nctsHC_CountryOfDispatch)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_CountryOfDestination", nctsHC_CountryOfDestination)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_GrossMass", nctsHC_GrossMass)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_ReferenceNumberUCR", nctsHC_ReferenceNumberUCR)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_Consignor_AdressCode", nctsHC_Consignor_AdressCode)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_Consignor_IdentificationNumber", nctsHC_Consignor_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_Consignor_SubsidiaryNumber", nctsHC_Consignor_SubsidiaryNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_Consignor_Name", nctsHC_Consignor_Name)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_Consignor_StreetNumber", nctsHC_Consignor_StreetNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_Consignor_City", nctsHC_Consignor_City)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_Consignor_Postcode", nctsHC_Consignor_Postcode)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_Consignor_Country", nctsHC_Consignor_Country)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_Consignor_ContactPerson_Name", nctsHC_Consignor_ContactPerson_Name)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_Consignor_ContactPerson_PhoneNumber", nctsHC_Consignor_ContactPerson_PhoneNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_Consignor_ContactPerson_EMailAddress", nctsHC_Consignor_ContactPerson_EMailAddress)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_Consignee_AdressCode", nctsHC_Consignee_AdressCode)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_Consignee_IdentificationNumber", nctsHC_Consignee_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_Consignee_SubsidiaryNumber", nctsHC_Consignee_SubsidiaryNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_Consignee_Name", nctsHC_Consignee_Name)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_Consignee_StreetNumber", nctsHC_Consignee_StreetNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_Consignee_City", nctsHC_Consignee_City)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_Consignee_Postcode", nctsHC_Consignee_Postcode)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_Consignee_Country", nctsHC_Consignee_Country)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_Consignee_ContactPerson_Name", nctsHC_Consignee_ContactPerson_Name)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_Consignee_ContactPerson_PhoneNumber", nctsHC_Consignee_ContactPerson_PhoneNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_Consignee_ContactPerson_EMailAddress", nctsHC_Consignee_ContactPerson_EMailAddress)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalSupplyChainActor_1_Role", nctsHC_AdditionalSupplyChainActor_1_Role)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalSupplyChainActor_1_IdentificationNumber", nctsHC_AdditionalSupplyChainActor_1_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalSupplyChainActor_2_Role", nctsHC_AdditionalSupplyChainActor_2_Role)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalSupplyChainActor_2_IdentificationNumber", nctsHC_AdditionalSupplyChainActor_2_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalSupplyChainActor_3_Role", nctsHC_AdditionalSupplyChainActor_3_Role)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalSupplyChainActor_3_IdentificationNumber", nctsHC_AdditionalSupplyChainActor_3_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalSupplyChainActor_4_Role", nctsHC_AdditionalSupplyChainActor_4_Role)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalSupplyChainActor_4_IdentificationNumber", nctsHC_AdditionalSupplyChainActor_4_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalSupplyChainActor_5_Role", nctsHC_AdditionalSupplyChainActor_5_Role)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalSupplyChainActor_5_IdentificationNumber", nctsHC_AdditionalSupplyChainActor_5_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalSupplyChainActor_6_Role", nctsHC_AdditionalSupplyChainActor_6_Role)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalSupplyChainActor_6_IdentificationNumber", nctsHC_AdditionalSupplyChainActor_6_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalSupplyChainActor_7_Role", nctsHC_AdditionalSupplyChainActor_7_Role)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalSupplyChainActor_7_IdentificationNumber", nctsHC_AdditionalSupplyChainActor_7_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalSupplyChainActor_8_Role", nctsHC_AdditionalSupplyChainActor_8_Role)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalSupplyChainActor_8_IdentificationNumber", nctsHC_AdditionalSupplyChainActor_8_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalSupplyChainActor_9_Role", nctsHC_AdditionalSupplyChainActor_9_Role)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalSupplyChainActor_9_IdentificationNumber", nctsHC_AdditionalSupplyChainActor_9_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_1_Type", nctsHC_SupportingDocument_1_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_1_ReferenceNumber", nctsHC_SupportingDocument_1_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_1_DocumentLineItemNumber", nctsHC_SupportingDocument_1_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_1_ComplementOfInformation", nctsHC_SupportingDocument_1_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_2_Type", nctsHC_SupportingDocument_2_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_2_ReferenceNumber", nctsHC_SupportingDocument_2_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_2_DocumentLineItemNumber", nctsHC_SupportingDocument_2_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_2_ComplementOfInformation", nctsHC_SupportingDocument_2_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_3_Type", nctsHC_SupportingDocument_3_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_3_ReferenceNumber", nctsHC_SupportingDocument_3_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_3_DocumentLineItemNumber", nctsHC_SupportingDocument_3_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_3_ComplementOfInformation", nctsHC_SupportingDocument_3_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_4_Type", nctsHC_SupportingDocument_4_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_4_ReferenceNumber", nctsHC_SupportingDocument_4_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_4_DocumentLineItemNumber", nctsHC_SupportingDocument_4_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_4_ComplementOfInformation", nctsHC_SupportingDocument_4_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_5_Type", nctsHC_SupportingDocument_5_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_5_ReferenceNumber", nctsHC_SupportingDocument_5_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_5_DocumentLineItemNumber", nctsHC_SupportingDocument_5_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_5_ComplementOfInformation", nctsHC_SupportingDocument_5_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_6_Type", nctsHC_SupportingDocument_6_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_6_ReferenceNumber", nctsHC_SupportingDocument_6_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_6_DocumentLineItemNumber", nctsHC_SupportingDocument_6_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_6_ComplementOfInformation", nctsHC_SupportingDocument_6_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_7_Type", nctsHC_SupportingDocument_7_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_7_ReferenceNumber", nctsHC_SupportingDocument_7_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_7_DocumentLineItemNumber", nctsHC_SupportingDocument_7_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_7_ComplementOfInformation", nctsHC_SupportingDocument_7_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_8_Type", nctsHC_SupportingDocument_8_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_8_ReferenceNumber", nctsHC_SupportingDocument_8_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_8_DocumentLineItemNumber", nctsHC_SupportingDocument_8_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_8_ComplementOfInformation", nctsHC_SupportingDocument_8_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_9_Type", nctsHC_SupportingDocument_9_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_9_ReferenceNumber", nctsHC_SupportingDocument_9_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_9_DocumentLineItemNumber", nctsHC_SupportingDocument_9_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_SupportingDocument_9_ComplementOfInformation", nctsHC_SupportingDocument_9_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_TransportDocument_1_Type", nctsHC_TransportDocument_1_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_TransportDocument_1_ReferenceNumber", nctsHC_TransportDocument_1_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_TransportDocument_2_Type", nctsHC_TransportDocument_2_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_TransportDocument_2_ReferenceNumber", nctsHC_TransportDocument_2_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_TransportDocument_3_Type", nctsHC_TransportDocument_3_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_TransportDocument_3_ReferenceNumber", nctsHC_TransportDocument_3_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_TransportDocument_4_Type", nctsHC_TransportDocument_4_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_TransportDocument_4_ReferenceNumber", nctsHC_TransportDocument_4_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_TransportDocument_5_Type", nctsHC_TransportDocument_5_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_TransportDocument_5_ReferenceNumber", nctsHC_TransportDocument_5_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_TransportDocument_6_Type", nctsHC_TransportDocument_6_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_TransportDocument_6_ReferenceNumber", nctsHC_TransportDocument_6_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_TransportDocument_7_Type", nctsHC_TransportDocument_7_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_TransportDocument_7_ReferenceNumber", nctsHC_TransportDocument_7_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_TransportDocument_8_Type", nctsHC_TransportDocument_8_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_TransportDocument_8_ReferenceNumber", nctsHC_TransportDocument_8_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_TransportDocument_9_Type", nctsHC_TransportDocument_9_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_TransportDocument_9_ReferenceNumber", nctsHC_TransportDocument_9_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalReference_1_Type", nctsHC_AdditionalReference_1_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalReference_1_ReferenceNumber", nctsHC_AdditionalReference_1_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalReference_2_Type", nctsHC_AdditionalReference_2_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalReference_2_ReferenceNumber", nctsHC_AdditionalReference_2_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalReference_3_Type", nctsHC_AdditionalReference_3_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalReference_3_ReferenceNumber", nctsHC_AdditionalReference_3_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalReference_4_Type", nctsHC_AdditionalReference_4_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalReference_4_ReferenceNumber", nctsHC_AdditionalReference_4_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalReference_5_Type", nctsHC_AdditionalReference_5_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalReference_5_ReferenceNumber", nctsHC_AdditionalReference_5_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalReference_6_Type", nctsHC_AdditionalReference_6_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalReference_6_ReferenceNumber", nctsHC_AdditionalReference_6_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalReference_7_Type", nctsHC_AdditionalReference_7_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalReference_7_ReferenceNumber", nctsHC_AdditionalReference_7_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalReference_8_Type", nctsHC_AdditionalReference_8_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalReference_8_ReferenceNumber", nctsHC_AdditionalReference_8_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalReference_9_Type", nctsHC_AdditionalReference_9_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalReference_9_ReferenceNumber", nctsHC_AdditionalReference_9_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalInformation_1_Code", nctsHC_AdditionalInformation_1_Code)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalInformation_1_Text", nctsHC_AdditionalInformation_1_Text)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalInformation_2_Code", nctsHC_AdditionalInformation_2_Code)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalInformation_2_Text", nctsHC_AdditionalInformation_2_Text)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalInformation_3_Code", nctsHC_AdditionalInformation_3_Code)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalInformation_3_Text", nctsHC_AdditionalInformation_3_Text)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalInformation_4_Code", nctsHC_AdditionalInformation_4_Code)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalInformation_4_Text", nctsHC_AdditionalInformation_4_Text)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalInformation_5_Code", nctsHC_AdditionalInformation_5_Code)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalInformation_5_Text", nctsHC_AdditionalInformation_5_Text)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalInformation_6_Code", nctsHC_AdditionalInformation_6_Code)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalInformation_6_Text", nctsHC_AdditionalInformation_6_Text)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalInformation_7_Code", nctsHC_AdditionalInformation_7_Code)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalInformation_7_Text", nctsHC_AdditionalInformation_7_Text)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalInformation_8_Code", nctsHC_AdditionalInformation_8_Code)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalInformation_8_Text", nctsHC_AdditionalInformation_8_Text)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalInformation_9_Code", nctsHC_AdditionalInformation_9_Code)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_AdditionalInformation_9_Text", nctsHC_AdditionalInformation_9_Text)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHC_TransportCharges", nctsHC_TransportCharges)) + + + + Return list + End Function + + + Public Function INSERT() As Boolean + Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList() + 'Return SQL.doSQLVarList(getInsertCmd, "FMZOLL", , list) + nctsHC_Id = SQL.doSQLVarListID(nctsHC_Id, getInsertCmd, "FMZOLL", , list) + Return nctsHC_Id > 0 + End Function + + Public Function getInsertCmd() As String + Try + Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList() + Dim str As String = "" + Dim values As String = "" + For Each i In list + If Not i.isPrimaryParam Then + str &= "[" & i.Text & "]," + values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & "," + End If + Next + str = str.Substring(0, str.Length - 1) 'wg. ',' + values = values.Substring(0, values.Length - 1) 'wg. ',' + Return (" INSERT INTO tblDakosy_NCTSOut004_HouseConsignment (" & str & ") VALUES(" & values & ") ") + Catch ex As Exception + MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + End Try + Return "" + End Function + + + + + Public Sub LOAD_ConsignmentItem() + Try + nctsWP_CONSIGNMENT_ITEM.Clear() + Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL() + Using cmd As New SqlCommand("SELECT * FROM tblDakosy_NCTSOut004_HouseConsignment_ConsignmentItem WHERE nctsHCCI_nctsHCId=@nctsHC_Id ", conn) + cmd.Parameters.AddWithValue("@nctsHC_Id", Me.nctsHC_Id) + Dim dr = cmd.ExecuteReader() + While dr.Read + Dim l As New cDakosy_NCTSOut004_HouseConsignment_ConsignmentItem() + For Each i In l.getParameterList() + Dim propInfo As PropertyInfo = l.GetType.GetProperty(i.Scalarvariable) + If dr.Item(i.Text) Is DBNull.Value Then + propInfo.SetValue(l, Nothing) + Else + propInfo.SetValue(l, dr.Item(i.Text)) + End If + Next + l.LOAD_Packing() + nctsWP_CONSIGNMENT_ITEM.Add(l) + End While + dr.Close() + End Using + End Using + Catch ex As Exception + MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + End Try + End Sub + + Public Function DELETE_ConsignmentItem() As Boolean 'obj As Object, tablename As String, where As String) As Boolean + Dim sqlstr = " DELETE FROM [tblDakosy_NCTSOut004_HouseConsignment_ConsignmentItem] WHERE nctsHCCI_nctsHCId=" & Me.nctsHC_Id & " " + Return SQL.doSQL(sqlstr, "FMZOLL") + End Function + + Public Function INSERT_ConsignmentItem(nctsHCId, ncts_id) As Boolean + 'Zuserst alle OffertenPos von dem Offert löschen + + 'jetzt die Standartofferten einfügen + For Each p In nctsWP_CONSIGNMENT_ITEM + p.nctsHCCI_NctsHCId = nctsHCId + p.nctsHCCI_NctsId = ncts_id + If Not p.INSERT() Then + Return False + End If + Next + + Return True + End Function + + + + + + +End Class +Public Class cDakosy_NCTSOut004_HouseConsignment_ConsignmentItem + Property nctsHCCI_Id As Integer + Property nctsHCCI_NctsId As Integer + Property nctsHCCI_NctsHCId As Integer + Property nctsHCCI_GoodsItemNumber As Object = Nothing + Property nctsHCCI_DeclarationGoodsItemNumber As Object = Nothing + Property nctsHCCI_CommodityCode As Object = Nothing + Property nctsHCCI_MethodeOfPayment As Object = Nothing + Property nctsHCCI_UNNumber_1 As Object = Nothing + Property nctsHCCI_UNNumber_2 As Object = Nothing + Property nctsHCCI_UNNumber_3 As Object = Nothing + Property nctsHCCI_UNNumber_4 As Object = Nothing + Property nctsHCCI_DeclarationType As Object = Nothing + Property nctsHCCI_ArticleCode As Object = Nothing + Property nctsHCCI_DescriptionOfGoods As Object = Nothing + Property nctsHCCI_CusCode As Object = Nothing + Property nctsHCCI_CountryOfDispatch As Object = Nothing + Property nctsHCCI_CountryOfDestination As Object = Nothing + Property nctsHCCI_GrossMass As Object = Nothing + Property nctsHCCI_NetMass As Object = Nothing + Property nctsHCCI_ReferenceNumberUCR As Object = Nothing + Property nctsHCCI_Consignor_AdressCode As Object = Nothing + Property nctsHCCI_Consignor_IdentificationNumber As Object = Nothing + Property nctsHCCI_Consignor_SubsidiaryNumber As Object = Nothing + Property nctsHCCI_Consignor_Name As Object = Nothing + Property nctsHCCI_Consignor_StreetNumber As Object = Nothing + Property nctsHCCI_Consignor_City As Object = Nothing + Property nctsHCCI_Consignor_Postcode As Object = Nothing + Property nctsHCCI_Consignor_Country As Object = Nothing + Property nctsHCCI_Consignor_ContactPerson_Name As Object = Nothing + Property nctsHCCI_Consignor_ContactPerson_PhoneNumber As Object = Nothing + Property nctsHCCI_Consignor_ContactPerson_EMailAddress As Object = Nothing + Property nctsHCCI_AdditionalSupplyChainActor_1_Role As Object = Nothing + Property nctsHCCI_AdditionalSupplyChainActor_1_IdentificationNumber As Object = Nothing + Property nctsHCCI_AdditionalSupplyChainActor_2_Role As Object = Nothing + Property nctsHCCI_AdditionalSupplyChainActor_2_IdentificationNumber As Object = Nothing + Property nctsHCCI_AdditionalSupplyChainActor_3_Role As Object = Nothing + Property nctsHCCI_AdditionalSupplyChainActor_3_IdentificationNumber As Object = Nothing + Property nctsHCCI_AdditionalSupplyChainActor_4_Role As Object = Nothing + Property nctsHCCI_AdditionalSupplyChainActor_4_IdentificationNumber As Object = Nothing + Property nctsHCCI_AdditionalSupplyChainActor_5_Role As Object = Nothing + Property nctsHCCI_AdditionalSupplyChainActor_5_IdentificationNumber As Object = Nothing + Property nctsHCCI_AdditionalSupplyChainActor_6_Role As Object = Nothing + Property nctsHCCI_AdditionalSupplyChainActor_6_IdentificationNumber As Object = Nothing + Property nctsHCCI_AdditionalSupplyChainActor_7_Role As Object = Nothing + Property nctsHCCI_AdditionalSupplyChainActor_7_IdentificationNumber As Object = Nothing + Property nctsHCCI_AdditionalSupplyChainActor_8_Role As Object = Nothing + Property nctsHCCI_AdditionalSupplyChainActor_8_IdentificationNumber As Object = Nothing + Property nctsHCCI_AdditionalSupplyChainActor_9_Role As Object = Nothing + Property nctsHCCI_AdditionalSupplyChainActor_9_IdentificationNumber As Object = Nothing + Property nctsHCCI_GoodsValue As Object = Nothing + Property nctsHCCI_CurrencyOfGoodsValue As Object = Nothing + Property nctsHCCI_ExchangeRate As Object = Nothing + Property nctsHCCI_ExchangeDate As Object = Nothing + Property nctsHCCI_CurrencyExchangeRateType As Object = Nothing + Property nctsHCCI_FractionOfGoodsValue As Object = Nothing + Property nctsHCCI_GuaranteeAmount As Object = Nothing + Property nctsHCCI_PreviousDocument_1_Type As Object = Nothing + Property nctsHCCI_PreviousDocument_1_ReferenceNumber As Object = Nothing + Property nctsHCCI_PreviousDocument_1_DocumentLineItemNumber As Object = Nothing + Property nctsHCCI_PreviousDocument_1_ComplementOfInformation As Object = Nothing + Property nctsHCCI_PreviousDocument_1_GoodsItemNumber As Object = Nothing + Property nctsHCCI_PreviousDocument_2_Type As Object = Nothing + Property nctsHCCI_PreviousDocument_2_ReferenceNumber As Object = Nothing + Property nctsHCCI_PreviousDocument_2_DocumentLineItemNumber As Object = Nothing + Property nctsHCCI_PreviousDocument_2_ComplementOfInformation As Object = Nothing + Property nctsHCCI_PreviousDocument_2_GoodsItemNumber As Object = Nothing + Property nctsHCCI_PreviousDocument_3_Type As Object = Nothing + Property nctsHCCI_PreviousDocument_3_ReferenceNumber As Object = Nothing + Property nctsHCCI_PreviousDocument_3_DocumentLineItemNumber As Object = Nothing + Property nctsHCCI_PreviousDocument_3_ComplementOfInformation As Object = Nothing + Property nctsHCCI_PreviousDocument_3_GoodsItemNumber As Object = Nothing + Property nctsHCCI_PreviousDocument_4_Type As Object = Nothing + Property nctsHCCI_PreviousDocument_4_ReferenceNumber As Object = Nothing + Property nctsHCCI_PreviousDocument_4_DocumentLineItemNumber As Object = Nothing + Property nctsHCCI_PreviousDocument_4_ComplementOfInformation As Object = Nothing + Property nctsHCCI_PreviousDocument_4_GoodsItemNumber As Object = Nothing + Property nctsHCCI_PreviousDocument_5_Type As Object = Nothing + Property nctsHCCI_PreviousDocument_5_ReferenceNumber As Object = Nothing + Property nctsHCCI_PreviousDocument_5_DocumentLineItemNumber As Object = Nothing + Property nctsHCCI_PreviousDocument_5_ComplementOfInformation As Object = Nothing + Property nctsHCCI_PreviousDocument_5_GoodsItemNumber As Object = Nothing + Property nctsHCCI_PreviousDocument_6_Type As Object = Nothing + Property nctsHCCI_PreviousDocument_6_ReferenceNumber As Object = Nothing + Property nctsHCCI_PreviousDocument_6_DocumentLineItemNumber As Object = Nothing + Property nctsHCCI_PreviousDocument_6_ComplementOfInformation As Object = Nothing + Property nctsHCCI_PreviousDocument_6_GoodsItemNumber As Object = Nothing + Property nctsHCCI_PreviousDocument_7_Type As Object = Nothing + Property nctsHCCI_PreviousDocument_7_ReferenceNumber As Object = Nothing + Property nctsHCCI_PreviousDocument_7_DocumentLineItemNumber As Object = Nothing + Property nctsHCCI_PreviousDocument_7_ComplementOfInformation As Object = Nothing + Property nctsHCCI_PreviousDocument_7_GoodsItemNumber As Object = Nothing + Property nctsHCCI_PreviousDocument_8_Type As Object = Nothing + Property nctsHCCI_PreviousDocument_8_ReferenceNumber As Object = Nothing + Property nctsHCCI_PreviousDocument_8_DocumentLineItemNumber As Object = Nothing + Property nctsHCCI_PreviousDocument_8_ComplementOfInformation As Object = Nothing + Property nctsHCCI_PreviousDocument_8_GoodsItemNumber As Object = Nothing + Property nctsHCCI_PreviousDocument_9_Type As Object = Nothing + Property nctsHCCI_PreviousDocument_9_ReferenceNumber As Object = Nothing + Property nctsHCCI_PreviousDocument_9_DocumentLineItemNumber As Object = Nothing + Property nctsHCCI_PreviousDocument_9_ComplementOfInformation As Object = Nothing + Property nctsHCCI_PreviousDocument_9_GoodsItemNumber As Object = Nothing + Property nctsHCCI_SupportingDocument_1_Type As Object = Nothing + Property nctsHCCI_SupportingDocument_1_ReferenceNumber As Object = Nothing + Property nctsHCCI_SupportingDocument_1_DocumentLineItemNumber As Object = Nothing + Property nctsHCCI_SupportingDocument_1_ComplementOfInformation As Object = Nothing + Property nctsHCCI_SupportingDocument_2_Type As Object = Nothing + Property nctsHCCI_SupportingDocument_2_ReferenceNumber As Object = Nothing + Property nctsHCCI_SupportingDocument_2_DocumentLineItemNumber As Object = Nothing + Property nctsHCCI_SupportingDocument_2_ComplementOfInformation As Object = Nothing + Property nctsHCCI_SupportingDocument_3_Type As Object = Nothing + Property nctsHCCI_SupportingDocument_3_ReferenceNumber As Object = Nothing + Property nctsHCCI_SupportingDocument_3_DocumentLineItemNumber As Object = Nothing + Property nctsHCCI_SupportingDocument_3_ComplementOfInformation As Object = Nothing + Property nctsHCCI_SupportingDocument_4_Type As Object = Nothing + Property nctsHCCI_SupportingDocument_4_ReferenceNumber As Object = Nothing + Property nctsHCCI_SupportingDocument_4_DocumentLineItemNumber As Object = Nothing + Property nctsHCCI_SupportingDocument_4_ComplementOfInformation As Object = Nothing + Property nctsHCCI_SupportingDocument_5_Type As Object = Nothing + Property nctsHCCI_SupportingDocument_5_ReferenceNumber As Object = Nothing + Property nctsHCCI_SupportingDocument_5_DocumentLineItemNumber As Object = Nothing + Property nctsHCCI_SupportingDocument_5_ComplementOfInformation As Object = Nothing + Property nctsHCCI_SupportingDocument_6_Type As Object = Nothing + Property nctsHCCI_SupportingDocument_6_ReferenceNumber As Object = Nothing + Property nctsHCCI_SupportingDocument_6_DocumentLineItemNumber As Object = Nothing + Property nctsHCCI_SupportingDocument_6_ComplementOfInformation As Object = Nothing + Property nctsHCCI_SupportingDocument_7_Type As Object = Nothing + Property nctsHCCI_SupportingDocument_7_ReferenceNumber As Object = Nothing + Property nctsHCCI_SupportingDocument_7_DocumentLineItemNumber As Object = Nothing + Property nctsHCCI_SupportingDocument_7_ComplementOfInformation As Object = Nothing + Property nctsHCCI_SupportingDocument_8_Type As Object = Nothing + Property nctsHCCI_SupportingDocument_8_ReferenceNumber As Object = Nothing + Property nctsHCCI_SupportingDocument_8_DocumentLineItemNumber As Object = Nothing + Property nctsHCCI_SupportingDocument_8_ComplementOfInformation As Object = Nothing + Property nctsHCCI_SupportingDocument_9_Type As Object = Nothing + Property nctsHCCI_SupportingDocument_9_ReferenceNumber As Object = Nothing + Property nctsHCCI_SupportingDocument_9_DocumentLineItemNumber As Object = Nothing + Property nctsHCCI_SupportingDocument_9_ComplementOfInformation As Object = Nothing + Property nctsHCCI_AdditionalReference_1_Type As Object = Nothing + Property nctsHCCI_AdditionalReference_1_ReferenceNumber As Object = Nothing + Property nctsHCCI_AdditionalReference_2_Type As Object = Nothing + Property nctsHCCI_AdditionalReference_2_ReferenceNumber As Object = Nothing + Property nctsHCCI_AdditionalReference_3_Type As Object = Nothing + Property nctsHCCI_AdditionalReference_3_ReferenceNumber As Object = Nothing + Property nctsHCCI_AdditionalReference_4_Type As Object = Nothing + Property nctsHCCI_AdditionalReference_4_ReferenceNumber As Object = Nothing + Property nctsHCCI_AdditionalReference_5_Type As Object = Nothing + Property nctsHCCI_AdditionalReference_5_ReferenceNumber As Object = Nothing + Property nctsHCCI_AdditionalReference_6_Type As Object = Nothing + Property nctsHCCI_AdditionalReference_6_ReferenceNumber As Object = Nothing + Property nctsHCCI_AdditionalReference_7_Type As Object = Nothing + Property nctsHCCI_AdditionalReference_7_ReferenceNumber As Object = Nothing + Property nctsHCCI_AdditionalReference_8_Type As Object = Nothing + Property nctsHCCI_AdditionalReference_8_ReferenceNumber As Object = Nothing + Property nctsHCCI_AdditionalReference_9_Type As Object = Nothing + Property nctsHCCI_AdditionalReference_9_ReferenceNumber As Object = Nothing + Property nctsHCCI_AdditionalInformation_1_Code As Object = Nothing + Property nctsHCCI_AdditionalInformation_1_Text As Object = Nothing + Property nctsHCCI_AdditionalInformation_2_Code As Object = Nothing + Property nctsHCCI_AdditionalInformation_2_Text As Object = Nothing + Property nctsHCCI_AdditionalInformation_3_Code As Object = Nothing + Property nctsHCCI_AdditionalInformation_3_Text As Object = Nothing + Property nctsHCCI_AdditionalInformation_4_Code As Object = Nothing + Property nctsHCCI_AdditionalInformation_4_Text As Object = Nothing + Property nctsHCCI_AdditionalInformation_5_Code As Object = Nothing + Property nctsHCCI_AdditionalInformation_5_Text As Object = Nothing + Property nctsHCCI_AdditionalInformation_6_Code As Object = Nothing + Property nctsHCCI_AdditionalInformation_6_Text As Object = Nothing + Property nctsHCCI_AdditionalInformation_7_Code As Object = Nothing + Property nctsHCCI_AdditionalInformation_7_Text As Object = Nothing + Property nctsHCCI_AdditionalInformation_8_Code As Object = Nothing + Property nctsHCCI_AdditionalInformation_8_Text As Object = Nothing + Property nctsHCCI_AdditionalInformation_9_Code As Object = Nothing + Property nctsHCCI_AdditionalInformation_9_Text As Object = Nothing + + + Property nctsHCCI_PACKAGING As New List(Of cDakosy_NCTSOut004_HouseConsignment_ConsignmentItem_Packaging) + + Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL + + Sub New() + ' Me.nctsWP_NctsId = nctsWP_NctsId + End Sub + + 'Sub New(nctsSA_Id) + ' Me.nctsSA_Id = nctsSA_Id + ' LOAD() + ' End Sub + + + Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) + Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_Id", nctsHCCI_Id, , True, True)) + + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_NctsId", nctsHCCI_NctsId)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_NctsHCId", nctsHCCI_NctsHCId)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_GoodsItemNumber", nctsHCCI_GoodsItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_DeclarationGoodsItemNumber", nctsHCCI_DeclarationGoodsItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_CommodityCode", nctsHCCI_CommodityCode)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_MethodeOfPayment", nctsHCCI_MethodeOfPayment)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_UNNumber_1", nctsHCCI_UNNumber_1)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_UNNumber_2", nctsHCCI_UNNumber_2)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_UNNumber_3", nctsHCCI_UNNumber_3)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_UNNumber_4", nctsHCCI_UNNumber_4)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_DeclarationType", nctsHCCI_DeclarationType)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_ArticleCode", nctsHCCI_ArticleCode)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_DescriptionOfGoods", nctsHCCI_DescriptionOfGoods)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_CusCode", nctsHCCI_CusCode)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_CountryOfDispatch", nctsHCCI_CountryOfDispatch)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_CountryOfDestination", nctsHCCI_CountryOfDestination)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_GrossMass", nctsHCCI_GrossMass)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_NetMass", nctsHCCI_NetMass)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_ReferenceNumberUCR", nctsHCCI_ReferenceNumberUCR)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_Consignor_AdressCode", nctsHCCI_Consignor_AdressCode)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_Consignor_IdentificationNumber", nctsHCCI_Consignor_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_Consignor_SubsidiaryNumber", nctsHCCI_Consignor_SubsidiaryNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_Consignor_Name", nctsHCCI_Consignor_Name)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_Consignor_StreetNumber", nctsHCCI_Consignor_StreetNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_Consignor_City", nctsHCCI_Consignor_City)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_Consignor_Postcode", nctsHCCI_Consignor_Postcode)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_Consignor_Country", nctsHCCI_Consignor_Country)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_Consignor_ContactPerson_Name", nctsHCCI_Consignor_ContactPerson_Name)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_Consignor_ContactPerson_PhoneNumber", nctsHCCI_Consignor_ContactPerson_PhoneNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_Consignor_ContactPerson_EMailAddress", nctsHCCI_Consignor_ContactPerson_EMailAddress)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalSupplyChainActor_1_Role", nctsHCCI_AdditionalSupplyChainActor_1_Role)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalSupplyChainActor_1_IdentificationNumber", nctsHCCI_AdditionalSupplyChainActor_1_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalSupplyChainActor_2_Role", nctsHCCI_AdditionalSupplyChainActor_2_Role)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalSupplyChainActor_2_IdentificationNumber", nctsHCCI_AdditionalSupplyChainActor_2_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalSupplyChainActor_3_Role", nctsHCCI_AdditionalSupplyChainActor_3_Role)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalSupplyChainActor_3_IdentificationNumber", nctsHCCI_AdditionalSupplyChainActor_3_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalSupplyChainActor_4_Role", nctsHCCI_AdditionalSupplyChainActor_4_Role)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalSupplyChainActor_4_IdentificationNumber", nctsHCCI_AdditionalSupplyChainActor_4_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalSupplyChainActor_5_Role", nctsHCCI_AdditionalSupplyChainActor_5_Role)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalSupplyChainActor_5_IdentificationNumber", nctsHCCI_AdditionalSupplyChainActor_5_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalSupplyChainActor_6_Role", nctsHCCI_AdditionalSupplyChainActor_6_Role)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalSupplyChainActor_6_IdentificationNumber", nctsHCCI_AdditionalSupplyChainActor_6_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalSupplyChainActor_7_Role", nctsHCCI_AdditionalSupplyChainActor_7_Role)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalSupplyChainActor_7_IdentificationNumber", nctsHCCI_AdditionalSupplyChainActor_7_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalSupplyChainActor_8_Role", nctsHCCI_AdditionalSupplyChainActor_8_Role)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalSupplyChainActor_8_IdentificationNumber", nctsHCCI_AdditionalSupplyChainActor_8_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalSupplyChainActor_9_Role", nctsHCCI_AdditionalSupplyChainActor_9_Role)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalSupplyChainActor_9_IdentificationNumber", nctsHCCI_AdditionalSupplyChainActor_9_IdentificationNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_GoodsValue", nctsHCCI_GoodsValue)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_CurrencyOfGoodsValue", nctsHCCI_CurrencyOfGoodsValue)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_ExchangeRate", nctsHCCI_ExchangeRate)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_ExchangeDate", nctsHCCI_ExchangeDate)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_CurrencyExchangeRateType", nctsHCCI_CurrencyExchangeRateType)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_FractionOfGoodsValue", nctsHCCI_FractionOfGoodsValue)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_GuaranteeAmount", nctsHCCI_GuaranteeAmount)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_1_Type", nctsHCCI_PreviousDocument_1_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_1_ReferenceNumber", nctsHCCI_PreviousDocument_1_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_1_DocumentLineItemNumber", nctsHCCI_PreviousDocument_1_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_1_ComplementOfInformation", nctsHCCI_PreviousDocument_1_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_1_GoodsItemNumber", nctsHCCI_PreviousDocument_1_GoodsItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_2_Type", nctsHCCI_PreviousDocument_2_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_2_ReferenceNumber", nctsHCCI_PreviousDocument_2_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_2_DocumentLineItemNumber", nctsHCCI_PreviousDocument_2_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_2_ComplementOfInformation", nctsHCCI_PreviousDocument_2_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_2_GoodsItemNumber", nctsHCCI_PreviousDocument_2_GoodsItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_3_Type", nctsHCCI_PreviousDocument_3_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_3_ReferenceNumber", nctsHCCI_PreviousDocument_3_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_3_DocumentLineItemNumber", nctsHCCI_PreviousDocument_3_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_3_ComplementOfInformation", nctsHCCI_PreviousDocument_3_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_3_GoodsItemNumber", nctsHCCI_PreviousDocument_3_GoodsItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_4_Type", nctsHCCI_PreviousDocument_4_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_4_ReferenceNumber", nctsHCCI_PreviousDocument_4_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_4_DocumentLineItemNumber", nctsHCCI_PreviousDocument_4_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_4_ComplementOfInformation", nctsHCCI_PreviousDocument_4_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_4_GoodsItemNumber", nctsHCCI_PreviousDocument_4_GoodsItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_5_Type", nctsHCCI_PreviousDocument_5_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_5_ReferenceNumber", nctsHCCI_PreviousDocument_5_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_5_DocumentLineItemNumber", nctsHCCI_PreviousDocument_5_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_5_ComplementOfInformation", nctsHCCI_PreviousDocument_5_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_5_GoodsItemNumber", nctsHCCI_PreviousDocument_5_GoodsItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_6_Type", nctsHCCI_PreviousDocument_6_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_6_ReferenceNumber", nctsHCCI_PreviousDocument_6_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_6_DocumentLineItemNumber", nctsHCCI_PreviousDocument_6_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_6_ComplementOfInformation", nctsHCCI_PreviousDocument_6_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_6_GoodsItemNumber", nctsHCCI_PreviousDocument_6_GoodsItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_7_Type", nctsHCCI_PreviousDocument_7_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_7_ReferenceNumber", nctsHCCI_PreviousDocument_7_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_7_DocumentLineItemNumber", nctsHCCI_PreviousDocument_7_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_7_ComplementOfInformation", nctsHCCI_PreviousDocument_7_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_7_GoodsItemNumber", nctsHCCI_PreviousDocument_7_GoodsItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_8_Type", nctsHCCI_PreviousDocument_8_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_8_ReferenceNumber", nctsHCCI_PreviousDocument_8_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_8_DocumentLineItemNumber", nctsHCCI_PreviousDocument_8_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_8_ComplementOfInformation", nctsHCCI_PreviousDocument_8_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_8_GoodsItemNumber", nctsHCCI_PreviousDocument_8_GoodsItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_9_Type", nctsHCCI_PreviousDocument_9_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_9_ReferenceNumber", nctsHCCI_PreviousDocument_9_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_9_DocumentLineItemNumber", nctsHCCI_PreviousDocument_9_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_9_ComplementOfInformation", nctsHCCI_PreviousDocument_9_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_PreviousDocument_9_GoodsItemNumber", nctsHCCI_PreviousDocument_9_GoodsItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_1_Type", nctsHCCI_SupportingDocument_1_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_1_ReferenceNumber", nctsHCCI_SupportingDocument_1_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_1_DocumentLineItemNumber", nctsHCCI_SupportingDocument_1_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_1_ComplementOfInformation", nctsHCCI_SupportingDocument_1_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_2_Type", nctsHCCI_SupportingDocument_2_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_2_ReferenceNumber", nctsHCCI_SupportingDocument_2_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_2_DocumentLineItemNumber", nctsHCCI_SupportingDocument_2_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_2_ComplementOfInformation", nctsHCCI_SupportingDocument_2_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_3_Type", nctsHCCI_SupportingDocument_3_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_3_ReferenceNumber", nctsHCCI_SupportingDocument_3_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_3_DocumentLineItemNumber", nctsHCCI_SupportingDocument_3_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_3_ComplementOfInformation", nctsHCCI_SupportingDocument_3_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_4_Type", nctsHCCI_SupportingDocument_4_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_4_ReferenceNumber", nctsHCCI_SupportingDocument_4_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_4_DocumentLineItemNumber", nctsHCCI_SupportingDocument_4_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_4_ComplementOfInformation", nctsHCCI_SupportingDocument_4_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_5_Type", nctsHCCI_SupportingDocument_5_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_5_ReferenceNumber", nctsHCCI_SupportingDocument_5_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_5_DocumentLineItemNumber", nctsHCCI_SupportingDocument_5_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_5_ComplementOfInformation", nctsHCCI_SupportingDocument_5_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_6_Type", nctsHCCI_SupportingDocument_6_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_6_ReferenceNumber", nctsHCCI_SupportingDocument_6_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_6_DocumentLineItemNumber", nctsHCCI_SupportingDocument_6_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_6_ComplementOfInformation", nctsHCCI_SupportingDocument_6_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_7_Type", nctsHCCI_SupportingDocument_7_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_7_ReferenceNumber", nctsHCCI_SupportingDocument_7_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_7_DocumentLineItemNumber", nctsHCCI_SupportingDocument_7_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_7_ComplementOfInformation", nctsHCCI_SupportingDocument_7_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_8_Type", nctsHCCI_SupportingDocument_8_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_8_ReferenceNumber", nctsHCCI_SupportingDocument_8_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_8_DocumentLineItemNumber", nctsHCCI_SupportingDocument_8_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_8_ComplementOfInformation", nctsHCCI_SupportingDocument_8_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_9_Type", nctsHCCI_SupportingDocument_9_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_9_ReferenceNumber", nctsHCCI_SupportingDocument_9_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_9_DocumentLineItemNumber", nctsHCCI_SupportingDocument_9_DocumentLineItemNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_SupportingDocument_9_ComplementOfInformation", nctsHCCI_SupportingDocument_9_ComplementOfInformation)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalReference_1_Type", nctsHCCI_AdditionalReference_1_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalReference_1_ReferenceNumber", nctsHCCI_AdditionalReference_1_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalReference_2_Type", nctsHCCI_AdditionalReference_2_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalReference_2_ReferenceNumber", nctsHCCI_AdditionalReference_2_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalReference_3_Type", nctsHCCI_AdditionalReference_3_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalReference_3_ReferenceNumber", nctsHCCI_AdditionalReference_3_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalReference_4_Type", nctsHCCI_AdditionalReference_4_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalReference_4_ReferenceNumber", nctsHCCI_AdditionalReference_4_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalReference_5_Type", nctsHCCI_AdditionalReference_5_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalReference_5_ReferenceNumber", nctsHCCI_AdditionalReference_5_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalReference_6_Type", nctsHCCI_AdditionalReference_6_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalReference_6_ReferenceNumber", nctsHCCI_AdditionalReference_6_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalReference_7_Type", nctsHCCI_AdditionalReference_7_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalReference_7_ReferenceNumber", nctsHCCI_AdditionalReference_7_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalReference_8_Type", nctsHCCI_AdditionalReference_8_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalReference_8_ReferenceNumber", nctsHCCI_AdditionalReference_8_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalReference_9_Type", nctsHCCI_AdditionalReference_9_Type)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalReference_9_ReferenceNumber", nctsHCCI_AdditionalReference_9_ReferenceNumber)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalInformation_1_Code", nctsHCCI_AdditionalInformation_1_Code)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalInformation_1_Text", nctsHCCI_AdditionalInformation_1_Text)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalInformation_2_Code", nctsHCCI_AdditionalInformation_2_Code)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalInformation_2_Text", nctsHCCI_AdditionalInformation_2_Text)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalInformation_3_Code", nctsHCCI_AdditionalInformation_3_Code)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalInformation_3_Text", nctsHCCI_AdditionalInformation_3_Text)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalInformation_4_Code", nctsHCCI_AdditionalInformation_4_Code)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalInformation_4_Text", nctsHCCI_AdditionalInformation_4_Text)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalInformation_5_Code", nctsHCCI_AdditionalInformation_5_Code)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalInformation_5_Text", nctsHCCI_AdditionalInformation_5_Text)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalInformation_6_Code", nctsHCCI_AdditionalInformation_6_Code)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalInformation_6_Text", nctsHCCI_AdditionalInformation_6_Text)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalInformation_7_Code", nctsHCCI_AdditionalInformation_7_Code)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalInformation_7_Text", nctsHCCI_AdditionalInformation_7_Text)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalInformation_8_Code", nctsHCCI_AdditionalInformation_8_Code)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalInformation_8_Text", nctsHCCI_AdditionalInformation_8_Text)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalInformation_9_Code", nctsHCCI_AdditionalInformation_9_Code)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCI_AdditionalInformation_9_Text", nctsHCCI_AdditionalInformation_9_Text)) + + + + Return list + End Function + + + Public Function INSERT() As Boolean + Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList() + 'Return SQL.doSQLVarList(getInsertCmd, "FMZOLL", , list) + nctsHCCI_Id = SQL.doSQLVarListID(nctsHCCI_Id, getInsertCmd, "FMZOLL", , list) + Return nctsHCCI_Id > 0 + End Function + + Public Function getInsertCmd() As String + Try + Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList() + Dim str As String = "" + Dim values As String = "" + For Each i In list + If Not i.isPrimaryParam Then + str &= "[" & i.Text & "]," + values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & "," + End If + Next + str = str.Substring(0, str.Length - 1) 'wg. ',' + values = values.Substring(0, values.Length - 1) 'wg. ',' + Return (" INSERT INTO tblDakosy_NCTSOut004_HouseConsignment_ConsignmentItem (" & str & ") VALUES(" & values & ") ") + Catch ex As Exception + MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + End Try + Return "" + End Function + + + + + Public Sub LOAD_Packing() + Try + nctsHCCI_PACKAGING.Clear() + Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL() + Using cmd As New SqlCommand("SELECT * FROM tblDakosy_NCTSOut004_HouseConsignment_ConsignmentItem_Packaging WHERE [nctsHCCIPK_NctsHCCIId]=@nctsHCCI_id ", conn) + cmd.Parameters.AddWithValue("@nctsHCCI_id", Me.nctsHCCI_Id) + Dim dr = cmd.ExecuteReader() + While dr.Read + Dim l As New cDakosy_NCTSOut004_HouseConsignment_ConsignmentItem_Packaging + For Each i In l.getParameterList() + Dim propInfo As PropertyInfo = l.GetType.GetProperty(i.Scalarvariable) + If dr.Item(i.Text) Is DBNull.Value Then + propInfo.SetValue(l, Nothing) + Else + propInfo.SetValue(l, dr.Item(i.Text)) + End If + Next + nctsHCCI_PACKAGING.Add(l) + End While + dr.Close() + End Using + End Using + Catch ex As Exception + MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + End Try + End Sub + + Public Function DELETE_Packing() As Boolean 'obj As Object, tablename As String, where As String) As Boolean + Dim sqlstr = " DELETE FROM [tblDakosy_NCTSOut004_HouseConsignment_ConsignmentItem_Packaging] WHERE nctsHCCIPK_NctsHCCIId=" & Me.nctsHCCI_Id & " " + Return SQL.doSQL(sqlstr, "FMZOLL") + End Function + + Public Function INSERT_Packing(NctsHCCIId, NctsHCId, ncts_id) As Boolean + For Each p In nctsHCCI_PACKAGING + p.nctsHCCIPK_NctsHCCIId = NctsHCCIId + p.nctsHCCIPK_NctsHCId = NctsHCId + p.nctsHCCIPK_NctsId = ncts_id + If Not p.INSERT() Then + Return False + End If + Next + + Return True + End Function + + + + + + +End Class + + + +Public Class cDakosy_NCTSOut004_HouseConsignment_ConsignmentItem_Packaging + + + Property nctsHCCIPK_Id As Integer + Property nctsHCCIPK_NctsId As Integer + Property nctsHCCIPK_NctsHCId As Integer + Property nctsHCCIPK_NctsHCCIId As Integer + Property nctsHCCIPK_NumberOfPackages As Object = Nothing + Property nctsHCCIPK_TypeOfPackages As Object = Nothing + Property nctsHCCIPK_ShippingMarks As Object = Nothing + Property nctsHCCIPK_GoodsItemNumber As Object = Nothing + + + Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL + + Sub New() + ' Me.nctsWpPk_nctsWPId = nctsWpPk_nctsWPId + End Sub + + + Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) + Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCIPK_Id", nctsHCCIPK_Id, , True, True)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCIPK_NctsId", nctsHCCIPK_NctsId)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCIPK_NctsHCId", nctsHCCIPK_NctsHCId)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCIPK_NctsHCCIId", nctsHCCIPK_NctsHCCIId)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCIPK_NumberOfPackages", nctsHCCIPK_NumberOfPackages)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCIPK_TypeOfPackages", nctsHCCIPK_TypeOfPackages)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCIPK_ShippingMarks", nctsHCCIPK_ShippingMarks)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("nctsHCCIPK_GoodsItemNumber", nctsHCCIPK_GoodsItemNumber)) + Return list + End Function + + + Public Function INSERT() As Boolean + Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList() + nctsHCCIPK_Id = SQL.doSQLVarListID(nctsHCCIPK_Id, getInsertCmd(), "FMZOLL", , list) + Return nctsHCCIPK_Id > 0 + End Function + + Public Function getInsertCmd() As String + Try + Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList() + Dim str As String = "" + Dim values As String = "" + For Each i In list + If Not i.isPrimaryParam Then + str &= "[" & i.Text & "]," + values &= "@" & i.Scalarvariable & "," '.Replace("-", "").Replace(" ", "") & "," + End If + Next + str = str.Substring(0, str.Length - 1) 'wg. ',' + values = values.Substring(0, values.Length - 1) 'wg. ',' + Return (" INSERT INTO tblDakosy_NCTSOut004_HouseConsignment_ConsignmentItem_Packaging (" & str & ") VALUES(" & values & ") ") + Catch ex As Exception + MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace) + End Try + Return "" + End Function + +End Class diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/xsd2code.config b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/xsd2code.config new file mode 100644 index 0000000..6c3efc7 --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/xsd2code.config @@ -0,0 +1,17 @@ + + + Net47 + VersandanmeldungNCTSDE_004 + VisualBasic + xsd2code.exe <XSD File> VersandanmeldungNCTSDE_004 <Output file> /l VisualBasic /p Net47 /clean /s /xml /xa /Indent2Space + + + true + + + + true + AllClasses + + + diff --git a/DAKOSY_Worker/DAKOSY_Worker_lib.vbproj b/DAKOSY_Worker/DAKOSY_Worker_lib.vbproj index 15228df..15a8ec0 100644 --- a/DAKOSY_Worker/DAKOSY_Worker_lib.vbproj +++ b/DAKOSY_Worker/DAKOSY_Worker_lib.vbproj @@ -120,17 +120,27 @@ + + + + + + + + + + @@ -309,9 +319,18 @@ Designer + + Designer + + + Designer + Designer + + Designer + Designer @@ -321,6 +340,9 @@ Designer + + Designer + Designer @@ -333,12 +355,19 @@ Designer + + Designer + + Designer Designer + + Designer + Designer @@ -349,12 +378,22 @@ Designer + + Designer + + + Designer + Designer Designer + + Designer + + Designer diff --git a/initATLASAufschubkonten/cGetMsgType.vb b/initATLASAufschubkonten/cGetMsgType.vb index 400483f..6dada27 100644 --- a/initATLASAufschubkonten/cGetMsgType.vb +++ b/initATLASAufschubkonten/cGetMsgType.vb @@ -55,9 +55,12 @@ Public Class cGetMsgType Return False End Function - Shared Function isNCTS_AnrechnungReferenzbetraege(doc As XmlDocument) As Boolean + Shared Function isNCTS_AnrechnungReferenzbetraege(doc As XmlDocument, ByRef version As String) As Boolean If doc.HasChildNodes Then If doc.GetElementsByTagName("AnrechnungReferenzbetraegeNCTSDE").Count > 0 Then + If doc.GetElementsByTagName("Version").Count > 0 Then + version = doc.GetElementsByTagName("Version")(0).InnerText + End If Return True End If End If @@ -67,9 +70,12 @@ Public Class cGetMsgType - Shared Function isNCTS_StatusmeldungNCTSDE(doc As XmlDocument) As Boolean + Shared Function isNCTS_StatusmeldungNCTSDE(doc As XmlDocument, ByRef version As String) As Boolean If doc.HasChildNodes Then If doc.GetElementsByTagName("StatusmeldungNCTSDE").Count > 0 Then + If doc.GetElementsByTagName("Version").Count > 0 Then + version = doc.GetElementsByTagName("Version")(0).InnerText + End If Return True End If End If @@ -92,9 +98,24 @@ Public Class cGetMsgType - Shared Function isNCTS_Erledigungsmeldung(doc As XmlDocument) As Boolean + Shared Function isNCTS_Erledigungsmeldung(doc As XmlDocument, ByRef version As String) As Boolean If doc.HasChildNodes Then If doc.GetElementsByTagName("ErledigungsmeldungNCTSDE").Count > 0 Then + If doc.GetElementsByTagName("Version").Count > 0 Then + version = doc.GetElementsByTagName("Version")(0).InnerText + End If + Return True + End If + End If + Return False + End Function + + Shared Function isNCTS_Ereignismitteilung(doc As XmlDocument, ByRef version As String) As Boolean + If doc.HasChildNodes Then + If doc.GetElementsByTagName("EreignismitteilungNCTSDE").Count > 0 Then + If doc.GetElementsByTagName("Version").Count > 0 Then + version = doc.GetElementsByTagName("Version")(0).InnerText + End If Return True End If End If @@ -536,6 +557,15 @@ Public Class cGetMsgType Return False End Function + Shared Function isNCTS_VersandanmeldungXML_DETPDD(doc As XmlDocument) As Boolean + If doc.HasChildNodes Then + If doc.GetElementsByTagName("DETPDD").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 @@ -545,9 +575,12 @@ Public Class cGetMsgType Return False End Function - Shared Function isNCTS_Versandbestaetigung(doc As XmlDocument) As Boolean + Shared Function isNCTS_Versandbestaetigung(doc As XmlDocument, ByRef version As String) As Boolean If doc.HasChildNodes Then If doc.GetElementsByTagName("VersandbestaetigungNCTSDE").Count > 0 Then + If doc.GetElementsByTagName("Version").Count > 0 Then + version = doc.GetElementsByTagName("Version")(0).InnerText + End If Return True End If End If diff --git a/initATLASAufschubkonten/cWorker_NCTS.vb b/initATLASAufschubkonten/cWorker_NCTS.vb index 54dacb0..f8eb200 100644 --- a/initATLASAufschubkonten/cWorker_NCTS.vb +++ b/initATLASAufschubkonten/cWorker_NCTS.vb @@ -1,6 +1,9 @@ Imports System.Globalization Imports System.IO Imports System.Xml +Imports DAKOSY_Worker +Imports DocumentFormat.OpenXml +Imports iTextSharp.text.pdf Public Class cWorker_NCTS Public Shared Dateiname = "" @@ -416,6 +419,712 @@ Public Class cWorker_NCTS End Try End Function + Public Shared Function readNCTS_VersandanmeldungXML_DETPDD(FORM As frmDYNachrichtenVerarbeitung, doc As XmlDocument, ByRef statusTMP As DAKOSY_Worker.cDakosy_Statusmeldungen) As String + Try + readNCTS_VersandanmeldungXML_DETPDD = "" + Dim sw = New StringWriter() + Dim xw = New XmlTextWriter(sw) + doc.WriteTo(xw) + Dim XmlString = sw.ToString() + If XmlString.Contains("") Then + Dim xmlDETPDD = XmlString.Substring(XmlString.IndexOf(""), XmlString.IndexOf("") + 9 - XmlString.IndexOf("")) + ' MsgBox(xmlDETPDD) + Dim p = Path.GetTempFileName + + Using outputFile As New StreamWriter(p, False, System.Text.Encoding.Default) + outputFile.Write(xmlDETPDD) + outputFile.Close() + + + Dim AnsprechpTMP_Email = "" + Dim DETPDD As DAKOSY_Worker.DETPDD.DETPDD = DAKOSY_Worker.DETPDD.DETPDD.LoadFromFile(p) + ' Dim NCTS As New DAKOSY_Worker.cDakosyNCTS + + + + If DETPDD IsNot Nothing AndAlso DETPDD.TransitOperation IsNot Nothing AndAlso DETPDD.TransitOperation.LRN IsNot Nothing AndAlso DETPDD.TransitOperation.LRN <> "" Then + readNCTS_VersandanmeldungXML_DETPDD = DETPDD.TransitOperation.LRN + Else + Return "" 'Keine Bezugsnummer + End If + + Dim DY_TMP As DAKOSY_Worker.cDakosy_Zollanmeldungen = frmDYNachrichtenVerarbeitung.saveDY_ZA(readNCTS_VersandanmeldungXML_DETPDD, "NCTS") + + Dim NCTS As DAKOSY_Worker.cDakosyNCTSOut004 = DAKOSY_Worker.cDakosyNCTSOut004.LOADByBezugsNr(readNCTS_VersandanmeldungXML_DETPDD, 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_DETPDD + + If DY_TMP.dy_AvisoId Is Nothing Then + DY_TMP.tryFindAviso() + DY_TMP.SAVE() + End If + + If DETPDD IsNot Nothing Then + + + If DETPDD.TransitOperation IsNot Nothing Then + If getDatumXMLNothing(DETPDD.TransitOperation.limitDate.Date) IsNot Nothing Then + NCTS.ncts_LimitDate = CDate(getDatumXMLNothing(DETPDD.TransitOperation.limitDate.Date)) + End If + NCTS.ncts_SpecificCircomstanceIndicator = DETPDD.TransitOperation.specificCircumstanceIndicator + NCTS.ncts_ReductedDatasetIndicator = DETPDD.TransitOperation.reducedDatasetIndicator + NCTS.ncts_Security = DETPDD.TransitOperation.security + If DETPDD.TransitOperation.declarationType IsNot Nothing Then NCTS.ncts_Declarationtype = DETPDD.TransitOperation.declarationType + End If + + If DETPDD.Consignment IsNot Nothing Then + NCTS.ncts_CountryOfDispatch = DETPDD.Consignment.countryOfDispatch + NCTS.ncts_CountryOfDestination = DETPDD.Consignment.countryOfDestination + + If DETPDD.Consignment.PlaceOfLoading IsNot Nothing Then + NCTS.ncts_PlaceOfLoading_Country = DETPDD.Consignment.PlaceOfLoading.country + NCTS.ncts_PlaceOfLoading_Location = DETPDD.Consignment.PlaceOfLoading.location + End If + If DETPDD.Consignment.PlaceOfUnloading IsNot Nothing Then + NCTS.ncts_PlaceOfUnLoading_Country = DETPDD.Consignment.PlaceOfUnloading.country + NCTS.ncts_PlaceOfUnLoading_Location = DETPDD.Consignment.PlaceOfUnloading.location + End If + + NCTS.ncts_GrossMass = DETPDD.Consignment.grossMass + If DETPDD.Consignment.TransportCharges IsNot Nothing Then + 'NCTS.ncts_TransportCharges = DETPDD.Consignment.TransportCharges.methodOfPayment + End If + + 'Dim PkCnt = 0 + 'If DETPDD.Consignment.HouseConsignment IsNot Nothing Then + ' For Each HC In DETPDD.Consignment.HouseConsignment + ' If HC.ConsignmentItem IsNot Nothing Then + ' For Each HCCI In HC.ConsignmentItem + ' If HCCI.Packaging IsNot Nothing Then + ' For Each PK In HCCI.Packaging + ' If PK.numberOfPackages IsNot Nothing Then PkCnt += PK.numberOfPackages + ' Next + + ' End If + ' Next + ' End If + ' Next + 'End If + '' NCTS.ncts_GesamtAnzahlPackstuecke = PkCnt + + + If DETPDD.Consignment.TransportEquipment IsNot Nothing Then + For Each TE In DETPDD.Consignment.TransportEquipment + Dim NCTS_TE = New cDakosy_NCTSOut004_TransportEquipment + + NCTS_TE.nctsTE_NumberOfSeals = TE.numberOfSeals + NCTS_TE.nctsTE_ContainerIdentificationNumber = TE.containerIdentificationNumber + NCTS_TE.nctsTE_GoodsReference = TE.GoodsReference + + + Dim cntTmp = 0 + For Each SEAL In TE.Seal + If cntTmp = 0 Then NCTS_TE.nctsTE_Seal_1 = SEAL.identifier + If cntTmp = 1 Then NCTS_TE.nctsTE_Seal_2 = SEAL.identifier + If cntTmp = 2 Then NCTS_TE.nctsTE_Seal_3 = SEAL.identifier + If cntTmp = 3 Then NCTS_TE.nctsTE_Seal_4 = SEAL.identifier + If cntTmp = 4 Then NCTS_TE.nctsTE_Seal_5 = SEAL.identifier + If cntTmp = 5 Then NCTS_TE.nctsTE_Seal_6 = SEAL.identifier + If cntTmp = 6 Then NCTS_TE.nctsTE_Seal_7 = SEAL.identifier + If cntTmp = 7 Then NCTS_TE.nctsTE_Seal_8 = SEAL.identifier + If cntTmp = 8 Then NCTS_TE.nctsTE_Seal_9 = SEAL.identifier + If cntTmp = 9 Then NCTS_TE.nctsTE_Seal_10 = SEAL.identifier + If cntTmp = 10 Then NCTS_TE.nctsTE_Seal_11 = SEAL.identifier + If cntTmp = 11 Then NCTS_TE.nctsTE_Seal_12 = SEAL.identifier + If cntTmp = 12 Then NCTS_TE.nctsTE_Seal_13 = SEAL.identifier + If cntTmp = 13 Then NCTS_TE.nctsTE_Seal_14 = SEAL.identifier + If cntTmp = 14 Then NCTS_TE.nctsTE_Seal_15 = SEAL.identifier + cntTmp += 1 + Next + NCTS.ncts_TRANSPORTEQUIPMENT.Add(NCTS_TE) + Next + + + End If + + + If DETPDD.Consignment.CountryOfRoutingOfConsignment IsNot Nothing Then + Dim cntTmp = 0 + For Each RT In DETPDD.Consignment.CountryOfRoutingOfConsignment + + If cntTmp = 0 Then NCTS.ncts_CountryOfRoutingOfConsignment_1 = RT.country + If cntTmp = 1 Then NCTS.ncts_CountryOfRoutingOfConsignment_2 = RT.country + If cntTmp = 2 Then NCTS.ncts_CountryOfRoutingOfConsignment_3 = RT.country + If cntTmp = 3 Then NCTS.ncts_CountryOfRoutingOfConsignment_4 = RT.country + If cntTmp = 4 Then NCTS.ncts_CountryOfRoutingOfConsignment_5 = RT.country + If cntTmp = 5 Then NCTS.ncts_CountryOfRoutingOfConsignment_6 = RT.country + If cntTmp = 6 Then NCTS.ncts_CountryOfRoutingOfConsignment_7 = RT.country + If cntTmp = 7 Then NCTS.ncts_CountryOfRoutingOfConsignment_8 = RT.country + If cntTmp = 8 Then NCTS.ncts_CountryOfRoutingOfConsignment_9 = RT.country + If cntTmp = 9 Then NCTS.ncts_CountryOfRoutingOfConsignment_10 = RT.country + If cntTmp = 10 Then NCTS.ncts_CountryOfRoutingOfConsignment_11 = RT.country + If cntTmp = 11 Then NCTS.ncts_CountryOfRoutingOfConsignment_12 = RT.country + If cntTmp = 12 Then NCTS.ncts_CountryOfRoutingOfConsignment_13 = RT.country + If cntTmp = 13 Then NCTS.ncts_CountryOfRoutingOfConsignment_14 = RT.country + If cntTmp = 14 Then NCTS.ncts_CountryOfRoutingOfConsignment_15 = RT.country + cntTmp += 1 + Next + + + End If + + + + + If DETPDD.Consignment.PreviousDocument IsNot Nothing Then + Dim cntTmp = 0 + For Each S In DETPDD.Consignment.PreviousDocument + + If cntTmp = 0 Then NCTS.ncts_PreviousDocument_1_ReferenceNumber = S.referenceNumber : NCTS.ncts_PreviousDocument_1_Type = S.type : NCTS.ncts_PreviousDocument_1_ComplementOfInformation = S.complementOfInformation + If cntTmp = 1 Then NCTS.ncts_PreviousDocument_2_ReferenceNumber = S.referenceNumber : NCTS.ncts_PreviousDocument_2_Type = S.type : NCTS.ncts_PreviousDocument_2_ComplementOfInformation = S.complementOfInformation + If cntTmp = 2 Then NCTS.ncts_PreviousDocument_3_ReferenceNumber = S.referenceNumber : NCTS.ncts_PreviousDocument_3_Type = S.type : NCTS.ncts_PreviousDocument_3_ComplementOfInformation = S.complementOfInformation + If cntTmp = 3 Then NCTS.ncts_PreviousDocument_4_ReferenceNumber = S.referenceNumber : NCTS.ncts_PreviousDocument_4_Type = S.type : NCTS.ncts_PreviousDocument_4_ComplementOfInformation = S.complementOfInformation + If cntTmp = 4 Then NCTS.ncts_PreviousDocument_5_ReferenceNumber = S.referenceNumber : NCTS.ncts_PreviousDocument_5_Type = S.type : NCTS.ncts_PreviousDocument_5_ComplementOfInformation = S.complementOfInformation + If cntTmp = 5 Then NCTS.ncts_PreviousDocument_6_ReferenceNumber = S.referenceNumber : NCTS.ncts_PreviousDocument_6_Type = S.type : NCTS.ncts_PreviousDocument_6_ComplementOfInformation = S.complementOfInformation + If cntTmp = 6 Then NCTS.ncts_PreviousDocument_7_ReferenceNumber = S.referenceNumber : NCTS.ncts_PreviousDocument_7_Type = S.type : NCTS.ncts_PreviousDocument_7_ComplementOfInformation = S.complementOfInformation + If cntTmp = 7 Then NCTS.ncts_PreviousDocument_8_ReferenceNumber = S.referenceNumber : NCTS.ncts_PreviousDocument_8_Type = S.type : NCTS.ncts_PreviousDocument_8_ComplementOfInformation = S.complementOfInformation + If cntTmp = 8 Then NCTS.ncts_PreviousDocument_9_ReferenceNumber = S.referenceNumber : NCTS.ncts_PreviousDocument_9_Type = S.type : NCTS.ncts_PreviousDocument_9_ComplementOfInformation = S.complementOfInformation + + cntTmp += 1 + Next + End If + + + + If DETPDD.Consignment.SupportingDocument IsNot Nothing Then + Dim cntTmp = 0 + For Each S In DETPDD.Consignment.SupportingDocument + + If cntTmp = 0 Then NCTS.ncts_SupportingDocument_1_ReferenceNumber = S.referenceNumber : NCTS.ncts_SupportingDocument_1_Type = S.type : NCTS.ncts_SupportingDocument_1_DocumentLineItemNumber = S.documentLineItemNumber : NCTS.ncts_SupportingDocument_1_ComplementOfInformation = S.complementOfInformation + If cntTmp = 1 Then NCTS.ncts_SupportingDocument_2_ReferenceNumber = S.referenceNumber : NCTS.ncts_SupportingDocument_2_Type = S.type : NCTS.ncts_SupportingDocument_2_DocumentLineItemNumber = S.documentLineItemNumber : NCTS.ncts_SupportingDocument_2_ComplementOfInformation = S.complementOfInformation + If cntTmp = 2 Then NCTS.ncts_SupportingDocument_3_ReferenceNumber = S.referenceNumber : NCTS.ncts_SupportingDocument_3_Type = S.type : NCTS.ncts_SupportingDocument_3_DocumentLineItemNumber = S.documentLineItemNumber : NCTS.ncts_SupportingDocument_3_ComplementOfInformation = S.complementOfInformation + If cntTmp = 3 Then NCTS.ncts_SupportingDocument_4_ReferenceNumber = S.referenceNumber : NCTS.ncts_SupportingDocument_4_Type = S.type : NCTS.ncts_SupportingDocument_4_DocumentLineItemNumber = S.documentLineItemNumber : NCTS.ncts_SupportingDocument_4_ComplementOfInformation = S.complementOfInformation + If cntTmp = 4 Then NCTS.ncts_SupportingDocument_5_ReferenceNumber = S.referenceNumber : NCTS.ncts_SupportingDocument_5_Type = S.type : NCTS.ncts_SupportingDocument_5_DocumentLineItemNumber = S.documentLineItemNumber : NCTS.ncts_SupportingDocument_5_ComplementOfInformation = S.complementOfInformation + If cntTmp = 5 Then NCTS.ncts_SupportingDocument_6_ReferenceNumber = S.referenceNumber : NCTS.ncts_SupportingDocument_6_Type = S.type : NCTS.ncts_SupportingDocument_6_DocumentLineItemNumber = S.documentLineItemNumber : NCTS.ncts_SupportingDocument_6_ComplementOfInformation = S.complementOfInformation + If cntTmp = 6 Then NCTS.ncts_SupportingDocument_7_ReferenceNumber = S.referenceNumber : NCTS.ncts_SupportingDocument_7_Type = S.type : NCTS.ncts_SupportingDocument_7_DocumentLineItemNumber = S.documentLineItemNumber : NCTS.ncts_SupportingDocument_7_ComplementOfInformation = S.complementOfInformation + If cntTmp = 7 Then NCTS.ncts_SupportingDocument_8_ReferenceNumber = S.referenceNumber : NCTS.ncts_SupportingDocument_8_Type = S.type : NCTS.ncts_SupportingDocument_8_DocumentLineItemNumber = S.documentLineItemNumber : NCTS.ncts_SupportingDocument_8_ComplementOfInformation = S.complementOfInformation + If cntTmp = 8 Then NCTS.ncts_SupportingDocument_9_ReferenceNumber = S.referenceNumber : NCTS.ncts_SupportingDocument_9_Type = S.type : NCTS.ncts_SupportingDocument_9_DocumentLineItemNumber = S.documentLineItemNumber : NCTS.ncts_SupportingDocument_9_ComplementOfInformation = S.complementOfInformation + + cntTmp += 1 + Next + End If + + + If DETPDD.Consignment.TransportDocument IsNot Nothing Then + Dim cntTmp = 0 + For Each S In DETPDD.Consignment.TransportDocument + + If cntTmp = 0 Then NCTS.ncts_TransportDocument_1_ReferenceNumber = S.referenceNumber : NCTS.ncts_TransportDocument_1_Type = S.type + If cntTmp = 1 Then NCTS.ncts_TransportDocument_2_ReferenceNumber = S.referenceNumber : NCTS.ncts_TransportDocument_2_Type = S.type + If cntTmp = 2 Then NCTS.ncts_TransportDocument_3_ReferenceNumber = S.referenceNumber : NCTS.ncts_TransportDocument_3_Type = S.type + If cntTmp = 3 Then NCTS.ncts_TransportDocument_4_ReferenceNumber = S.referenceNumber : NCTS.ncts_TransportDocument_4_Type = S.type + If cntTmp = 4 Then NCTS.ncts_TransportDocument_5_ReferenceNumber = S.referenceNumber : NCTS.ncts_TransportDocument_5_Type = S.type + If cntTmp = 5 Then NCTS.ncts_TransportDocument_6_ReferenceNumber = S.referenceNumber : NCTS.ncts_TransportDocument_6_Type = S.type + If cntTmp = 6 Then NCTS.ncts_TransportDocument_7_ReferenceNumber = S.referenceNumber : NCTS.ncts_TransportDocument_7_Type = S.type + If cntTmp = 7 Then NCTS.ncts_TransportDocument_8_ReferenceNumber = S.referenceNumber : NCTS.ncts_TransportDocument_8_Type = S.type + If cntTmp = 8 Then NCTS.ncts_TransportDocument_9_ReferenceNumber = S.referenceNumber : NCTS.ncts_TransportDocument_9_Type = S.type + + cntTmp += 1 + Next + End If + + If DETPDD.Consignment.AdditionalReference IsNot Nothing Then + Dim cntTmp = 0 + For Each S In DETPDD.Consignment.AdditionalReference + + If cntTmp = 0 Then NCTS.ncts_AdditionalReference_1_ReferenceNumber = S.referenceNumber : NCTS.ncts_AdditionalReference_1_Type = S.type + If cntTmp = 1 Then NCTS.ncts_AdditionalReference_2_ReferenceNumber = S.referenceNumber : NCTS.ncts_AdditionalReference_2_Type = S.type + If cntTmp = 2 Then NCTS.ncts_AdditionalReference_3_ReferenceNumber = S.referenceNumber : NCTS.ncts_AdditionalReference_3_Type = S.type + If cntTmp = 3 Then NCTS.ncts_AdditionalReference_4_ReferenceNumber = S.referenceNumber : NCTS.ncts_AdditionalReference_4_Type = S.type + If cntTmp = 4 Then NCTS.ncts_AdditionalReference_5_ReferenceNumber = S.referenceNumber : NCTS.ncts_AdditionalReference_5_Type = S.type + If cntTmp = 5 Then NCTS.ncts_AdditionalReference_6_ReferenceNumber = S.referenceNumber : NCTS.ncts_AdditionalReference_6_Type = S.type + If cntTmp = 6 Then NCTS.ncts_AdditionalReference_7_ReferenceNumber = S.referenceNumber : NCTS.ncts_AdditionalReference_7_Type = S.type + If cntTmp = 7 Then NCTS.ncts_AdditionalReference_8_ReferenceNumber = S.referenceNumber : NCTS.ncts_AdditionalReference_8_Type = S.type + If cntTmp = 8 Then NCTS.ncts_AdditionalReference_9_ReferenceNumber = S.referenceNumber : NCTS.ncts_AdditionalReference_9_Type = S.type + + cntTmp += 1 + Next + End If + + + If DETPDD.Consignment.AdditionalInformation IsNot Nothing Then + Dim cntTmp = 0 + For Each S In DETPDD.Consignment.AdditionalInformation + + If cntTmp = 0 Then NCTS.ncts_AdditionalInformation_1_Code = S.code : NCTS.ncts_AdditionalInformation_1_Text = S.text + If cntTmp = 1 Then NCTS.ncts_AdditionalInformation_2_Code = S.code : NCTS.ncts_AdditionalInformation_2_Text = S.text + If cntTmp = 2 Then NCTS.ncts_AdditionalInformation_3_Code = S.code : NCTS.ncts_AdditionalInformation_3_Text = S.text + If cntTmp = 3 Then NCTS.ncts_AdditionalInformation_4_Code = S.code : NCTS.ncts_AdditionalInformation_4_Text = S.text + If cntTmp = 4 Then NCTS.ncts_AdditionalInformation_5_Code = S.code : NCTS.ncts_AdditionalInformation_5_Text = S.text + If cntTmp = 5 Then NCTS.ncts_AdditionalInformation_6_Code = S.code : NCTS.ncts_AdditionalInformation_6_Text = S.text + If cntTmp = 6 Then NCTS.ncts_AdditionalInformation_7_Code = S.code : NCTS.ncts_AdditionalInformation_7_Text = S.text + If cntTmp = 7 Then NCTS.ncts_AdditionalInformation_8_Code = S.code : NCTS.ncts_AdditionalInformation_8_Text = S.text + If cntTmp = 8 Then NCTS.ncts_AdditionalInformation_9_Code = S.code : NCTS.ncts_AdditionalInformation_9_Text = S.text + + cntTmp += 1 + Next + End If + + + + End If + + + + If DETPDD.CustomsOfficeOfTransitDeclared IsNot Nothing Then + Dim cntTmp = 0 + For Each CST In DETPDD.CustomsOfficeOfTransitDeclared + + If cntTmp = 0 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_1_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_1_ArravialDateTime = CDate(getDatumXMLNothing(CST.arrivalDateAndTimeEstimated)) + If cntTmp = 1 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_2_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_2_ArravialDateTime = CDate(getDatumXMLNothing(CST.arrivalDateAndTimeEstimated)) + If cntTmp = 2 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_3_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_3_ArravialDateTime = CDate(getDatumXMLNothing(CST.arrivalDateAndTimeEstimated)) + If cntTmp = 3 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_4_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_4_ArravialDateTime = CDate(getDatumXMLNothing(CST.arrivalDateAndTimeEstimated)) + If cntTmp = 4 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_5_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_5_ArravialDateTime = CDate(getDatumXMLNothing(CST.arrivalDateAndTimeEstimated)) + If cntTmp = 5 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_6_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_6_ArravialDateTime = CDate(getDatumXMLNothing(CST.arrivalDateAndTimeEstimated)) + If cntTmp = 6 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_7_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_7_ArravialDateTime = CDate(getDatumXMLNothing(CST.arrivalDateAndTimeEstimated)) + If cntTmp = 7 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_8_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_8_ArravialDateTime = CDate(getDatumXMLNothing(CST.arrivalDateAndTimeEstimated)) + If cntTmp = 8 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_9_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_9_ArravialDateTime = CDate(getDatumXMLNothing(CST.arrivalDateAndTimeEstimated)) + + cntTmp += 1 + Next + + + End If + + + + + If DETPDD.HolderOfTheTransitProcedure IsNot Nothing Then + If DETPDD.HolderOfTheTransitProcedure.ContactPerson IsNot Nothing Then + Dim AnsprechpTMP = DETPDD.HolderOfTheTransitProcedure.ContactPerson.name + If AnsprechpTMP <> "" Then + Dim SB_Tmp = SQL.getValueTxtBySql("SELECT isnull([mit_DAKOSY_SB],'') FROM [tblMitarbeiter] where [mit_DAKOSY_SBFull]='" & AnsprechpTMP & "'", "ADMIN") + If SB_Tmp <> "" Then + NCTS.ncts_Bearbeiter = SB_Tmp + End If + End If + If DETPDD.HolderOfTheTransitProcedure.ContactPerson.eMailAddress IsNot Nothing Then + AnsprechpTMP_Email = DETPDD.HolderOfTheTransitProcedure.ContactPerson.eMailAddress + + + End If + End If + End If + + If getDatumXMLNothing(DETPDD.preparationDateAndTime) IsNot Nothing Then + NCTS.ncts_Trans_DatumZeit = CDate(getDatumXMLNothing(DETPDD.preparationDateAndTime)) + End If + + + + If DETPDD.MessageSender IsNot Nothing Then + + + NCTS.ncts_NachrichtenSenderTIN = DETPDD.MessageSender.identificationNumber + NCTS.ncts_NachrichtenSenderNLNR = DETPDD.MessageSender.subsidiaryNumber + + + End If + + If DETPDD.CustomsOfficeOfDeparture IsNot Nothing Then NCTS.ncts_CustomsOfficeOfDeparture = DETPDD.CustomsOfficeOfDeparture.referenceNumber + If DETPDD.CustomsOfficeOfDestinationDeclared IsNot Nothing Then NCTS.ncts_CustomsOfficeOfDestinationDeclared = DETPDD.CustomsOfficeOfDestinationDeclared.referenceNumber + + + 'Hauptverpflichteter + If DETPDD.HolderOfTheTransitProcedure IsNot Nothing Then + NCTS.ncts_HolderOfTheTransitProcedure_Name = DETPDD.HolderOfTheTransitProcedure.name + If DETPDD.HolderOfTheTransitProcedure.Address IsNot Nothing Then + NCTS.ncts_HolderOfTheTransitProcedure_StreetNumber = DETPDD.HolderOfTheTransitProcedure.Address.streetAndNumber + NCTS.ncts_HolderOfTheTransitProcedure_City = DETPDD.HolderOfTheTransitProcedure.Address.city + NCTS.ncts_HolderOfTheTransitProcedure_Postcode = DETPDD.HolderOfTheTransitProcedure.Address.postcode + NCTS.ncts_HolderOfTheTransitProcedure_Country = DETPDD.HolderOfTheTransitProcedure.Address.country + End If + + NCTS.ncts_HolderOfTheTransitProcedure_IdentificationNumber = DETPDD.HolderOfTheTransitProcedure.identificationNumber + NCTS.ncts_HolderOfTheTransitProcedure_TIRHolderIdentificationNumber = DETPDD.HolderOfTheTransitProcedure.TIRHolderIdentificationNumber + If DETPDD.HolderOfTheTransitProcedure.ContactPerson IsNot Nothing Then + NCTS.ncts_HolderOfTheTransitProcedure_ContactPerson_Name = DETPDD.HolderOfTheTransitProcedure.ContactPerson.name + NCTS.ncts_HolderOfTheTransitProcedure_ContactPerson_PhoneNumber = DETPDD.HolderOfTheTransitProcedure.ContactPerson.phoneNumber + NCTS.ncts_HolderOfTheTransitProcedure_ContactPerson_EMailAddress = DETPDD.HolderOfTheTransitProcedure.ContactPerson.eMailAddress + End If + End If + + + + If DETPDD.Consignment IsNot Nothing Then + + 'absender + If DETPDD.Consignment.Consignor IsNot Nothing Then + NCTS.ncts_Consignor_Name = DETPDD.Consignment.Consignor.name + If DETPDD.Consignment.Consignor.Address IsNot Nothing Then + NCTS.ncts_Consignor_StreetNumber = DETPDD.Consignment.Consignor.Address.streetAndNumber + NCTS.ncts_Consignor_City = DETPDD.Consignment.Consignor.Address.city + NCTS.ncts_Consignor_Postcode = DETPDD.Consignment.Consignor.Address.postcode + NCTS.ncts_Consignor_Country = DETPDD.Consignment.Consignor.Address.country + End If + + NCTS.ncts_Consignor_IdentificationNumber = DETPDD.Consignment.Consignor.identificationNumber + NCTS.ncts_Consignor_SubsidiaryNumber = DETPDD.Consignment.Consignor.subsidiaryNumber + If DETPDD.Consignment.Consignor.ContactPerson IsNot Nothing Then + NCTS.ncts_Consignor_ContactPerson_Name = DETPDD.Consignment.Consignor.ContactPerson.name + NCTS.ncts_Consignor_ContactPerson_PhoneNumber = DETPDD.Consignment.Consignor.ContactPerson.phoneNumber + NCTS.ncts_Consignor_ContactPerson_EMailAddress = DETPDD.Consignment.Consignor.ContactPerson.eMailAddress + End If + End If + + + + 'Empfänger + If DETPDD.Consignment.Consignee IsNot Nothing Then + NCTS.ncts_Consignee_Name = DETPDD.Consignment.Consignee.name + If DETPDD.Consignment.Consignee.Address IsNot Nothing Then + NCTS.ncts_Consignee_StreetNumber = DETPDD.Consignment.Consignee.Address.streetAndNumber + NCTS.ncts_Consignee_City = DETPDD.Consignment.Consignee.Address.city + NCTS.ncts_Consignee_Postcode = DETPDD.Consignment.Consignee.Address.postcode + NCTS.ncts_Consignee_Country = DETPDD.Consignment.Consignee.Address.country + End If + + NCTS.ncts_Consignee_IdentificationNumber = DETPDD.Consignment.Consignee.identificationNumber + NCTS.ncts_Consignee_SubsidiaryNumber = DETPDD.Consignment.Consignee.subsidiaryNumber + If DETPDD.Consignment.Consignee.ContactPerson IsNot Nothing Then + NCTS.ncts_Consignee_ContactPerson_Name = DETPDD.Consignment.Consignee.ContactPerson.name + NCTS.ncts_Consignee_ContactPerson_PhoneNumber = DETPDD.Consignment.Consignee.ContactPerson.phoneNumber + NCTS.ncts_Consignee_ContactPerson_EMailAddress = DETPDD.Consignment.Consignee.ContactPerson.eMailAddress + End If + End If + + + 'Carrier + If DETPDD.Consignment.Carrier IsNot Nothing Then + NCTS.ncts_Carrier_IdentificationNumber = DETPDD.Consignment.Carrier.identificationNumber + NCTS.ncts_Carrier_SubsidiaryNumber = DETPDD.Consignment.Carrier.subsidiaryNumber + If DETPDD.Consignment.Carrier.ContactPerson IsNot Nothing Then + NCTS.ncts_Carrier_ContactPerson_Name = DETPDD.Consignment.Carrier.ContactPerson.name + NCTS.ncts_Carrier_ContactPerson_PhoneNumber = DETPDD.Consignment.Carrier.ContactPerson.phoneNumber + NCTS.ncts_Carrier_ContactPerson_EMailAddress = DETPDD.Consignment.Carrier.ContactPerson.eMailAddress + End If + End If + + + + + If DETPDD.Consignment.DepartureTransportMeans IsNot Nothing Then + Dim cntTmp = 0 + For Each BM In DETPDD.Consignment.DepartureTransportMeans + + If cntTmp = 0 Then NCTS.ncts_DepartureTransportMeans_1_IdentificationNumber = BM.identificationNumber : NCTS.ncts_DepartureTransportMeans_1_Nationality = BM.nationality : NCTS.ncts_DepartureTransportMeans_1_TypeOfIdentification = BM.typeOfIdentification + If cntTmp = 1 Then NCTS.ncts_DepartureTransportMeans_2_IdentificationNumber = BM.identificationNumber : NCTS.ncts_DepartureTransportMeans_2_Nationality = BM.nationality : NCTS.ncts_DepartureTransportMeans_2_TypeOfIdentification = BM.typeOfIdentification + If cntTmp = 2 Then NCTS.ncts_DepartureTransportMeans_3_IdentificationNumber = BM.identificationNumber : NCTS.ncts_DepartureTransportMeans_3_Nationality = BM.nationality : NCTS.ncts_DepartureTransportMeans_3_TypeOfIdentification = BM.typeOfIdentification + If cntTmp = 3 Then NCTS.ncts_DepartureTransportMeans_4_IdentificationNumber = BM.identificationNumber : NCTS.ncts_DepartureTransportMeans_4_Nationality = BM.nationality : NCTS.ncts_DepartureTransportMeans_4_TypeOfIdentification = BM.typeOfIdentification + + cntTmp += 1 + Next + End If + + If DETPDD.Consignment.ActiveBorderTransportMeans IsNot Nothing Then + Dim cntTmp = 0 + For Each BM In DETPDD.Consignment.ActiveBorderTransportMeans + + If cntTmp = 0 Then NCTS.ncts_ActiveBorderTransportMeans_1_IdentificationNumber = BM.identificationNumber : NCTS.ncts_ActiveBorderTransportMeans_1_Nationality = BM.nationality : NCTS.ncts_ActiveBorderTransportMeans_1_TypeOfIdentification = BM.typeOfIdentification + If cntTmp = 1 Then NCTS.ncts_ActiveBorderTransportMeans_2_IdentificationNumber = BM.identificationNumber : NCTS.ncts_ActiveBorderTransportMeans_2_Nationality = BM.nationality : NCTS.ncts_ActiveBorderTransportMeans_2_TypeOfIdentification = BM.typeOfIdentification + If cntTmp = 2 Then NCTS.ncts_ActiveBorderTransportMeans_3_IdentificationNumber = BM.identificationNumber : NCTS.ncts_ActiveBorderTransportMeans_3_Nationality = BM.nationality : NCTS.ncts_ActiveBorderTransportMeans_3_TypeOfIdentification = BM.typeOfIdentification + If cntTmp = 3 Then NCTS.ncts_ActiveBorderTransportMeans_4_IdentificationNumber = BM.identificationNumber : NCTS.ncts_ActiveBorderTransportMeans_4_Nationality = BM.nationality : NCTS.ncts_ActiveBorderTransportMeans_4_TypeOfIdentification = BM.typeOfIdentification + + cntTmp += 1 + Next + + + End If + + + NCTS.ncts_InlandModeOfTransport = DETPDD.Consignment.inlandModeOfTransport + ' NCTS.border = DETPDD.Consignment.modeOfTransportAtTheBorder + + End If + + + + + If DETPDD.Consignment IsNot Nothing Then + If DETPDD.Consignment.HouseConsignment IsNot Nothing Then + NCTS.ncts_HOUSE_CONSIGNMENT.Clear() + + For Each HC In DETPDD.Consignment.HouseConsignment + + + Dim NCTS_HC As New DAKOSY_Worker.cDakosy_NCTSOut004_HouseConsignment + + ' NCTS_HC.= sequenceNumber + NCTS_HC.nctsHC_CountryOfDispatch = HC.countryOfDispatch + NCTS_HC.nctsHC_CountryOfDestination = HC.countryOfDestination + + NCTS_HC.nctsHC_GrossMass = HC.grossMass + NCTS_HC.nctsHC_ReferenceNumberUCR = HC.referenceNumberUCR + + + + + + 'absender + If HC.Consignor IsNot Nothing Then + NCTS_HC.nctsHC_Consignor_Name = HC.Consignor.name + If HC.Consignor.Address IsNot Nothing Then + NCTS_HC.nctsHC_Consignor_StreetNumber = HC.Consignor.Address.streetAndNumber + NCTS_HC.nctsHC_Consignor_City = HC.Consignor.Address.city + NCTS_HC.nctsHC_Consignor_Postcode = HC.Consignor.Address.postcode + NCTS_HC.nctsHC_Consignor_Country = HC.Consignor.Address.country + End If + + NCTS_HC.nctsHC_Consignor_IdentificationNumber = HC.Consignor.identificationNumber + NCTS_HC.nctsHC_Consignor_SubsidiaryNumber = HC.Consignor.subsidiaryNumber + If HC.Consignor.ContactPerson IsNot Nothing Then + NCTS_HC.nctsHC_Consignor_ContactPerson_Name = HC.Consignor.ContactPerson.name + NCTS_HC.nctsHC_Consignor_ContactPerson_PhoneNumber = HC.Consignor.ContactPerson.phoneNumber + NCTS_HC.nctsHC_Consignor_ContactPerson_EMailAddress = HC.Consignor.ContactPerson.eMailAddress + End If + End If + + + + 'Empfänger + If HC.Consignee IsNot Nothing Then + NCTS_HC.nctsHC_Consignee_Name = HC.Consignee.name + If HC.Consignee.Address IsNot Nothing Then + NCTS_HC.nctsHC_Consignee_StreetNumber = HC.Consignee.Address.streetAndNumber + NCTS_HC.nctsHC_Consignee_City = HC.Consignee.Address.city + NCTS_HC.nctsHC_Consignee_Postcode = HC.Consignee.Address.postcode + NCTS_HC.nctsHC_Consignee_Country = HC.Consignee.Address.country + End If + + NCTS_HC.nctsHC_Consignee_IdentificationNumber = HC.Consignee.identificationNumber + NCTS_HC.nctsHC_Consignee_SubsidiaryNumber = HC.Consignee.subsidiaryNumber + If HC.Consignee.ContactPerson IsNot Nothing Then + NCTS_HC.nctsHC_Consignee_ContactPerson_Name = HC.Consignee.ContactPerson.name + NCTS_HC.nctsHC_Consignee_ContactPerson_PhoneNumber = HC.Consignee.ContactPerson.phoneNumber + NCTS_HC.nctsHC_Consignee_ContactPerson_EMailAddress = HC.Consignee.ContactPerson.eMailAddress + End If + End If + + + 'Zusätzlicher Wirtschaftsbeteiligter in der Lieferkette + If HC.AdditionalSupplyChainActor IsNot Nothing Then + Dim cntTmp = 0 + For Each AD In HC.AdditionalSupplyChainActor + + If cntTmp = 0 Then NCTS_HC.nctsHC_AdditionalSupplyChainActor_1_IdentificationNumber = AD.identificationNumber : NCTS_HC.nctsHC_AdditionalSupplyChainActor_1_Role = AD.role + If cntTmp = 1 Then NCTS_HC.nctsHC_AdditionalSupplyChainActor_2_IdentificationNumber = AD.identificationNumber : NCTS_HC.nctsHC_AdditionalSupplyChainActor_2_Role = AD.role + If cntTmp = 2 Then NCTS_HC.nctsHC_AdditionalSupplyChainActor_3_IdentificationNumber = AD.identificationNumber : NCTS_HC.nctsHC_AdditionalSupplyChainActor_3_Role = AD.role + If cntTmp = 3 Then NCTS_HC.nctsHC_AdditionalSupplyChainActor_4_IdentificationNumber = AD.identificationNumber : NCTS_HC.nctsHC_AdditionalSupplyChainActor_4_Role = AD.role + If cntTmp = 4 Then NCTS_HC.nctsHC_AdditionalSupplyChainActor_5_IdentificationNumber = AD.identificationNumber : NCTS_HC.nctsHC_AdditionalSupplyChainActor_5_Role = AD.role + If cntTmp = 5 Then NCTS_HC.nctsHC_AdditionalSupplyChainActor_6_IdentificationNumber = AD.identificationNumber : NCTS_HC.nctsHC_AdditionalSupplyChainActor_6_Role = AD.role + If cntTmp = 6 Then NCTS_HC.nctsHC_AdditionalSupplyChainActor_7_IdentificationNumber = AD.identificationNumber : NCTS_HC.nctsHC_AdditionalSupplyChainActor_7_Role = AD.role + If cntTmp = 7 Then NCTS_HC.nctsHC_AdditionalSupplyChainActor_8_IdentificationNumber = AD.identificationNumber : NCTS_HC.nctsHC_AdditionalSupplyChainActor_8_Role = AD.role + If cntTmp = 8 Then NCTS_HC.nctsHC_AdditionalSupplyChainActor_9_IdentificationNumber = AD.identificationNumber : NCTS_HC.nctsHC_AdditionalSupplyChainActor_9_Role = AD.role + + cntTmp += 1 + Next + + + End If + + + + + 'DOCS, SUPP.... + + + + + If HC.ConsignmentItem IsNot Nothing Then + For Each HCCI In HC.ConsignmentItem + + Dim NCTS_HCCI As New DAKOSY_Worker.cDakosy_NCTSOut004_HouseConsignment_ConsignmentItem + + + + 'WP.nctsWP_PositionsNummer = GOODSITEM.SequenceNumber + If HCCI.Commodity IsNot Nothing Then + NCTS_HCCI.nctsHCCI_CommodityCode = HCCI.Commodity.CommodityCode + If HCCI.Commodity.GoodsMeasure IsNot Nothing Then + NCTS_HCCI.nctsHCCI_NetMass = HCCI.Commodity.GoodsMeasure.netMass + NCTS_HCCI.nctsHCCI_GrossMass = HCCI.Commodity.GoodsMeasure.grossMass + End If + NCTS_HCCI.nctsHCCI_DescriptionOfGoods = HCCI.Commodity.descriptionOfGoods + NCTS_HCCI.nctsHCCI_CusCode = HCCI.Commodity.cusCode + End If + NCTS_HCCI.nctsHCCI_DeclarationType = HCCI.declarationType + NCTS_HCCI.nctsHCCI_CountryOfDestination = HCCI.countryOfDestination + NCTS_HCCI.nctsHCCI_CountryOfDispatch = HCCI.countryOfDispatch + + + + ''Damit nicht zu lang: + 'If WP.nctsWP_Warenbezeichnung IsNot Nothing AndAlso WP.nctsWP_Warenbezeichnung.length > 280 Then + ' WP.nctsWP_Warenbezeichnung = WP.nctsWP_Warenbezeichnung.substring(0, 280) + 'End If + + + + + 'Empfänger + If HCCI.Consignee IsNot Nothing Then + NCTS_HCCI.nctsHCCI_Consignor_Name = HCCI.Consignee.name + If HCCI.Consignee.Address IsNot Nothing Then + NCTS_HCCI.nctsHCCI_Consignor_StreetNumber = HCCI.Consignee.Address.streetAndNumber + NCTS_HCCI.nctsHCCI_Consignor_City = HCCI.Consignee.Address.city + NCTS_HCCI.nctsHCCI_Consignor_Postcode = HCCI.Consignee.Address.postcode + NCTS_HCCI.nctsHCCI_Consignor_Country = HCCI.Consignee.Address.country + End If + + NCTS_HCCI.nctsHCCI_Consignor_IdentificationNumber = HCCI.Consignee.identificationNumber + NCTS_HCCI.nctsHCCI_Consignor_SubsidiaryNumber = HCCI.Consignee.subsidiaryNumber + If HCCI.Consignee.ContactPerson IsNot Nothing Then + NCTS_HCCI.nctsHCCI_Consignor_ContactPerson_Name = HCCI.Consignee.ContactPerson.name + NCTS_HCCI.nctsHCCI_Consignor_ContactPerson_PhoneNumber = HCCI.Consignee.ContactPerson.phoneNumber + NCTS_HCCI.nctsHCCI_Consignor_ContactPerson_EMailAddress = HCCI.Consignee.ContactPerson.eMailAddress + End If + End If + + + + + + If HCCI.PreviousDocument IsNot Nothing Then + Dim cntTmp = 0 + For Each S In HCCI.PreviousDocument + + If cntTmp = 0 Then NCTS_HCCI.nctsHCCI_PreviousDocument_1_ReferenceNumber = S.referenceNumber : NCTS_HCCI.nctsHCCI_PreviousDocument_1_Type = S.type : NCTS_HCCI.nctsHCCI_PreviousDocument_1_ComplementOfInformation = S.complementOfInformation + If cntTmp = 1 Then NCTS_HCCI.nctsHCCI_PreviousDocument_2_ReferenceNumber = S.referenceNumber : NCTS_HCCI.nctsHCCI_PreviousDocument_2_Type = S.type : NCTS_HCCI.nctsHCCI_PreviousDocument_2_ComplementOfInformation = S.complementOfInformation + If cntTmp = 2 Then NCTS_HCCI.nctsHCCI_PreviousDocument_3_ReferenceNumber = S.referenceNumber : NCTS_HCCI.nctsHCCI_PreviousDocument_3_Type = S.type : NCTS_HCCI.nctsHCCI_PreviousDocument_3_ComplementOfInformation = S.complementOfInformation + If cntTmp = 3 Then NCTS_HCCI.nctsHCCI_PreviousDocument_4_ReferenceNumber = S.referenceNumber : NCTS_HCCI.nctsHCCI_PreviousDocument_4_Type = S.type : NCTS_HCCI.nctsHCCI_PreviousDocument_4_ComplementOfInformation = S.complementOfInformation + If cntTmp = 4 Then NCTS_HCCI.nctsHCCI_PreviousDocument_5_ReferenceNumber = S.referenceNumber : NCTS_HCCI.nctsHCCI_PreviousDocument_5_Type = S.type : NCTS_HCCI.nctsHCCI_PreviousDocument_5_ComplementOfInformation = S.complementOfInformation + If cntTmp = 5 Then NCTS_HCCI.nctsHCCI_PreviousDocument_6_ReferenceNumber = S.referenceNumber : NCTS_HCCI.nctsHCCI_PreviousDocument_6_Type = S.type : NCTS_HCCI.nctsHCCI_PreviousDocument_6_ComplementOfInformation = S.complementOfInformation + If cntTmp = 6 Then NCTS_HCCI.nctsHCCI_PreviousDocument_7_ReferenceNumber = S.referenceNumber : NCTS_HCCI.nctsHCCI_PreviousDocument_7_Type = S.type : NCTS_HCCI.nctsHCCI_PreviousDocument_7_ComplementOfInformation = S.complementOfInformation + If cntTmp = 7 Then NCTS_HCCI.nctsHCCI_PreviousDocument_8_ReferenceNumber = S.referenceNumber : NCTS_HCCI.nctsHCCI_PreviousDocument_8_Type = S.type : NCTS_HCCI.nctsHCCI_PreviousDocument_8_ComplementOfInformation = S.complementOfInformation + If cntTmp = 8 Then NCTS_HCCI.nctsHCCI_PreviousDocument_9_ReferenceNumber = S.referenceNumber : NCTS_HCCI.nctsHCCI_PreviousDocument_9_Type = S.type : NCTS_HCCI.nctsHCCI_PreviousDocument_9_ComplementOfInformation = S.complementOfInformation + + cntTmp += 1 + Next + End If + + + + If HCCI.SupportingDocument IsNot Nothing Then + Dim cntTmp = 0 + For Each S In HCCI.SupportingDocument + + If cntTmp = 0 Then NCTS_HCCI.nctsHCCI_SupportingDocument_1_ReferenceNumber = S.referenceNumber : NCTS_HCCI.nctsHCCI_SupportingDocument_1_Type = S.type : NCTS_HCCI.nctsHCCI_SupportingDocument_1_ComplementOfInformation = S.complementOfInformation + If cntTmp = 1 Then NCTS_HCCI.nctsHCCI_SupportingDocument_2_ReferenceNumber = S.referenceNumber : NCTS_HCCI.nctsHCCI_SupportingDocument_2_Type = S.type : NCTS_HCCI.nctsHCCI_SupportingDocument_2_ComplementOfInformation = S.complementOfInformation + If cntTmp = 2 Then NCTS_HCCI.nctsHCCI_SupportingDocument_3_ReferenceNumber = S.referenceNumber : NCTS_HCCI.nctsHCCI_SupportingDocument_3_Type = S.type : NCTS_HCCI.nctsHCCI_SupportingDocument_3_ComplementOfInformation = S.complementOfInformation + If cntTmp = 3 Then NCTS_HCCI.nctsHCCI_SupportingDocument_4_ReferenceNumber = S.referenceNumber : NCTS_HCCI.nctsHCCI_SupportingDocument_4_Type = S.type : NCTS_HCCI.nctsHCCI_SupportingDocument_4_ComplementOfInformation = S.complementOfInformation + If cntTmp = 4 Then NCTS_HCCI.nctsHCCI_SupportingDocument_5_ReferenceNumber = S.referenceNumber : NCTS_HCCI.nctsHCCI_SupportingDocument_5_Type = S.type : NCTS_HCCI.nctsHCCI_SupportingDocument_5_ComplementOfInformation = S.complementOfInformation + If cntTmp = 5 Then NCTS_HCCI.nctsHCCI_SupportingDocument_6_ReferenceNumber = S.referenceNumber : NCTS_HCCI.nctsHCCI_SupportingDocument_6_Type = S.type : NCTS_HCCI.nctsHCCI_SupportingDocument_6_ComplementOfInformation = S.complementOfInformation + If cntTmp = 6 Then NCTS_HCCI.nctsHCCI_SupportingDocument_7_ReferenceNumber = S.referenceNumber : NCTS_HCCI.nctsHCCI_SupportingDocument_7_Type = S.type : NCTS_HCCI.nctsHCCI_SupportingDocument_7_ComplementOfInformation = S.complementOfInformation + If cntTmp = 7 Then NCTS_HCCI.nctsHCCI_SupportingDocument_8_ReferenceNumber = S.referenceNumber : NCTS_HCCI.nctsHCCI_SupportingDocument_8_Type = S.type : NCTS_HCCI.nctsHCCI_SupportingDocument_8_ComplementOfInformation = S.complementOfInformation + If cntTmp = 8 Then NCTS_HCCI.nctsHCCI_SupportingDocument_9_ReferenceNumber = S.referenceNumber : NCTS_HCCI.nctsHCCI_SupportingDocument_9_Type = S.type : NCTS_HCCI.nctsHCCI_SupportingDocument_9_ComplementOfInformation = S.complementOfInformation + + cntTmp += 1 + Next + End If + + + + + + If HCCI.Packaging IsNot Nothing Then + For Each PC In HCCI.Packaging + Dim NCTS_PK As New DAKOSY_Worker.cDakosy_NCTSOut004_HouseConsignment_ConsignmentItem_Packaging + + + NCTS_PK.nctsHCCIPK_TypeOfPackages = PC.typeOfPackages + NCTS_PK.nctsHCCIPK_NumberOfPackages = PC.numberOfPackages + NCTS_PK.nctsHCCIPK_ShippingMarks = PC.shippingMarks + 'NCTS_PK.nctsHCCIPK_GoodsItemNumber = PC.PackageReference.goodsItemNumber 'ARRAY + + + + NCTS_HCCI.nctsHCCI_PACKAGING.Add(NCTS_PK) + Next + End If + NCTS_HC.nctsWP_CONSIGNMENT_ITEM.Add(NCTS_HCCI) + Next + End If + NCTS.ncts_HOUSE_CONSIGNMENT.Add(NCTS_HC) + + Next + End If + End If + + + + + '------------------------------------------- + + If DETPDD.Guarantee IsNot Nothing AndAlso DETPDD.Guarantee IsNot Nothing AndAlso DETPDD.Guarantee.Count > 0 Then + For Each GRT_M In DETPDD.Guarantee + + For Each GRT In GRT_M.GuaranteeReference + Dim NCTS_GRT As New DAKOSY_Worker.cDakosy_NCTSOut004_Guarantee + + + NCTS_GRT.nctsGRT_Type = GRT_M.guaranteeType + NCTS_GRT.nctsGRT_OtherGuaranteeReference = GRT_M.otherGuaranteeReference + NCTS_GRT.nctsGRT_AmountToBeCovered = GRT.amountToBeCovered + NCTS_GRT.nctsGRT_AccessCode = GRT.accessCode + NCTS_GRT.nctsGRT_GRN = GRT.GRN + NCTS_GRT.nctsGRT_Currency = GRT.currency + + + NCTS.ncts_GUARANTEE.Add(NCTS_GRT) + Next + Next + End If + + '------------------------------------------- + + + + End If + + + + frmDYNachrichtenVerarbeitung.tryGetNCTSBasicData(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_DETPDD) + + + If If(NCTS.ncts_Status, 0) <= 5 Then NCTS.ncts_Status = DAKOSY_Worker.cDY_Statusliste.S_05 + ' 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_05,,,, statusTMP) + Else + readNCTS_VersandanmeldungXML_DETPDD = "" + 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: Versandanmeldung", readNCTS_VersandanmeldungXML_DETPDD) + + 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_DETPDD = "" + End Try + End Function + Shared Function getDatumXMLNothing(dateTmp) As Object If dateTmp IsNot Nothing AndAlso dateTmp.ToString.Trim <> "" AndAlso IsDate(dateTmp) Then @@ -1210,6 +1919,71 @@ Public Class cWorker_NCTS End Try End Function + Shared Function readNCTS_Versandbestaetigung002(FORM As frmDYNachrichtenVerarbeitung, d As String) As String + Try + + Dim NCTS As DAKOSY_Worker.VersandbestaetigungNCTSDE_002.VersandbestaetigungMCTyp = DAKOSY_Worker.VersandbestaetigungNCTSDE_002.VersandbestaetigungMCTyp.LoadFromFile(d) + Dim anr = "" + Dim zp As Object = Nothing + + Dim division = "" + + readNCTS_Versandbestaetigung002 = "" + If NCTS IsNot Nothing Then + + If NCTS.Transaktion IsNot Nothing Then + If NCTS.Transaktion.IODivision3 IsNot Nothing Then + division = NCTS.Transaktion.IODivision3 + End If + End If + + If NCTS.EinzelVersandbestaetigung IsNot Nothing Then + If NCTS.EinzelVersandbestaetigung.ObjektIdentifizierung IsNot Nothing Then + If NCTS.EinzelVersandbestaetigung.ObjektIdentifizierung.ObjektName IsNot Nothing Then + readNCTS_Versandbestaetigung002 = NCTS.EinzelVersandbestaetigung.ObjektIdentifizierung.ObjektName + End If + zp = NCTS.EinzelVersandbestaetigung.ObjektIdentifizierung.ZeitpunktEingang + End If + If NCTS.EinzelVersandbestaetigung.KopfDaten IsNot Nothing Then + If NCTS.EinzelVersandbestaetigung.KopfDaten.ANR IsNot Nothing Then + anr = NCTS.EinzelVersandbestaetigung.KopfDaten.ANR + ' MsgBox(anr) + End If + End If + End If + End If + ' NCTS.LOADByBezugsNr(bezugsNr, False) ' Falls schon ein DS mit dieser Bezugsnummer vorhanden ist. + + If readNCTS_Versandbestaetigung002 <> "" And anr <> "" Then 'BEZUGSNR vorhanden + Dim STATUS As DAKOSY_Worker.cDakosy_Statusmeldungen = FORM.getStatusCheckTransID(NCTS.Transaktion.IOReferenz, NCTS.Transaktion.IODatumZeit) + STATUS.dySt_BezugsNr = readNCTS_Versandbestaetigung002 + STATUS.dySt_artMitteilung = "VB" + STATUS.dySt_dyArt = "" '"NCTS" 'T1/T2 + + STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_41 + STATUS.dySt_ergCode = "ANR" + STATUS.dySt_ergMitteilung = anr + STATUS.dySt_ergZeitpunkt = zp + 'EINTRAG IN tblDakosy_Zollanmeldungen + Dim DY_TMP As DAKOSY_Worker.cDakosy_Zollanmeldungen = FORM.saveDY_ZA(STATUS, NCTS.Transaktion.IOReferenz, If(zp, NCTS.Transaktion.IODatumZeit), "NCTS") + Dim NCTS_TMP As DAKOSY_Worker.cDakosyNCTSOut = saveDY_NCTS(STATUS, DY_TMP, NCTS.Transaktion.IOReferenz, If(zp, NCTS.Transaktion.IODatumZeit), anr) + + + + + SaveNCTS_FirmaNL(NCTS_TMP, DY_TMP, division) + + If DY_TMP IsNot Nothing Then STATUS.dySt_dyId = DY_TMP.dy_Id + STATUS.SAVE() + + FORM.addDGVEinarbeitung("NCTS: Versandbestätigung", STATUS.dySt_BezugsNr) + End If + Catch ex As Exception + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace & vbNewLine & "Datei: " & Dateiname, System.Reflection.MethodInfo.GetCurrentMethod.Name) + readNCTS_Versandbestaetigung002 = "" + End Try + End Function + Shared Function saveDY_NCTS(STATUS As DAKOSY_Worker.cDakosy_Statusmeldungen, DY_TMP As DAKOSY_Worker.cDakosy_Zollanmeldungen, transID As String, transDate As Date, Optional ANR As String = "", Optional MRN As String = "") As DAKOSY_Worker.cDakosyNCTSOut @@ -1424,6 +2198,125 @@ Public Class cWorker_NCTS + Shared Function readNCTS_StatusmeldungNCTSDE003(FORM As frmDYNachrichtenVerarbeitung, d As String) As String + Try + + Dim NCTS As DAKOSY_Worker.StatusmeldungNCTSDE_003.StatusmeldungMSTyp = DAKOSY_Worker.StatusmeldungNCTSDE_003.StatusmeldungMSTyp.LoadFromFile(d) + Dim MRN = "" + Dim division = "" + Dim tstmp As Object = Nothing + Dim grund As String = "" + Dim status_DY As String = "" + + Dim EntgegennahmeDatumZeit As Object = Nothing + Dim EntscheidungAnnahmeDatumZeit As Object = Nothing + Dim EntscheidungUeberlassungDatumZeit As Object = Nothing + Dim EntscheidungStornierungDatumZeit As Object = Nothing + Dim ZeitpunktAnrechnungReferenzbetraege As Object = Nothing + readNCTS_StatusmeldungNCTSDE003 = "" + If NCTS IsNot Nothing Then + If NCTS.Transaktion IsNot Nothing Then + If NCTS.Transaktion.IODivision3 IsNot Nothing Then + division = NCTS.Transaktion.IODivision3 + End If + End If + + If NCTS.EinzelStatusmeldung IsNot Nothing Then + If NCTS.EinzelStatusmeldung.ObjektIdentifizierung IsNot Nothing Then + If NCTS.EinzelStatusmeldung.ObjektIdentifizierung.ObjektName IsNot Nothing Then + readNCTS_StatusmeldungNCTSDE003 = NCTS.EinzelStatusmeldung.ObjektIdentifizierung.ObjektName + + End If + End If + If NCTS.EinzelStatusmeldung.KopfDaten IsNot Nothing Then + If NCTS.EinzelStatusmeldung.KopfDaten.MRN IsNot Nothing Then + MRN = NCTS.EinzelStatusmeldung.KopfDaten.MRN + End If + + If NCTS.EinzelStatusmeldung.KopfDaten.WeiterverarbeitungAusserhalbATLASDatumZeit > "01.01.2000" Then + tstmp = NCTS.EinzelStatusmeldung.KopfDaten.WeiterverarbeitungAusserhalbATLASDatumZeit '00:00:00 + End If + + + If NCTS.EinzelStatusmeldung.KopfDaten.EntgegennahmeDatumZeit > "01.01.2000" Then + EntgegennahmeDatumZeit = NCTS.EinzelStatusmeldung.KopfDaten.EntgegennahmeDatumZeit '00:00:00 + End If + If NCTS.EinzelStatusmeldung.KopfDaten.EntscheidungAnnahmeDatumZeit > "01.01.2000" Then + EntscheidungAnnahmeDatumZeit = NCTS.EinzelStatusmeldung.KopfDaten.EntscheidungAnnahmeDatumZeit '00:00:00 + End If + If NCTS.EinzelStatusmeldung.KopfDaten.EntscheidungUeberlassungDatumZeit > "01.01.2000" Then + EntscheidungUeberlassungDatumZeit = NCTS.EinzelStatusmeldung.KopfDaten.EntscheidungUeberlassungDatumZeit '00:00:00 + End If + If NCTS.EinzelStatusmeldung.KopfDaten.EntscheidungStornierungDatumZeit > "01.01.2000" Then + EntscheidungStornierungDatumZeit = NCTS.EinzelStatusmeldung.KopfDaten.EntscheidungStornierungDatumZeit '00:00:00 + End If + If NCTS.EinzelStatusmeldung.KopfDaten.ZeitpunktAnrechnungReferenzbetraege > "01.01.2000" Then + ZeitpunktAnrechnungReferenzbetraege = NCTS.EinzelStatusmeldung.KopfDaten.ZeitpunktAnrechnungReferenzbetraege '00:00:00 + End If + + 'tstmp = NCTS.EinzelStatusmeldung.KopfDaten.WeiterverarbeitungAusserhalbATLASDatumZeit '00:00:00 + If NCTS.EinzelStatusmeldung.KopfDaten.Grund IsNot Nothing Then grund = NCTS.EinzelStatusmeldung.KopfDaten.Grund + status_DY = NCTS.EinzelStatusmeldung.KopfDaten.StatusUeberwachung + + If NCTS.EinzelStatusmeldung.KopfDaten.Fehlermeldung IsNot Nothing Then + For Each F In NCTS.EinzelStatusmeldung.KopfDaten.Fehlermeldung + '??? + Next + End If + End If + + + End If + End If + + + If readNCTS_StatusmeldungNCTSDE003 <> "" And MRN <> "" Then 'BEZUGSNR vorhanden + Dim STATUS As DAKOSY_Worker.cDakosy_Statusmeldungen = FORM.getStatusCheckTransID(NCTS.Transaktion.IOReferenz, NCTS.Transaktion.IODatumZeit) + STATUS.dySt_BezugsNr = readNCTS_StatusmeldungNCTSDE003 + STATUS.dySt_artMitteilung = "STAT" + STATUS.dySt_dyArt = "" '"NCTS" 'T1/T2 + + Select Case status_DY + Case "13", "14", "15", "16", "31", "34", "35", "37", "38" : tstmp = If(EntscheidungAnnahmeDatumZeit, tstmp) + Case "15", "31", "34", "35", "37", "38" : tstmp = If(EntscheidungUeberlassungDatumZeit, tstmp) + Case "38" : tstmp = If(EntscheidungStornierungDatumZeit, tstmp) + Case "34", "35", "37", "38" : tstmp = If(ZeitpunktAnrechnungReferenzbetraege, tstmp) + End Select + Select Case status_DY + Case "13" : STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_13 + Case "14" : STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_14 + Case "16" : STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_16 + Case "31" : STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_31 + Case "38" : STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_38 + Case "39" : STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_39 + Case Else + STATUS.dySt_status = -1 + 'UNBEKANNT ????? + End Select + STATUS.dySt_ergCode = "DY_" & status_DY + STATUS.dySt_ergMitteilung = MRN & grund + If tstmp IsNot Nothing Then STATUS.dySt_ergZeitpunkt = tstmp + 'EINTRAG IN tblDakosy_Zollanmeldungen + Dim DY_TMP As DAKOSY_Worker.cDakosy_Zollanmeldungen = FORM.saveDY_ZA(STATUS, NCTS.Transaktion.IOReferenz, NCTS.Transaktion.IODatumZeit, "NCTS") + Dim NCTS_TMP As DAKOSY_Worker.cDakosyNCTSOut = saveDY_NCTS(STATUS, DY_TMP, NCTS.Transaktion.IOReferenz, NCTS.Transaktion.IODatumZeit, , "") 'MRN) + + + SaveNCTS_FirmaNL(NCTS_TMP, DY_TMP, division) + + If DY_TMP IsNot Nothing Then STATUS.dySt_dyId = DY_TMP.dy_Id + STATUS.SAVE() + + FORM.addDGVEinarbeitung("NCTS: StatusmeldungNCTSDE", STATUS.dySt_BezugsNr) + End If + + Catch ex As Exception + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace & vbNewLine & "Datei: " & Dateiname, System.Reflection.MethodInfo.GetCurrentMethod.Name) + readNCTS_StatusmeldungNCTSDE003 = "" + End Try + End Function + + + @@ -1650,6 +2543,79 @@ Public Class cWorker_NCTS End Try End Function + Shared Function readNCTS_UngueltigkeitSicherheitenNCTSDE004(FORM As frmDYNachrichtenVerarbeitung, d As String) As String + Try + + Dim NCTS As DAKOSY_Worker.UngueltigkeitSicherheitenNCTSDE_004.UngueltigkeitSicherheitenMITyp = DAKOSY_Worker.UngueltigkeitSicherheitenNCTSDE_004.UngueltigkeitSicherheitenMITyp.LoadFromFile(d) + Dim ANR = "" + Dim tstmp As Object = Nothing + Dim grund As String = "" + Dim sicherheit As String = "" + + readNCTS_UngueltigkeitSicherheitenNCTSDE004 = "" + If NCTS IsNot Nothing Then + If NCTS.EinzelUngueltigkeitSicherheiten IsNot Nothing Then + If NCTS.EinzelUngueltigkeitSicherheiten.ObjektIdentifizierung IsNot Nothing Then + If NCTS.EinzelUngueltigkeitSicherheiten.ObjektIdentifizierung.ObjektName IsNot Nothing Then + readNCTS_UngueltigkeitSicherheitenNCTSDE004 = NCTS.EinzelUngueltigkeitSicherheiten.ObjektIdentifizierung.ObjektName + End If + End If + If NCTS.EinzelUngueltigkeitSicherheiten.KopfDaten IsNot Nothing Then + If NCTS.EinzelUngueltigkeitSicherheiten.KopfDaten.Arbeitsnummer IsNot Nothing Then + ANR = NCTS.EinzelUngueltigkeitSicherheiten.KopfDaten.Arbeitsnummer + End If + If NCTS.EinzelUngueltigkeitSicherheiten.KopfDaten.ZeitpunktUngueltigkeitUnwirksamkeit > "01.01.2000" Then + tstmp = NCTS.EinzelUngueltigkeitSicherheiten.KopfDaten.ZeitpunktUngueltigkeitUnwirksamkeit + End If + grund = NCTS.EinzelUngueltigkeitSicherheiten.KopfDaten.Grund + + If NCTS.EinzelUngueltigkeitSicherheiten.KopfDaten.Sicherheit IsNot Nothing Then + For Each s In NCTS.EinzelUngueltigkeitSicherheiten.KopfDaten.Sicherheit + If s.GRN IsNot Nothing Then + sicherheit &= s.GRN & " " + End If + Next + End If + + If NCTS.EinzelUngueltigkeitSicherheiten.KopfDaten.Fehlermeldung IsNot Nothing Then + For Each F In NCTS.EinzelUngueltigkeitSicherheiten.KopfDaten.Fehlermeldung + '??? + Next + End If + End If + + + End If + End If + + sicherheit = sicherheit.Trim + + If readNCTS_UngueltigkeitSicherheitenNCTSDE004 <> "" And ANR <> "" Then 'BEZUGSNR vorhanden + Dim STATUS As DAKOSY_Worker.cDakosy_Statusmeldungen = FORM.getStatusCheckTransID(NCTS.Transaktion.IOReferenz, NCTS.Transaktion.IODatumZeit) + STATUS.dySt_BezugsNr = readNCTS_UngueltigkeitSicherheitenNCTSDE004 + STATUS.dySt_artMitteilung = "UNG" + STATUS.dySt_dyArt = "" '"NCTS" 'T1/T2 + + STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_15 + STATUS.dySt_ergCode = "UN" + STATUS.dySt_ergMitteilung = grund + If tstmp IsNot Nothing Then STATUS.dySt_ergZeitpunkt = tstmp + 'EINTRAG IN tblDakosy_Zollanmeldungen + Dim DY_TMP As DAKOSY_Worker.cDakosy_Zollanmeldungen = FORM.saveDY_ZA(STATUS, NCTS.Transaktion.IOReferenz, If(tstmp, NCTS.Transaktion.IODatumZeit), "NCTS") + Dim NCTS_TMP As DAKOSY_Worker.cDakosyNCTSOut = saveDY_NCTS(STATUS, DY_TMP, NCTS.Transaktion.IOReferenz, If(tstmp, NCTS.Transaktion.IODatumZeit), ANR) + + If DY_TMP IsNot Nothing Then STATUS.dySt_dyId = DY_TMP.dy_Id + STATUS.SAVE() + + FORM.addDGVEinarbeitung("NCTS: UngueltigkeitSicherheitenNCTSDE_004", STATUS.dySt_BezugsNr) + End If + + Catch ex As Exception + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace & vbNewLine & "Datei: " & Dateiname, System.Reflection.MethodInfo.GetCurrentMethod.Name) + readNCTS_UngueltigkeitSicherheitenNCTSDE004 = "" + End Try + End Function + Shared Function readNCTS_Erledigungsmeldung(FORM As frmDYNachrichtenVerarbeitung, d As String) As String Try @@ -1716,6 +2682,140 @@ Public Class cWorker_NCTS End Try End Function + + Shared Function readNCTS_Erledigungsmeldung003(FORM As frmDYNachrichtenVerarbeitung, d As String) As String + Try + + Dim NCTS As DAKOSY_Worker.ErledigungsmeldungNCTSDE_003.ErledigungsmeldungMOTyp = DAKOSY_Worker.ErledigungsmeldungNCTSDE_003.ErledigungsmeldungMOTyp.LoadFromFile(d) + Dim MRN = "" + Dim tstmp As Object = Nothing + readNCTS_Erledigungsmeldung003 = "" + If NCTS IsNot Nothing Then + If NCTS.EinzelErledigungsmeldung IsNot Nothing Then + If NCTS.EinzelErledigungsmeldung.ObjektIdentifizierung IsNot Nothing Then + If NCTS.EinzelErledigungsmeldung.ObjektIdentifizierung.ObjektName IsNot Nothing Then + readNCTS_Erledigungsmeldung003 = NCTS.EinzelErledigungsmeldung.ObjektIdentifizierung.ObjektName + End If + End If + If NCTS.EinzelErledigungsmeldung.KopfDaten IsNot Nothing Then + If NCTS.EinzelErledigungsmeldung.KopfDaten.MRN IsNot Nothing Then + MRN = NCTS.EinzelErledigungsmeldung.KopfDaten.MRN + End If + If NCTS.EinzelErledigungsmeldung.KopfDaten.ZeitpunktErledigung > "01.01.2000" Then + tstmp = NCTS.EinzelErledigungsmeldung.KopfDaten.ZeitpunktErledigung + End If + End If + End If + End If + + If readNCTS_Erledigungsmeldung003 <> "" And MRN <> "" Then 'BEZUGSNR vorhanden + Dim STATUS As DAKOSY_Worker.cDakosy_Statusmeldungen = FORM.getStatusCheckTransID(NCTS.Transaktion.IOReferenz, NCTS.Transaktion.IODatumZeit) + STATUS.dySt_BezugsNr = readNCTS_Erledigungsmeldung003 + STATUS.dySt_artMitteilung = "EM" + STATUS.dySt_dyArt = "" '"NCTS" 'T1/T2 + + STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_60 + STATUS.dySt_ergCode = "TSTMP" + STATUS.dySt_ergMitteilung = "" + If tstmp IsNot Nothing Then STATUS.dySt_ergZeitpunkt = tstmp + 'EINTRAG IN tblDakosy_Zollanmeldungen + Dim DY_TMP As DAKOSY_Worker.cDakosy_Zollanmeldungen = FORM.saveDY_ZA(STATUS, NCTS.Transaktion.IOReferenz, If(tstmp, NCTS.Transaktion.IODatumZeit), "NCTS") + Dim NCTS_TMP As DAKOSY_Worker.cDakosyNCTSOut = saveDY_NCTS(STATUS, DY_TMP, NCTS.Transaktion.IOReferenz, If(tstmp, NCTS.Transaktion.IODatumZeit), , MRN) + + 'Gestellung eintragen, falls nochnicht geschehen + If Not NCTS_TMP.ncts_Gestellt Then + NCTS_TMP.ncts_Gestellt = True + NCTS_TMP.SAVE() + End If + + If DY_TMP IsNot Nothing Then STATUS.dySt_dyId = DY_TMP.dy_Id + STATUS.SAVE() + + '=======BEREITSTELLUNG DER DATEN AN FREMDSYSTEME======= + cVERAG_out_ncts.copyFileFTP_VERAGncts_DY(NCTS_TMP, DY_TMP) + '====================================================== + + '=====ATEZ BEREITSTELLUNG========== + checkATEZ_Bereitstellung(DY_TMP, d) + '================================== + + FORM.addDGVEinarbeitung("NCTS: Erledigungsmeldung 003", STATUS.dySt_BezugsNr) + End If + + Catch ex As Exception + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace & vbNewLine & "Datei: " & Dateiname, System.Reflection.MethodInfo.GetCurrentMethod.Name) + readNCTS_Erledigungsmeldung003 = "" + End Try + End Function + + + Shared Function readNCTS_Erledigungsmeldung001(FORM As frmDYNachrichtenVerarbeitung, d As String) As String + Try + + Dim NCTS As DAKOSY_Worker.EreignismitteilungNCTSDE_001.EreignismitteilungMETyp = DAKOSY_Worker.EreignismitteilungNCTSDE_001.EreignismitteilungMETyp.LoadFromFile(d) + Dim MRN = "" + Dim tstmp As Object = Nothing + readNCTS_Erledigungsmeldung001 = "" + If NCTS IsNot Nothing Then + If NCTS.EinzelEreignismitteilung IsNot Nothing Then + If NCTS.EinzelEreignismitteilung.ObjektIdentifizierung IsNot Nothing Then + If NCTS.EinzelEreignismitteilung.ObjektIdentifizierung.ObjektName IsNot Nothing Then + readNCTS_Erledigungsmeldung001 = NCTS.EinzelEreignismitteilung.ObjektIdentifizierung.ObjektName + End If + End If + If NCTS.EinzelEreignismitteilung.TransitOperation IsNot Nothing Then + If NCTS.EinzelEreignismitteilung.TransitOperation.MRN IsNot Nothing Then + MRN = NCTS.EinzelEreignismitteilung.TransitOperation.MRN + End If + End If + If NCTS.EinzelEreignismitteilung.ObjektIdentifizierung IsNot Nothing Then + If NCTS.EinzelEreignismitteilung.ObjektIdentifizierung.ZeitpunktEingang > "01.01.2000" Then + tstmp = NCTS.EinzelEreignismitteilung.ObjektIdentifizierung.ZeitpunktEingang + End If + End If + End If + End If + + If readNCTS_Erledigungsmeldung001 <> "" And MRN <> "" Then 'BEZUGSNR vorhanden + Dim STATUS As DAKOSY_Worker.cDakosy_Statusmeldungen = FORM.getStatusCheckTransID(NCTS.Transaktion.IOReferenz, NCTS.Transaktion.IODatumZeit) + STATUS.dySt_BezugsNr = readNCTS_Erledigungsmeldung001 + STATUS.dySt_artMitteilung = "EGM" + STATUS.dySt_dyArt = "" '"NCTS" 'T1/T2 + + STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_60 + STATUS.dySt_ergCode = "TSTMP" + STATUS.dySt_ergMitteilung = "" + If tstmp IsNot Nothing Then STATUS.dySt_ergZeitpunkt = tstmp + 'EINTRAG IN tblDakosy_Zollanmeldungen + Dim DY_TMP As DAKOSY_Worker.cDakosy_Zollanmeldungen = FORM.saveDY_ZA(STATUS, NCTS.Transaktion.IOReferenz, If(tstmp, NCTS.Transaktion.IODatumZeit), "NCTS") + Dim NCTS_TMP As DAKOSY_Worker.cDakosyNCTSOut = saveDY_NCTS(STATUS, DY_TMP, NCTS.Transaktion.IOReferenz, If(tstmp, NCTS.Transaktion.IODatumZeit), , MRN) + + 'Gestellung eintragen, falls nochnicht geschehen + If Not NCTS_TMP.ncts_Gestellt Then + NCTS_TMP.ncts_Gestellt = True + NCTS_TMP.SAVE() + End If + + If DY_TMP IsNot Nothing Then STATUS.dySt_dyId = DY_TMP.dy_Id + STATUS.SAVE() + + '=======BEREITSTELLUNG DER DATEN AN FREMDSYSTEME======= + cVERAG_out_ncts.copyFileFTP_VERAGncts_DY(NCTS_TMP, DY_TMP) + '====================================================== + + '=====ATEZ BEREITSTELLUNG========== + checkATEZ_Bereitstellung(DY_TMP, d) + '================================== + + FORM.addDGVEinarbeitung("NCTS: Erledigungsmeldung001", STATUS.dySt_BezugsNr) + End If + + Catch ex As Exception + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace & vbNewLine & "Datei: " & Dateiname, System.Reflection.MethodInfo.GetCurrentMethod.Name) + readNCTS_Erledigungsmeldung001 = "" + End Try + End Function + Shared Function readNCTS_Ueberlassungsmeldung005(FORM As frmDYNachrichtenVerarbeitung, d As String, ByRef statusTMP As DAKOSY_Worker.cDakosy_Statusmeldungen) As String Try ' Dim NCTS As DAKOSY_Worker.UeberlassungsmeldungNCTSDE.UeberlassungsmeldungMRTyp = DAKOSY_Worker.UeberlassungsmeldungNCTSDE.UeberlassungsmeldungMRTyp.LoadFromFile(d) @@ -2013,6 +3113,120 @@ Public Class cWorker_NCTS readNCTS_Ueberlassungsmeldung007 = "" End Try End Function + Shared Function readNCTS_Ueberlassungsmeldung008(FORM As frmDYNachrichtenVerarbeitung, d As String, ByRef statusTMP As DAKOSY_Worker.cDakosy_Statusmeldungen) As String + Try + ' Dim NCTS As DAKOSY_Worker.UeberlassungsmeldungNCTSDE.UeberlassungsmeldungMRTyp = DAKOSY_Worker.UeberlassungsmeldungNCTSDE.UeberlassungsmeldungMRTyp.LoadFromFile(d) + Dim NCTS As DAKOSY_Worker.UeberlassungsmeldungNCTSDE_008.UeberlassungsmeldungMRTyp = DAKOSY_Worker.UeberlassungsmeldungNCTSDE_008.UeberlassungsmeldungMRTyp.LoadFromFile(d) + Dim MRN = "" + Dim division = "" + Dim Wiedergestellungsdatum As Object = Nothing + ' Dim bearbeiter = "" + Dim zp As Object = Nothing + Dim Verschluss_Art = "" + Dim Verschluss_Anzahl = 0 + Dim Verschluss_Zeichen As New List(Of String) + + + readNCTS_Ueberlassungsmeldung008 = "" + If NCTS IsNot Nothing Then + If NCTS.Transaktion IsNot Nothing Then + If NCTS.Transaktion.IODivision3 IsNot Nothing Then + division = NCTS.Transaktion.IODivision3 + End If + End If + If NCTS.EinzelUeberlassungsmeldung IsNot Nothing Then + If NCTS.EinzelUeberlassungsmeldung.ObjektIdentifizierung IsNot Nothing Then + If NCTS.EinzelUeberlassungsmeldung.ObjektIdentifizierung.ObjektName IsNot Nothing Then + readNCTS_Ueberlassungsmeldung008 = NCTS.EinzelUeberlassungsmeldung.ObjektIdentifizierung.ObjektName + End If + If NCTS.EinzelUeberlassungsmeldung.ObjektIdentifizierung.ZeitpunktEingang > "01.01.2000" Then + zp = NCTS.EinzelUeberlassungsmeldung.ObjektIdentifizierung.ZeitpunktEingang + End If + End If + If NCTS.EinzelUeberlassungsmeldung.KopfDaten IsNot Nothing Then + If NCTS.EinzelUeberlassungsmeldung.KopfDaten.MRN IsNot Nothing Then + MRN = NCTS.EinzelUeberlassungsmeldung.KopfDaten.MRN + End If + + + Wiedergestellungsdatum = NCTS.EinzelUeberlassungsmeldung.KopfDaten.Wiedergestellungsdatum + ' bearbeiter=NCTS.EinzelUeberlassungsmeldung.KopfDaten. + + 'Verschluesse + If NCTS.EinzelUeberlassungsmeldung.KopfDaten.Verschluesse IsNot Nothing Then + If NCTS.EinzelUeberlassungsmeldung.KopfDaten.Verschluesse.Anzahl IsNot Nothing AndAlso NCTS.EinzelUeberlassungsmeldung.KopfDaten.Verschluesse.Anzahl > 0 Then + Verschluss_Art = NCTS.EinzelUeberlassungsmeldung.KopfDaten.Verschluesse.Art + Verschluss_Anzahl = NCTS.EinzelUeberlassungsmeldung.KopfDaten.Verschluesse.Anzahl + If NCTS.EinzelUeberlassungsmeldung.KopfDaten.Verschluesse.Zeichen IsNot Nothing Then + If NCTS.EinzelUeberlassungsmeldung.KopfDaten.Verschluesse.Zeichen.Count > 0 Then + For Each z In NCTS.EinzelUeberlassungsmeldung.KopfDaten.Verschluesse.Zeichen + Verschluss_Zeichen.Add(z) + Next + End If + End If + End If + End If + + End If + + End If + + + End If + ' NCTS.LOADByBezugsNr(bezugsNr, False) ' Falls schon ein DS mit dieser Bezugsnummer vorhanden ist. + + If readNCTS_Ueberlassungsmeldung008 <> "" And MRN <> "" Then 'BEZUGSNR vorhanden + Dim STATUS As DAKOSY_Worker.cDakosy_Statusmeldungen = FORM.getStatusCheckTransID(NCTS.Transaktion.IOReferenz, NCTS.Transaktion.IODatumZeit) + STATUS.dySt_BezugsNr = readNCTS_Ueberlassungsmeldung008 + STATUS.dySt_artMitteilung = "UEM" + STATUS.dySt_dyArt = "" '"NCTS" 'T1/T2 + + STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_50 + STATUS.dySt_ergCode = "MRN" + STATUS.dySt_ergMitteilung = MRN + STATUS.dySt_ergZeitpunkt = zp + 'EINTRAG IN tblDakosy_Zollanmeldungen + Dim DY_TMP As DAKOSY_Worker.cDakosy_Zollanmeldungen = FORM.saveDY_ZA(STATUS, NCTS.Transaktion.IOReferenz, If(zp, NCTS.Transaktion.IODatumZeit), "NCTS") + Dim NCTS_TMP As DAKOSY_Worker.cDakosyNCTSOut = saveDY_NCTS(STATUS, DY_TMP, NCTS.Transaktion.IOReferenz, If(zp, NCTS.Transaktion.IODatumZeit), , MRN) + + If Verschluss_Anzahl > 0 Then + NCTS_TMP.ncts_Verschluss_Anzahl = Verschluss_Anzahl + NCTS_TMP.ncts_Verschluss_ArtCode = Verschluss_Art + NCTS_TMP.ncts_Verschluss_Zeichen1 = If(Verschluss_Zeichen.Count > 0, Verschluss_Zeichen(0), Nothing) + NCTS_TMP.ncts_Verschluss_Zeichen2 = If(Verschluss_Zeichen.Count > 1, Verschluss_Zeichen(1), Nothing) + NCTS_TMP.ncts_Verschluss_Zeichen3 = If(Verschluss_Zeichen.Count > 2, Verschluss_Zeichen(2), Nothing) + NCTS_TMP.ncts_Verschluss_Zeichen4 = If(Verschluss_Zeichen.Count > 3, Verschluss_Zeichen(3), Nothing) + NCTS_TMP.ncts_Verschluss_Zeichen5 = If(Verschluss_Zeichen.Count > 4, Verschluss_Zeichen(4), Nothing) + NCTS_TMP.ncts_Verschluss_Zeichen6 = If(Verschluss_Zeichen.Count > 5, Verschluss_Zeichen(5), Nothing) + NCTS_TMP.ncts_Verschluss_Zeichen7 = If(Verschluss_Zeichen.Count > 6, Verschluss_Zeichen(6), Nothing) + NCTS_TMP.ncts_Verschluss_Zeichen8 = If(Verschluss_Zeichen.Count > 7, Verschluss_Zeichen(7), Nothing) + NCTS_TMP.ncts_Verschluss_Zeichen9 = If(Verschluss_Zeichen.Count > 8, Verschluss_Zeichen(8), Nothing) + NCTS_TMP.ncts_Verschluss_Zeichen10 = If(Verschluss_Zeichen.Count > 9, Verschluss_Zeichen(9), Nothing) + NCTS_TMP.SAVE() + End If + SaveNCTS_FirmaNL(NCTS_TMP, DY_TMP, division) + SaveNCTS_WGDAT(NCTS_TMP, Wiedergestellungsdatum) + + If DY_TMP IsNot Nothing Then STATUS.dySt_dyId = DY_TMP.dy_Id + STATUS.SAVE() + statusTMP = STATUS + cVERAG_out_ncts.copyFileFTP_VERAGncts_DY(NCTS_TMP, DY_TMP) 'VERAG SCHNITTSTELLE + ' If If(NCTS_TMP.ncts_firma, "") = "IMEX" Then + + NCTS_TMP.insertIntoSpedBuch(DY_TMP) + + + '=====ATEZ BEREITSTELLUNG========== + checkATEZ_Bereitstellung(DY_TMP, d) + '================================== + + FORM.addDGVEinarbeitung("NCTS: Überlassungsmeldung", STATUS.dySt_BezugsNr) + End If + Catch ex As Exception + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace & vbNewLine & "Datei: " & Dateiname, System.Reflection.MethodInfo.GetCurrentMethod.Name) + readNCTS_Ueberlassungsmeldung008 = "" + End Try + End Function Shared Sub SaveNCTS_WGDAT(ByRef NCTS_TMP As DAKOSY_Worker.cDakosyNCTSOut, WGDAT As Object) @@ -2106,4 +3320,74 @@ Public Class cWorker_NCTS End Function + + Shared Function readNCTS_AnrechnungReferenzbetraege002(FORM As frmDYNachrichtenVerarbeitung, d As String) As String + Try + Dim NCTS As DAKOSY_Worker.AnrechnungReferenzbetraegeNCTSDE_002.AnrechnungReferenzbetraegeMATyp = DAKOSY_Worker.AnrechnungReferenzbetraegeNCTSDE_002.AnrechnungReferenzbetraegeMATyp.LoadFromFile(d) + Dim MRN = "" + Dim tstmp As Object = Nothing + Dim division = "" + readNCTS_AnrechnungReferenzbetraege002 = "" + If NCTS IsNot Nothing Then + If NCTS.Transaktion IsNot Nothing Then + If NCTS.Transaktion.IODivision3 IsNot Nothing Then + division = NCTS.Transaktion.IODivision3 + End If + End If + If NCTS.EinzelAnrechnungReferenzbetraege IsNot Nothing Then + If NCTS.EinzelAnrechnungReferenzbetraege.ObjektIdentifizierung IsNot Nothing Then + If NCTS.EinzelAnrechnungReferenzbetraege.ObjektIdentifizierung.ObjektName IsNot Nothing Then + readNCTS_AnrechnungReferenzbetraege002 = NCTS.EinzelAnrechnungReferenzbetraege.ObjektIdentifizierung.ObjektName + End If + End If + If NCTS.EinzelAnrechnungReferenzbetraege.KopfDaten IsNot Nothing Then + If NCTS.EinzelAnrechnungReferenzbetraege.KopfDaten.MRN IsNot Nothing Then + MRN = NCTS.EinzelAnrechnungReferenzbetraege.KopfDaten.MRN + If NCTS.EinzelAnrechnungReferenzbetraege.KopfDaten.ZeitpunktAnrechnungReferenzbetraege > "01.01.2000" Then + tstmp = NCTS.EinzelAnrechnungReferenzbetraege.KopfDaten.ZeitpunktAnrechnungReferenzbetraege + End If + End If + End If + End If + End If + ' NCTS.LOADByBezugsNr(bezugsNr, False) ' Falls schon ein DS mit dieser Bezugsnummer vorhanden ist. + + If readNCTS_AnrechnungReferenzbetraege002 <> "" And MRN <> "" Then 'BEZUGSNR vorhanden + Dim STATUS As DAKOSY_Worker.cDakosy_Statusmeldungen = FORM.getStatusCheckTransID(NCTS.Transaktion.IOReferenz, NCTS.Transaktion.IODatumZeit) + STATUS.dySt_BezugsNr = readNCTS_AnrechnungReferenzbetraege002 + STATUS.dySt_artMitteilung = "AR" + STATUS.dySt_dyArt = "" '"NCTS" 'T1/T2 + + STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_53 + STATUS.dySt_ergCode = "TSTMP" + STATUS.dySt_ergMitteilung = MRN + ' STATUS.dySt_ergMitteilung = "" + If tstmp IsNot Nothing Then STATUS.dySt_ergZeitpunkt = tstmp + 'EINTRAG IN tblDakosy_Zollanmeldungen + Dim DY_TMP As DAKOSY_Worker.cDakosy_Zollanmeldungen = FORM.saveDY_ZA(STATUS, NCTS.Transaktion.IOReferenz, If(tstmp, NCTS.Transaktion.IODatumZeit), "NCTS") + Dim NCTS_TMP As DAKOSY_Worker.cDakosyNCTSOut = saveDY_NCTS(STATUS, DY_TMP, NCTS.Transaktion.IOReferenz, If(tstmp, NCTS.Transaktion.IODatumZeit), , MRN) + + SaveNCTS_FirmaNL(NCTS_TMP, DY_TMP, division) + + 'Gestellung eintragen + NCTS_TMP.ncts_Gestellt = True + NCTS_TMP.ncts_GestelltAm = tstmp + NCTS_TMP.SAVE() + + If DY_TMP IsNot Nothing Then STATUS.dySt_dyId = DY_TMP.dy_Id + STATUS.SAVE() + + '=====ATEZ BEREITSTELLUNG========== + checkATEZ_Bereitstellung(DY_TMP, d) + '================================== + + FORM.addDGVEinarbeitung("NCTS: AnrechnungReferenzbetäege", STATUS.dySt_BezugsNr) + End If + Catch ex As Exception + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace & vbNewLine & "Datei: " & Dateiname, System.Reflection.MethodInfo.GetCurrentMethod.Name) + readNCTS_AnrechnungReferenzbetraege002 = "" + End Try + End Function + + End Class diff --git a/initATLASAufschubkonten/frmDYNachrichtenVerarbeitung.vb b/initATLASAufschubkonten/frmDYNachrichtenVerarbeitung.vb index 1fe3997..c91497a 100644 --- a/initATLASAufschubkonten/frmDYNachrichtenVerarbeitung.vb +++ b/initATLASAufschubkonten/frmDYNachrichtenVerarbeitung.vb @@ -279,25 +279,39 @@ Public Class frmDYNachrichtenVerarbeitung '------------------ NCTS ------------------ '------------------------------------------ - 'NCTS: Versandanmeldung + 'NCTS: Versandanmeldung ATLAS 9.1 + If Not found AndAlso cGetMsgType.isNCTS_VersandanmeldungXML_DETPDD(doc) Then + If cWorker_NCTS.readNCTS_VersandanmeldungXML_DETPDD(Me, doc, statusTMP) <> "" Then found = True + End If + + 'NCTS: Versandanmeldung - alt If Not found AndAlso cGetMsgType.isNCTS_VersandanmeldungXML(doc) Then If cWorker_NCTS.readNCTS_VersandanmeldungXML(Me, doc, statusTMP) <> "" Then found = True End If + + 'NCTS: Ankunftsanzeige If Not found AndAlso cGetMsgType.isNCTS_AnkunftsanzeigeXML(doc) Then - If cWorker_NCTS.readNCTS_AnkunftsanzeigeXML(doc) <> "" Then found = True + Select Case VERSION + Case "XXXXX" + Case Else : If cWorker_NCTS.readNCTS_AnkunftsanzeigeXML(doc) <> "" Then found = True + End Select End If 'NCTS: Versandbestätigung - If Not found And cGetMsgType.isNCTS_Versandbestaetigung(doc) Then - If cWorker_NCTS.readNCTS_Versandbestaetigung(Me, d) <> "" Then found = True + If Not found And cGetMsgType.isNCTS_Versandbestaetigung(doc, VERSION) Then + Select Case VERSION + Case "002" : If cWorker_NCTS.readNCTS_Versandbestaetigung002(Me, d) <> "" Then found = True + Case Else : If cWorker_NCTS.readNCTS_Versandbestaetigung(Me, d) <> "" Then found = True + End Select ' If bezugsNr <> "" Then addDGVEinarbeitung("NCTS: Versandbestätigung", bezugsNr) : found = True End If 'NCTS: Ueberlassungsmeldung If Not found And cGetMsgType.isNCTS_Ueberlassungsmeldung(doc, VERSION) Then Select Case VERSION + Case "008" : If cWorker_NCTS.readNCTS_Ueberlassungsmeldung008(Me, d, statusTMP) <> "" Then found = True ': MsgBox("005!") Case "007" : If cWorker_NCTS.readNCTS_Ueberlassungsmeldung007(Me, d, statusTMP) <> "" Then found = True ': MsgBox("005!") Case "006" : If cWorker_NCTS.readNCTS_Ueberlassungsmeldung006(Me, d, statusTMP) <> "" Then found = True ': MsgBox("005!") Case "005" : If cWorker_NCTS.readNCTS_Ueberlassungsmeldung005(Me, d, statusTMP) <> "" Then found = True ': MsgBox("005!") @@ -306,23 +320,41 @@ Public Class frmDYNachrichtenVerarbeitung End If 'NCTS: AnrechnungReferenzbetraege - If Not found And cGetMsgType.isNCTS_AnrechnungReferenzbetraege(doc) Then - If cWorker_NCTS.readNCTS_AnrechnungReferenzbetraege(Me, d) <> "" Then found = True + If Not found And cGetMsgType.isNCTS_AnrechnungReferenzbetraege(doc, VERSION) Then + Select Case VERSION + Case "002" : If cWorker_NCTS.readNCTS_AnrechnungReferenzbetraege002(Me, d) <> "" Then found = True + Case Else : If cWorker_NCTS.readNCTS_AnrechnungReferenzbetraege(Me, d) <> "" Then found = True + End Select End If 'NCTS: Erledigungsmeldung - If Not found And cGetMsgType.isNCTS_Erledigungsmeldung(doc) Then - If cWorker_NCTS.readNCTS_Erledigungsmeldung(Me, d) <> "" Then found = True + If Not found And cGetMsgType.isNCTS_Erledigungsmeldung(doc, VERSION) Then + Select Case VERSION + Case "003" : If cWorker_NCTS.readNCTS_Erledigungsmeldung003(Me, d) <> "" Then found = True + Case Else : If cWorker_NCTS.readNCTS_Erledigungsmeldung(Me, d) <> "" Then found = True + End Select + End If + + 'NCTS: Ereignismitteilung + If Not found And cGetMsgType.isNCTS_Ereignismitteilung(doc, VERSION) Then + Select Case VERSION + 'Case "001" : If cWorker_NCTS.readNCTS_Erledigungsmeldung001(Me, d) <> "" Then found = True + Case Else : If cWorker_NCTS.readNCTS_Erledigungsmeldung001(Me, d) <> "" Then found = True + End Select End If 'NCTS: StatusmeldungNCTSDE - If Not found And cGetMsgType.isNCTS_StatusmeldungNCTSDE(doc) Then - If cWorker_NCTS.readNCTS_StatusmeldungNCTSDE(Me, d) <> "" Then found = True + If Not found And cGetMsgType.isNCTS_StatusmeldungNCTSDE(doc, VERSION) Then + Select Case VERSION + Case "003" : If cWorker_NCTS.readNCTS_StatusmeldungNCTSDE003(Me, d) <> "" Then found = True + Case Else : If cWorker_NCTS.readNCTS_StatusmeldungNCTSDE(Me, d) <> "" Then found = True + End Select End If 'NCTS: UngueltigkeitSicherheitenNCTSDE If Not found And cGetMsgType.isNCTS_UngueltigkeitSicherheitenNCTSDE(doc, VERSION) Then Select Case VERSION + Case "004" : If cWorker_NCTS.readNCTS_UngueltigkeitSicherheitenNCTSDE004(Me, d) <> "" Then found = True ': MsgBox("005!") Case "003" : If cWorker_NCTS.readNCTS_UngueltigkeitSicherheitenNCTSDE003(Me, d) <> "" Then found = True ': MsgBox("005!") Case Else : If cWorker_NCTS.readNCTS_UngueltigkeitSicherheitenNCTSDE(Me, d) <> "" Then found = True End Select @@ -5818,6 +5850,8 @@ Public Class frmDYNachrichtenVerarbeitung + + Public Shared Sub tryGetFirmaNiederlassung(ByRef firma As String, ByRef niederlassung As String, Mail As String, BezugsNr As String) If Mail.Contains("@imex") Then firma = "IMEX" diff --git a/initATLASAufschubkonten/frmStartOptions.Designer.vb b/initATLASAufschubkonten/frmStartOptions.Designer.vb index 7eab82a..42f3db9 100644 --- a/initATLASAufschubkonten/frmStartOptions.Designer.vb +++ b/initATLASAufschubkonten/frmStartOptions.Designer.vb @@ -155,7 +155,7 @@ Partial Class frmStartOptions Me.PictureBox18 = New System.Windows.Forms.PictureBox() Me.LinkLabel41 = New System.Windows.Forms.LinkLabel() Me.LinkLabel42 = New System.Windows.Forms.LinkLabel() - Me.Label23 = New System.Windows.Forms.Label() + Me.Label99 = New System.Windows.Forms.Label() Me.LinkLabel43 = New System.Windows.Forms.LinkLabel() Me.LinkLabel44 = New System.Windows.Forms.LinkLabel() Me.Label24 = New System.Windows.Forms.Label() @@ -747,7 +747,7 @@ Partial Class frmStartOptions Me.TabPage1.Controls.Add(Me.Button21) Me.TabPage1.Controls.Add(Me.Button20) Me.TabPage1.Controls.Add(Me.Button19) - Me.TabPage1.Controls.Add(Me.Label23) + Me.TabPage1.Controls.Add(Me.Label99) Me.TabPage1.Controls.Add(Me.Button18) Me.TabPage1.Controls.Add(Me.PictureBox20) Me.TabPage1.Controls.Add(Me.LinkLabel45) @@ -826,13 +826,13 @@ Partial Class frmStartOptions ' 'Label23 ' - Me.Label23.AutoSize = True - Me.Label23.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.Label23.Location = New System.Drawing.Point(582, 261) - Me.Label23.Name = "Label23" - Me.Label23.Size = New System.Drawing.Size(152, 13) - Me.Label23.TabIndex = 78 - Me.Label23.Text = "AAS (Aviso-Alert-System):" + Me.Label99.AutoSize = True + Me.Label99.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label99.Location = New System.Drawing.Point(582, 261) + Me.Label99.Name = "Label99" + Me.Label99.Size = New System.Drawing.Size(152, 13) + Me.Label99.TabIndex = 78 + Me.Label99.Text = "AAS (Aviso-Alert-System):" ' 'Button18 ' @@ -2851,7 +2851,7 @@ Partial Class frmStartOptions Friend WithEvents TabPage4 As TabPage Friend WithEvents LinkLabel41 As LinkLabel Friend WithEvents LinkLabel42 As LinkLabel - Friend WithEvents Label23 As Label + Friend WithEvents Label99 As Label Friend WithEvents LinkLabel43 As LinkLabel Friend WithEvents LinkLabel44 As LinkLabel Friend WithEvents Label24 As Label