From 39295b280094e7e69efd93827e770d3c8f271c4a Mon Sep 17 00:00:00 2001 From: Andreas Luxbauer Date: Tue, 26 Sep 2023 09:01:14 +0200 Subject: [PATCH] ATLAS 9.1 AES 3.0; NCTS div. --- .../AES/AusfuhrAnmeldung_004.Designer.vb | 10505 +++++++++ .../DAKOSY/ATLAS/AES/AusfuhrAnmeldung_004.xsd | 658 + .../BestaetigungAusfuhr_007.Designer.vb | 6802 ++++++ .../BestaetigungAusfuhr_007.xsd | 524 + .../DAKOSY/ATLAS/AES/DEXPDF_2023.Designer.vb | 19576 ++++++++++++++++ .../DAKOSY/ATLAS/AES/DEXPDF_2023.xsd | 6705 ++++++ .../UeberlassungAusfuhr_007.Designer.vb | 18095 ++++++++++++++ .../UeberlassungAusfuhr_007.xsd | 1172 + .../Abgabenbescheid_011.Designer.vb | 6970 ++++++ .../Abgabenbescheid/Abgabenbescheid_011.xsd | 581 + ...erkehrAktVeredelUmwandlung_004.Designer.vb | 8327 +++++++ .../FreierVerkehrAktVeredelUmwandlung_004.xsd | 53 +- ...AktVeredelUmwandlung_004_V2022.designer.vb | 2 +- ...rVerkehrAktVeredelUmwandlung_004_V2023.xsd | 619 + .../DAKOSY/ATLAS/NCTS/cDakosyNCTSOut004.vb | 8 +- DAKOSY_Worker/DAKOSY_Worker_lib.vbproj | 24 + .../cZollsysteme_Aktenbeschriftung.vb | 20 +- VERAGMonitoring/cSqlDb.vb | 90 +- initATLASAufschubkonten/cGetMsgType.vb | 17 + initATLASAufschubkonten/cWorker_NCTS.vb | 24 +- .../frmDYNachrichtenVerarbeitung.vb | 803 +- 21 files changed, 81549 insertions(+), 26 deletions(-) create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/AES/AusfuhrAnmeldung_004.Designer.vb create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/AES/AusfuhrAnmeldung_004.xsd create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/AES/BestaetigungAusfuhr/BestaetigungAusfuhr_007.Designer.vb create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/AES/BestaetigungAusfuhr/BestaetigungAusfuhr_007.xsd create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/AES/DEXPDF_2023.Designer.vb create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/AES/DEXPDF_2023.xsd create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/AES/UeberlassungAusfuhr/UeberlassungAusfuhr_007.Designer.vb create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/AES/UeberlassungAusfuhr/UeberlassungAusfuhr_007.xsd create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/EZA/Abgabenbescheid/Abgabenbescheid_011.Designer.vb create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/EZA/Abgabenbescheid/Abgabenbescheid_011.xsd create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/EZA/FreierVerkehr/FreierVerkehrAktVeredelUmwandlung_004.Designer.vb create mode 100644 DAKOSY_Worker/DAKOSY/ATLAS/EZA/FreierVerkehr/FreierVerkehrAktVeredelUmwandlung_004_V2023.xsd diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/AES/AusfuhrAnmeldung_004.Designer.vb b/DAKOSY_Worker/DAKOSY/ATLAS/AES/AusfuhrAnmeldung_004.Designer.vb new file mode 100644 index 0000000..bf0e6d3 --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/AES/AusfuhrAnmeldung_004.Designer.vb @@ -0,0 +1,10505 @@ +'' ------------------------------------------------------------------------------ +'' +'' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com +'' {"TargetFramework":"Net47","NameSpace":"AusfuhrAnmeldung_004","Language":"VisualBasic","ExcludeImportedTypes":true,"ExpandNestedAttributeGroup":true,"GenerateUnusedComplexType":true,"GenerateUnusedSimpleType":true,"Properties":{},"XmlAttribute":{"Enabled":true},"ClassParams":{},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{"Formating":true},"JsonOutput":{},"Enabled":true},"Miscellaneous":{}} +'' +'' ------------------------------------------------------------------------------ +#Disable Warning +Imports System +Imports System.Diagnostics +Imports System.Xml.Serialization +Imports System.Runtime.Serialization +Imports System.Collections +Imports System.Xml.Schema +Imports System.ComponentModel +Imports System.Xml +Imports System.IO +Imports System.Text +Imports System.Collections.Generic + +Namespace AusfuhrAnmeldung_004 + + + Partial Public Class AusfuhrAnmeldungEGTyp + Inherits DatenaustauschExportTyp + +#Region "Private fields" + Private _einzelAnmeldung As EinzelAusfuhrAnmeldungTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._einzelAnmeldung = New EinzelAusfuhrAnmeldungTyp() + End Sub + + + Public Property EinzelAnmeldung() As EinzelAusfuhrAnmeldungTyp + Get + Return Me._einzelAnmeldung + End Get + Set + Me._einzelAnmeldung = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AusfuhrAnmeldungEGTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AusfuhrAnmeldungEGTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AusfuhrAnmeldungEGTyp object + ''' + ''' string to deserialize + ''' Output AusfuhrAnmeldungEGTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AusfuhrAnmeldungEGTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AusfuhrAnmeldungEGTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AusfuhrAnmeldungEGTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AusfuhrAnmeldungEGTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AusfuhrAnmeldungEGTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AusfuhrAnmeldungEGTyp + Return CType(SerializerXml.Deserialize(s), AusfuhrAnmeldungEGTyp) + End Function +#End Region + + ''' + ''' Serializes current AusfuhrAnmeldungEGTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AusfuhrAnmeldungEGTyp object + ''' + ''' File to load and deserialize + ''' Output AusfuhrAnmeldungEGTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AusfuhrAnmeldungEGTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AusfuhrAnmeldungEGTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AusfuhrAnmeldungEGTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AusfuhrAnmeldungEGTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class EinzelAusfuhrAnmeldungTyp + +#Region "Private fields" + Private _objektIdentifizierung As ObjektIdentifizierungEGTyp + + Private _exportOperation As ExportOperationEGType + + Private _goodsItem As List(Of GoodsItemEGType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsItem = New List(Of GoodsItemEGType)() + Me._exportOperation = New ExportOperationEGType() + Me._objektIdentifizierung = New ObjektIdentifizierungEGTyp() + End Sub + + + Public Property ObjektIdentifizierung() As ObjektIdentifizierungEGTyp + Get + Return Me._objektIdentifizierung + End Get + Set + Me._objektIdentifizierung = Value + End Set + End Property + + + Public Property ExportOperation() As ExportOperationEGType + Get + Return Me._exportOperation + End Get + Set + Me._exportOperation = Value + End Set + End Property + + + Public Property GoodsItem() As List(Of GoodsItemEGType) + Get + Return Me._goodsItem + End Get + Set + Me._goodsItem = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(EinzelAusfuhrAnmeldungTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize EinzelAusfuhrAnmeldungTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes EinzelAusfuhrAnmeldungTyp object + ''' + ''' string to deserialize + ''' Output EinzelAusfuhrAnmeldungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelAusfuhrAnmeldungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EinzelAusfuhrAnmeldungTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelAusfuhrAnmeldungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As EinzelAusfuhrAnmeldungTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), EinzelAusfuhrAnmeldungTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As EinzelAusfuhrAnmeldungTyp + Return CType(SerializerXml.Deserialize(s), EinzelAusfuhrAnmeldungTyp) + End Function +#End Region + + ''' + ''' Serializes current EinzelAusfuhrAnmeldungTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an EinzelAusfuhrAnmeldungTyp object + ''' + ''' File to load and deserialize + ''' Output EinzelAusfuhrAnmeldungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelAusfuhrAnmeldungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EinzelAusfuhrAnmeldungTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelAusfuhrAnmeldungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As EinzelAusfuhrAnmeldungTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ObjektIdentifizierungEGTyp + +#Region "Private fields" + Private _objektName As String + + Private _objektAliasname As String + + Private _bezugsnummerVorblendung As String + + Private _kopieVon As String + + Private _objektAktion As List(Of String) + + Private _compliancePruefung As String + + Private _bearbeiter As String + + Private _absenderSystemName As String + + Private _shipmentReferenz As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._objektAktion = New List(Of String)() + End Sub + + + Public Property ObjektName() As String + Get + Return Me._objektName + End Get + Set + Me._objektName = Value + End Set + End Property + + + Public Property ObjektAliasname() As String + Get + Return Me._objektAliasname + End Get + Set + Me._objektAliasname = Value + End Set + End Property + + + Public Property BezugsnummerVorblendung() As String + Get + Return Me._bezugsnummerVorblendung + End Get + Set + Me._bezugsnummerVorblendung = Value + End Set + End Property + + + Public Property KopieVon() As String + Get + Return Me._kopieVon + End Get + Set + Me._kopieVon = Value + End Set + End Property + + + Public Property ObjektAktion() As List(Of String) + Get + Return Me._objektAktion + End Get + Set + Me._objektAktion = Value + End Set + End Property + + + Public Property CompliancePruefung() As String + Get + Return Me._compliancePruefung + End Get + Set + Me._compliancePruefung = Value + End Set + End Property + + + Public Property Bearbeiter() As String + Get + Return Me._bearbeiter + End Get + Set + Me._bearbeiter = Value + End Set + End Property + + + Public Property AbsenderSystemName() As String + Get + Return Me._absenderSystemName + End Get + Set + Me._absenderSystemName = Value + End Set + End Property + + + Public Property ShipmentReferenz() As String + Get + Return Me._shipmentReferenz + End Get + Set + Me._shipmentReferenz = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ObjektIdentifizierungEGTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ObjektIdentifizierungEGTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ObjektIdentifizierungEGTyp object + ''' + ''' string to deserialize + ''' Output ObjektIdentifizierungEGTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ObjektIdentifizierungEGTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ObjektIdentifizierungEGTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ObjektIdentifizierungEGTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ObjektIdentifizierungEGTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ObjektIdentifizierungEGTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ObjektIdentifizierungEGTyp + Return CType(SerializerXml.Deserialize(s), ObjektIdentifizierungEGTyp) + End Function +#End Region + + ''' + ''' Serializes current ObjektIdentifizierungEGTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ObjektIdentifizierungEGTyp object + ''' + ''' File to load and deserialize + ''' Output ObjektIdentifizierungEGTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ObjektIdentifizierungEGTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ObjektIdentifizierungEGTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ObjektIdentifizierungEGTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ObjektIdentifizierungEGTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class InwardProcessingGoodsReferenceEGType + +#Region "Private fields" + Private _goodsItemNumber As String + + Private _mRN As String + + Private _registrationNumber As String + + Private _accessViaATLAS As String + + Private _goodsRelatedData As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property GoodsItemNumber() As String + Get + Return Me._goodsItemNumber + End Get + Set + Me._goodsItemNumber = Value + End Set + End Property + + + Public Property MRN() As String + Get + Return Me._mRN + End Get + Set + Me._mRN = Value + End Set + End Property + + + Public Property RegistrationNumber() As String + Get + Return Me._registrationNumber + End Get + Set + Me._registrationNumber = Value + End Set + End Property + + + Public Property AccessViaATLAS() As String + Get + Return Me._accessViaATLAS + End Get + Set + Me._accessViaATLAS = Value + End Set + End Property + + + Public Property GoodsRelatedData() As String + Get + Return Me._goodsRelatedData + End Get + Set + Me._goodsRelatedData = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(InwardProcessingGoodsReferenceEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize InwardProcessingGoodsReferenceEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes InwardProcessingGoodsReferenceEGType object + ''' + ''' string to deserialize + ''' Output InwardProcessingGoodsReferenceEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As InwardProcessingGoodsReferenceEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, InwardProcessingGoodsReferenceEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As InwardProcessingGoodsReferenceEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As InwardProcessingGoodsReferenceEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), InwardProcessingGoodsReferenceEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As InwardProcessingGoodsReferenceEGType + Return CType(SerializerXml.Deserialize(s), InwardProcessingGoodsReferenceEGType) + End Function +#End Region + + ''' + ''' Serializes current InwardProcessingGoodsReferenceEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an InwardProcessingGoodsReferenceEGType object + ''' + ''' File to load and deserialize + ''' Output InwardProcessingGoodsReferenceEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As InwardProcessingGoodsReferenceEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, InwardProcessingGoodsReferenceEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As InwardProcessingGoodsReferenceEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As InwardProcessingGoodsReferenceEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class InwardProcessingEGType + +#Region "Private fields" + Private _simplyGrantedAuthorisation As String + + Private _customsOfficeOfSupervision As String + + Private _typeOfAuthorisation As String + + Private _referenceNumber As String + + Private _goodsReference As List(Of InwardProcessingGoodsReferenceEGType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsReference = New List(Of InwardProcessingGoodsReferenceEGType)() + End Sub + + + Public Property SimplyGrantedAuthorisation() As String + Get + Return Me._simplyGrantedAuthorisation + End Get + Set + Me._simplyGrantedAuthorisation = Value + End Set + End Property + + + Public Property CustomsOfficeOfSupervision() As String + Get + Return Me._customsOfficeOfSupervision + End Get + Set + Me._customsOfficeOfSupervision = Value + End Set + End Property + + + Public Property TypeOfAuthorisation() As String + Get + Return Me._typeOfAuthorisation + End Get + Set + Me._typeOfAuthorisation = Value + End Set + End Property + + + Public Property ReferenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + + Public Property GoodsReference() As List(Of InwardProcessingGoodsReferenceEGType) + Get + Return Me._goodsReference + End Get + Set + Me._goodsReference = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(InwardProcessingEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize InwardProcessingEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes InwardProcessingEGType object + ''' + ''' string to deserialize + ''' Output InwardProcessingEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As InwardProcessingEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, InwardProcessingEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As InwardProcessingEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As InwardProcessingEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), InwardProcessingEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As InwardProcessingEGType + Return CType(SerializerXml.Deserialize(s), InwardProcessingEGType) + End Function +#End Region + + ''' + ''' Serializes current InwardProcessingEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an InwardProcessingEGType object + ''' + ''' File to load and deserialize + ''' Output InwardProcessingEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As InwardProcessingEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, InwardProcessingEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As InwardProcessingEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As InwardProcessingEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class GoodsReductionAfterTreatmentEGType + +#Region "Private fields" + Private _quantity As String + + Private _measurementUnit As String + + Private _qualifier As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Quantity() As String + Get + Return Me._quantity + End Get + Set + Me._quantity = Value + End Set + End Property + + + Public Property MeasurementUnit() As String + Get + Return Me._measurementUnit + End Get + Set + Me._measurementUnit = Value + End Set + End Property + + + Public Property Qualifier() As String + Get + Return Me._qualifier + End Get + Set + Me._qualifier = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(GoodsReductionAfterTreatmentEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize GoodsReductionAfterTreatmentEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes GoodsReductionAfterTreatmentEGType object + ''' + ''' string to deserialize + ''' Output GoodsReductionAfterTreatmentEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GoodsReductionAfterTreatmentEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, GoodsReductionAfterTreatmentEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GoodsReductionAfterTreatmentEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As GoodsReductionAfterTreatmentEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), GoodsReductionAfterTreatmentEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As GoodsReductionAfterTreatmentEGType + Return CType(SerializerXml.Deserialize(s), GoodsReductionAfterTreatmentEGType) + End Function +#End Region + + ''' + ''' Serializes current GoodsReductionAfterTreatmentEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an GoodsReductionAfterTreatmentEGType object + ''' + ''' File to load and deserialize + ''' Output GoodsReductionAfterTreatmentEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GoodsReductionAfterTreatmentEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, GoodsReductionAfterTreatmentEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GoodsReductionAfterTreatmentEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As GoodsReductionAfterTreatmentEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class GoodsReductionEGType + +#Region "Private fields" + Private _quantity As String + + Private _measurementUnit As String + + Private _qualifier As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Quantity() As String + Get + Return Me._quantity + End Get + Set + Me._quantity = Value + End Set + End Property + + + Public Property MeasurementUnit() As String + Get + Return Me._measurementUnit + End Get + Set + Me._measurementUnit = Value + End Set + End Property + + + Public Property Qualifier() As String + Get + Return Me._qualifier + End Get + Set + Me._qualifier = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(GoodsReductionEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize GoodsReductionEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes GoodsReductionEGType object + ''' + ''' string to deserialize + ''' Output GoodsReductionEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GoodsReductionEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, GoodsReductionEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GoodsReductionEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As GoodsReductionEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), GoodsReductionEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As GoodsReductionEGType + Return CType(SerializerXml.Deserialize(s), GoodsReductionEGType) + End Function +#End Region + + ''' + ''' Serializes current GoodsReductionEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an GoodsReductionEGType object + ''' + ''' File to load and deserialize + ''' Output GoodsReductionEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GoodsReductionEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, GoodsReductionEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GoodsReductionEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As GoodsReductionEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class CustomsWarehousingGoodsReferenceEGType + +#Region "Private fields" + Private _goodsItemNumber As String + + Private _mRN As String + + Private _registrationNumber As String + + Private _articleCode As String + + Private _owner As String + + Private _chargeNumber As String + + Private _countryOfOrigin As String + + Private _netMass As String + + Private _statisticalValue As String + + Private _quantity As String + + Private _commodityCode As String + + Private _usualTreatment As String + + Private _accessViaATLAS As String + + Private _complementOfInformation As String + + Private _goodsReduction As GoodsReductionEGType + + Private _goodsReductionAfterTreatment As GoodsReductionAfterTreatmentEGType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsReductionAfterTreatment = New GoodsReductionAfterTreatmentEGType() + Me._goodsReduction = New GoodsReductionEGType() + End Sub + + + Public Property GoodsItemNumber() As String + Get + Return Me._goodsItemNumber + End Get + Set + Me._goodsItemNumber = Value + End Set + End Property + + + Public Property MRN() As String + Get + Return Me._mRN + End Get + Set + Me._mRN = Value + End Set + End Property + + + Public Property RegistrationNumber() As String + Get + Return Me._registrationNumber + End Get + Set + Me._registrationNumber = Value + End Set + End Property + + + Public Property ArticleCode() As String + Get + Return Me._articleCode + End Get + Set + Me._articleCode = Value + End Set + End Property + + + Public Property Owner() As String + Get + Return Me._owner + End Get + Set + Me._owner = Value + End Set + End Property + + + Public Property ChargeNumber() As String + Get + Return Me._chargeNumber + End Get + Set + Me._chargeNumber = Value + End Set + End Property + + + Public Property CountryOfOrigin() As String + Get + Return Me._countryOfOrigin + End Get + Set + Me._countryOfOrigin = Value + End Set + End Property + + + Public Property NetMass() As String + Get + Return Me._netMass + End Get + Set + Me._netMass = Value + End Set + End Property + + + Public Property StatisticalValue() As String + Get + Return Me._statisticalValue + End Get + Set + Me._statisticalValue = Value + End Set + End Property + + + Public Property Quantity() As String + Get + Return Me._quantity + End Get + Set + Me._quantity = Value + End Set + End Property + + + Public Property CommodityCode() As String + Get + Return Me._commodityCode + End Get + Set + Me._commodityCode = Value + End Set + End Property + + + Public Property UsualTreatment() As String + Get + Return Me._usualTreatment + End Get + Set + Me._usualTreatment = Value + End Set + End Property + + + Public Property AccessViaATLAS() As String + Get + Return Me._accessViaATLAS + End Get + Set + Me._accessViaATLAS = Value + End Set + End Property + + + Public Property ComplementOfInformation() As String + Get + Return Me._complementOfInformation + End Get + Set + Me._complementOfInformation = Value + End Set + End Property + + + Public Property GoodsReduction() As GoodsReductionEGType + Get + Return Me._goodsReduction + End Get + Set + Me._goodsReduction = Value + End Set + End Property + + + Public Property GoodsReductionAfterTreatment() As GoodsReductionAfterTreatmentEGType + Get + Return Me._goodsReductionAfterTreatment + End Get + Set + Me._goodsReductionAfterTreatment = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(CustomsWarehousingGoodsReferenceEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize CustomsWarehousingGoodsReferenceEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes CustomsWarehousingGoodsReferenceEGType object + ''' + ''' string to deserialize + ''' Output CustomsWarehousingGoodsReferenceEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CustomsWarehousingGoodsReferenceEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, CustomsWarehousingGoodsReferenceEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CustomsWarehousingGoodsReferenceEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As CustomsWarehousingGoodsReferenceEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CustomsWarehousingGoodsReferenceEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As CustomsWarehousingGoodsReferenceEGType + Return CType(SerializerXml.Deserialize(s), CustomsWarehousingGoodsReferenceEGType) + End Function +#End Region + + ''' + ''' Serializes current CustomsWarehousingGoodsReferenceEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an CustomsWarehousingGoodsReferenceEGType object + ''' + ''' File to load and deserialize + ''' Output CustomsWarehousingGoodsReferenceEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CustomsWarehousingGoodsReferenceEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, CustomsWarehousingGoodsReferenceEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CustomsWarehousingGoodsReferenceEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As CustomsWarehousingGoodsReferenceEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class CustomsWarehousingEGType + +#Region "Private fields" + Private _typeOfAuthorisation As String + + Private _referenceNumber As String + + Private _lRN As String + + Private _goodsReference As List(Of CustomsWarehousingGoodsReferenceEGType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsReference = New List(Of CustomsWarehousingGoodsReferenceEGType)() + End Sub + + + Public Property TypeOfAuthorisation() As String + Get + Return Me._typeOfAuthorisation + End Get + Set + Me._typeOfAuthorisation = Value + End Set + End Property + + + Public Property ReferenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + + Public Property LRN() As String + Get + Return Me._lRN + End Get + Set + Me._lRN = Value + End Set + End Property + + + Public Property GoodsReference() As List(Of CustomsWarehousingGoodsReferenceEGType) + Get + Return Me._goodsReference + End Get + Set + Me._goodsReference = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(CustomsWarehousingEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize CustomsWarehousingEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes CustomsWarehousingEGType object + ''' + ''' string to deserialize + ''' Output CustomsWarehousingEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CustomsWarehousingEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, CustomsWarehousingEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CustomsWarehousingEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As CustomsWarehousingEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CustomsWarehousingEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As CustomsWarehousingEGType + Return CType(SerializerXml.Deserialize(s), CustomsWarehousingEGType) + End Function +#End Region + + ''' + ''' Serializes current CustomsWarehousingEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an CustomsWarehousingEGType object + ''' + ''' File to load and deserialize + ''' Output CustomsWarehousingEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CustomsWarehousingEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, CustomsWarehousingEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CustomsWarehousingEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As CustomsWarehousingEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ProcedureTransferenceEGType + +#Region "Private fields" + Private _customsWarehousing As CustomsWarehousingEGType + + Private _inwardProcessing As InwardProcessingEGType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._inwardProcessing = New InwardProcessingEGType() + Me._customsWarehousing = New CustomsWarehousingEGType() + End Sub + + + Public Property CustomsWarehousing() As CustomsWarehousingEGType + Get + Return Me._customsWarehousing + End Get + Set + Me._customsWarehousing = Value + End Set + End Property + + + Public Property InwardProcessing() As InwardProcessingEGType + Get + Return Me._inwardProcessing + End Get + Set + Me._inwardProcessing = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ProcedureTransferenceEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ProcedureTransferenceEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ProcedureTransferenceEGType object + ''' + ''' string to deserialize + ''' Output ProcedureTransferenceEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ProcedureTransferenceEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ProcedureTransferenceEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ProcedureTransferenceEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ProcedureTransferenceEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ProcedureTransferenceEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ProcedureTransferenceEGType + Return CType(SerializerXml.Deserialize(s), ProcedureTransferenceEGType) + End Function +#End Region + + ''' + ''' Serializes current ProcedureTransferenceEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ProcedureTransferenceEGType object + ''' + ''' File to load and deserialize + ''' Output ProcedureTransferenceEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ProcedureTransferenceEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ProcedureTransferenceEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ProcedureTransferenceEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ProcedureTransferenceEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class SupportingDocumentGoodsItemEGType + +#Region "Private fields" + Private _type As String + + Private _qualifier As String + + Private _referenceNumber As String + + Private _documentLineItemNumber As String + + Private _issuingAuthorityName As String + + Private _complementOfInformation As String + + Private _detail As String + + Private _issuingDate As Date + + Private _validityDate As Date + + Private _amount As String + + Private _currency As String + + Private _quantity As String + + Private _measurementUnitAndQualifier As String + + Private _complementaryUnit As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Type() As String + Get + Return Me._type + End Get + Set + Me._type = Value + End Set + End Property + + + Public Property Qualifier() As String + Get + Return Me._qualifier + End Get + Set + Me._qualifier = Value + End Set + End Property + + + Public Property ReferenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + + Public Property DocumentLineItemNumber() As String + Get + Return Me._documentLineItemNumber + End Get + Set + Me._documentLineItemNumber = Value + End Set + End Property + + + Public Property IssuingAuthorityName() As String + Get + Return Me._issuingAuthorityName + End Get + Set + Me._issuingAuthorityName = Value + End Set + End Property + + + Public Property ComplementOfInformation() As String + Get + Return Me._complementOfInformation + End Get + Set + Me._complementOfInformation = Value + End Set + End Property + + + Public Property Detail() As String + Get + Return Me._detail + End Get + Set + Me._detail = Value + End Set + End Property + + + Public Property IssuingDate() As Date + Get + Return Me._issuingDate + End Get + Set + Me._issuingDate = Value + End Set + End Property + + + Public Property ValidityDate() As Date + Get + Return Me._validityDate + End Get + Set + Me._validityDate = Value + End Set + End Property + + + Public Property Amount() As String + Get + Return Me._amount + End Get + Set + Me._amount = Value + End Set + End Property + + + Public Property Currency() As String + Get + Return Me._currency + End Get + Set + Me._currency = Value + End Set + End Property + + + Public Property Quantity() As String + Get + Return Me._quantity + End Get + Set + Me._quantity = Value + End Set + End Property + + + Public Property MeasurementUnitAndQualifier() As String + Get + Return Me._measurementUnitAndQualifier + End Get + Set + Me._measurementUnitAndQualifier = Value + End Set + End Property + + + Public Property ComplementaryUnit() As String + Get + Return Me._complementaryUnit + End Get + Set + Me._complementaryUnit = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(SupportingDocumentGoodsItemEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize SupportingDocumentGoodsItemEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes SupportingDocumentGoodsItemEGType object + ''' + ''' string to deserialize + ''' Output SupportingDocumentGoodsItemEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SupportingDocumentGoodsItemEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SupportingDocumentGoodsItemEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SupportingDocumentGoodsItemEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As SupportingDocumentGoodsItemEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), SupportingDocumentGoodsItemEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As SupportingDocumentGoodsItemEGType + Return CType(SerializerXml.Deserialize(s), SupportingDocumentGoodsItemEGType) + End Function +#End Region + + ''' + ''' Serializes current SupportingDocumentGoodsItemEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an SupportingDocumentGoodsItemEGType object + ''' + ''' File to load and deserialize + ''' Output SupportingDocumentGoodsItemEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SupportingDocumentGoodsItemEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SupportingDocumentGoodsItemEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SupportingDocumentGoodsItemEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As SupportingDocumentGoodsItemEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class OutwardProcessingGoodsItemEGType + +#Region "Private fields" + Private _replacement As String + + Private _reimportDate As Date + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Replacement() As String + Get + Return Me._replacement + End Get + Set + Me._replacement = Value + End Set + End Property + + + Public Property ReimportDate() As Date + Get + Return Me._reimportDate + End Get + Set + Me._reimportDate = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(OutwardProcessingGoodsItemEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize OutwardProcessingGoodsItemEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes OutwardProcessingGoodsItemEGType object + ''' + ''' string to deserialize + ''' Output OutwardProcessingGoodsItemEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As OutwardProcessingGoodsItemEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, OutwardProcessingGoodsItemEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As OutwardProcessingGoodsItemEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As OutwardProcessingGoodsItemEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), OutwardProcessingGoodsItemEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As OutwardProcessingGoodsItemEGType + Return CType(SerializerXml.Deserialize(s), OutwardProcessingGoodsItemEGType) + End Function +#End Region + + ''' + ''' Serializes current OutwardProcessingGoodsItemEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an OutwardProcessingGoodsItemEGType object + ''' + ''' File to load and deserialize + ''' Output OutwardProcessingGoodsItemEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As OutwardProcessingGoodsItemEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, OutwardProcessingGoodsItemEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As OutwardProcessingGoodsItemEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As OutwardProcessingGoodsItemEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class PackagingEGType + +#Region "Private fields" + Private _numberOfPackages As String + + Private _typeOfPackages As String + + Private _shippingMarks As String + + Private _packageReference As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property NumberOfPackages() As String + Get + Return Me._numberOfPackages + End Get + Set + Me._numberOfPackages = Value + End Set + End Property + + + Public Property TypeOfPackages() As String + Get + Return Me._typeOfPackages + End Get + Set + Me._typeOfPackages = Value + End Set + End Property + + + Public Property ShippingMarks() As String + Get + Return Me._shippingMarks + End Get + Set + Me._shippingMarks = Value + End Set + End Property + + + Public Property PackageReference() As String + Get + Return Me._packageReference + End Get + Set + Me._packageReference = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PackagingEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize PackagingEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes PackagingEGType object + ''' + ''' string to deserialize + ''' Output PackagingEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PackagingEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PackagingEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PackagingEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As PackagingEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PackagingEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As PackagingEGType + Return CType(SerializerXml.Deserialize(s), PackagingEGType) + End Function +#End Region + + ''' + ''' Serializes current PackagingEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an PackagingEGType object + ''' + ''' File to load and deserialize + ''' Output PackagingEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PackagingEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PackagingEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PackagingEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PackagingEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class PreviousDocumentGoodsItemEGType + +#Region "Private fields" + Private _type As String + + Private _qualifier As String + + Private _referenceNumber As String + + Private _goodsItemNumber As String + + Private _measurementUnitAndQualifier As String + + Private _quantity As String + + Private _complementOfInformation As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Type() As String + Get + Return Me._type + End Get + Set + Me._type = Value + End Set + End Property + + + Public Property Qualifier() As String + Get + Return Me._qualifier + End Get + Set + Me._qualifier = Value + End Set + End Property + + + Public Property ReferenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + + Public Property GoodsItemNumber() As String + Get + Return Me._goodsItemNumber + End Get + Set + Me._goodsItemNumber = Value + End Set + End Property + + + Public Property MeasurementUnitAndQualifier() As String + Get + Return Me._measurementUnitAndQualifier + End Get + Set + Me._measurementUnitAndQualifier = Value + End Set + End Property + + + Public Property Quantity() As String + Get + Return Me._quantity + End Get + Set + Me._quantity = Value + End Set + End Property + + + Public Property ComplementOfInformation() As String + Get + Return Me._complementOfInformation + End Get + Set + Me._complementOfInformation = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PreviousDocumentGoodsItemEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize PreviousDocumentGoodsItemEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes PreviousDocumentGoodsItemEGType object + ''' + ''' string to deserialize + ''' Output PreviousDocumentGoodsItemEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PreviousDocumentGoodsItemEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PreviousDocumentGoodsItemEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PreviousDocumentGoodsItemEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As PreviousDocumentGoodsItemEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PreviousDocumentGoodsItemEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As PreviousDocumentGoodsItemEGType + Return CType(SerializerXml.Deserialize(s), PreviousDocumentGoodsItemEGType) + End Function +#End Region + + ''' + ''' Serializes current PreviousDocumentGoodsItemEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an PreviousDocumentGoodsItemEGType object + ''' + ''' File to load and deserialize + ''' Output PreviousDocumentGoodsItemEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PreviousDocumentGoodsItemEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PreviousDocumentGoodsItemEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PreviousDocumentGoodsItemEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PreviousDocumentGoodsItemEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class GoodsItemEGType + +#Region "Private fields" + Private _declarationGoodsItemNumber As String + + Private _articleNumber As String + + Private _commodityCode As String + + Private _taricAdditionalCode As List(Of String) + + Private _descriptionOfGoods As String + + Private _cusCode As String + + Private _registrationNumberExternal As String + + Private _additionalInformation As List(Of AdditionalInformationEGType) + + Private _referenceNumberUCR As String + + Private _authorisation As List(Of AuthorisationGoodsItemEGType) + + Private _additionalSupplyChainActor As List(Of AdditionalSupplyChainActorEGType) + + Private _regionOfDispatch As String + + Private _countryOfOrigin As String + + Private _netMass As String + + Private _grossMass As String + + Private _uNNumber As List(Of String) + + Private _transportCharges As String + + Private _countryOfExport As String + + Private _requestedProcedure As String + + Private _previousProcedure As String + + Private _additionalProcedure As String + + Private _supplementaryUnits As String + + Private _statisticalValue As String + + Private _currencyStatisticalValue As String + + Private _previousDocument As List(Of PreviousDocumentGoodsItemEGType) + + Private _packaging As List(Of PackagingEGType) + + Private _outwardProcessing As OutwardProcessingGoodsItemEGType + + Private _supportingDocument As List(Of SupportingDocumentGoodsItemEGType) + + Private _additionalReference As List(Of AdditionalReferenceGoodsItemEGType) + + Private _consignee As AddressEGType + + Private _consignor As AddressEGType + + Private _procedureTransference As ProcedureTransferenceEGType + + Private _natureOfTransaction As String + + Private _applicationInternalData As ApplicationInternalDataType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._applicationInternalData = New ApplicationInternalDataType() + Me._procedureTransference = New ProcedureTransferenceEGType() + Me._consignor = New AddressEGType() + Me._consignee = New AddressEGType() + Me._additionalReference = New List(Of AdditionalReferenceGoodsItemEGType)() + Me._supportingDocument = New List(Of SupportingDocumentGoodsItemEGType)() + Me._outwardProcessing = New OutwardProcessingGoodsItemEGType() + Me._packaging = New List(Of PackagingEGType)() + Me._previousDocument = New List(Of PreviousDocumentGoodsItemEGType)() + Me._uNNumber = New List(Of String)() + Me._additionalSupplyChainActor = New List(Of AdditionalSupplyChainActorEGType)() + Me._authorisation = New List(Of AuthorisationGoodsItemEGType)() + Me._additionalInformation = New List(Of AdditionalInformationEGType)() + Me._taricAdditionalCode = New List(Of String)() + End Sub + + + Public Property DeclarationGoodsItemNumber() As String + Get + Return Me._declarationGoodsItemNumber + End Get + Set + Me._declarationGoodsItemNumber = Value + End Set + End Property + + + Public Property ArticleNumber() As String + Get + Return Me._articleNumber + End Get + Set + Me._articleNumber = Value + End Set + End Property + + + Public Property CommodityCode() As String + Get + Return Me._commodityCode + End Get + Set + Me._commodityCode = Value + End Set + End Property + + + Public Property TaricAdditionalCode() As List(Of String) + Get + Return Me._taricAdditionalCode + End Get + Set + Me._taricAdditionalCode = Value + End Set + End Property + + + Public Property DescriptionOfGoods() As String + Get + Return Me._descriptionOfGoods + End Get + Set + Me._descriptionOfGoods = Value + End Set + End Property + + + Public Property CusCode() As String + Get + Return Me._cusCode + End Get + Set + Me._cusCode = Value + End Set + End Property + + + Public Property RegistrationNumberExternal() As String + Get + Return Me._registrationNumberExternal + End Get + Set + Me._registrationNumberExternal = Value + End Set + End Property + + + Public Property AdditionalInformation() As List(Of AdditionalInformationEGType) + Get + Return Me._additionalInformation + End Get + Set + Me._additionalInformation = Value + End Set + End Property + + + Public Property ReferenceNumberUCR() As String + Get + Return Me._referenceNumberUCR + End Get + Set + Me._referenceNumberUCR = Value + End Set + End Property + + + Public Property Authorisation() As List(Of AuthorisationGoodsItemEGType) + Get + Return Me._authorisation + End Get + Set + Me._authorisation = Value + End Set + End Property + + + Public Property AdditionalSupplyChainActor() As List(Of AdditionalSupplyChainActorEGType) + Get + Return Me._additionalSupplyChainActor + End Get + Set + Me._additionalSupplyChainActor = Value + End Set + End Property + + + Public Property RegionOfDispatch() As String + Get + Return Me._regionOfDispatch + End Get + Set + Me._regionOfDispatch = Value + End Set + End Property + + + Public Property CountryOfOrigin() As String + Get + Return Me._countryOfOrigin + End Get + Set + Me._countryOfOrigin = Value + End Set + End Property + + + Public Property NetMass() As String + Get + Return Me._netMass + End Get + Set + Me._netMass = Value + End Set + End Property + + + Public Property GrossMass() As String + Get + Return Me._grossMass + End Get + Set + Me._grossMass = Value + End Set + End Property + + + Public Property UNNumber() As List(Of String) + Get + Return Me._uNNumber + End Get + Set + Me._uNNumber = Value + End Set + End Property + + + Public Property TransportCharges() As String + Get + Return Me._transportCharges + End Get + Set + Me._transportCharges = Value + End Set + End Property + + + Public Property CountryOfExport() As String + Get + Return Me._countryOfExport + End Get + Set + Me._countryOfExport = Value + End Set + End Property + + + Public Property RequestedProcedure() As String + Get + Return Me._requestedProcedure + End Get + Set + Me._requestedProcedure = Value + End Set + End Property + + + Public Property PreviousProcedure() As String + Get + Return Me._previousProcedure + End Get + Set + Me._previousProcedure = Value + End Set + End Property + + + Public Property AdditionalProcedure() As String + Get + Return Me._additionalProcedure + End Get + Set + Me._additionalProcedure = Value + End Set + End Property + + + Public Property SupplementaryUnits() As String + Get + Return Me._supplementaryUnits + End Get + Set + Me._supplementaryUnits = Value + End Set + End Property + + + Public Property StatisticalValue() As String + Get + Return Me._statisticalValue + End Get + Set + Me._statisticalValue = Value + End Set + End Property + + + Public Property CurrencyStatisticalValue() As String + Get + Return Me._currencyStatisticalValue + End Get + Set + Me._currencyStatisticalValue = Value + End Set + End Property + + + Public Property PreviousDocument() As List(Of PreviousDocumentGoodsItemEGType) + Get + Return Me._previousDocument + End Get + Set + Me._previousDocument = Value + End Set + End Property + + + Public Property Packaging() As List(Of PackagingEGType) + Get + Return Me._packaging + End Get + Set + Me._packaging = Value + End Set + End Property + + + Public Property OutwardProcessing() As OutwardProcessingGoodsItemEGType + Get + Return Me._outwardProcessing + End Get + Set + Me._outwardProcessing = Value + End Set + End Property + + + Public Property SupportingDocument() As List(Of SupportingDocumentGoodsItemEGType) + Get + Return Me._supportingDocument + End Get + Set + Me._supportingDocument = Value + End Set + End Property + + + Public Property AdditionalReference() As List(Of AdditionalReferenceGoodsItemEGType) + Get + Return Me._additionalReference + End Get + Set + Me._additionalReference = Value + End Set + End Property + + + Public Property Consignee() As AddressEGType + Get + Return Me._consignee + End Get + Set + Me._consignee = Value + End Set + End Property + + + Public Property Consignor() As AddressEGType + Get + Return Me._consignor + End Get + Set + Me._consignor = Value + End Set + End Property + + + Public Property ProcedureTransference() As ProcedureTransferenceEGType + Get + Return Me._procedureTransference + End Get + Set + Me._procedureTransference = Value + End Set + End Property + + + Public Property NatureOfTransaction() As String + Get + Return Me._natureOfTransaction + End Get + Set + Me._natureOfTransaction = Value + End Set + End Property + + + Public Property ApplicationInternalData() As ApplicationInternalDataType + Get + Return Me._applicationInternalData + End Get + Set + Me._applicationInternalData = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(GoodsItemEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize GoodsItemEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes GoodsItemEGType object + ''' + ''' string to deserialize + ''' Output GoodsItemEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GoodsItemEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, GoodsItemEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GoodsItemEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As GoodsItemEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), GoodsItemEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As GoodsItemEGType + Return CType(SerializerXml.Deserialize(s), GoodsItemEGType) + End Function +#End Region + + ''' + ''' Serializes current GoodsItemEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an GoodsItemEGType object + ''' + ''' File to load and deserialize + ''' Output GoodsItemEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GoodsItemEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, GoodsItemEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GoodsItemEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As GoodsItemEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AdditionalInformationEGType + +#Region "Private fields" + Private _code As String + + Private _text As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Code() As String + Get + Return Me._code + End Get + Set + Me._code = Value + End Set + End Property + + + Public Property Text() As String + Get + Return Me._text + End Get + Set + Me._text = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdditionalInformationEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AdditionalInformationEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AdditionalInformationEGType object + ''' + ''' string to deserialize + ''' Output AdditionalInformationEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalInformationEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalInformationEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalInformationEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AdditionalInformationEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalInformationEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdditionalInformationEGType + Return CType(SerializerXml.Deserialize(s), AdditionalInformationEGType) + End Function +#End Region + + ''' + ''' Serializes current AdditionalInformationEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AdditionalInformationEGType object + ''' + ''' File to load and deserialize + ''' Output AdditionalInformationEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalInformationEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalInformationEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalInformationEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdditionalInformationEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AuthorisationGoodsItemEGType + Inherits AuthorisationEGType + +#Region "Private fields" + Private _holderOfAuthorisation As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property HolderOfAuthorisation() As String + Get + Return Me._holderOfAuthorisation + End Get + Set + Me._holderOfAuthorisation = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AuthorisationGoodsItemEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AuthorisationGoodsItemEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AuthorisationGoodsItemEGType object + ''' + ''' string to deserialize + ''' Output AuthorisationGoodsItemEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AuthorisationGoodsItemEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AuthorisationGoodsItemEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AuthorisationGoodsItemEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AuthorisationGoodsItemEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AuthorisationGoodsItemEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AuthorisationGoodsItemEGType + Return CType(SerializerXml.Deserialize(s), AuthorisationGoodsItemEGType) + End Function +#End Region + + ''' + ''' Serializes current AuthorisationGoodsItemEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AuthorisationGoodsItemEGType object + ''' + ''' File to load and deserialize + ''' Output AuthorisationGoodsItemEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AuthorisationGoodsItemEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AuthorisationGoodsItemEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AuthorisationGoodsItemEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AuthorisationGoodsItemEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AuthorisationEGType + +#Region "Private fields" + Private _type As String + + Private _referenceNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Type() As String + Get + Return Me._type + End Get + Set + Me._type = Value + End Set + End Property + + + Public Property ReferenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AuthorisationEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AuthorisationEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AuthorisationEGType object + ''' + ''' string to deserialize + ''' Output AuthorisationEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AuthorisationEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AuthorisationEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AuthorisationEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AuthorisationEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AuthorisationEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AuthorisationEGType + Return CType(SerializerXml.Deserialize(s), AuthorisationEGType) + End Function +#End Region + + ''' + ''' Serializes current AuthorisationEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AuthorisationEGType object + ''' + ''' File to load and deserialize + ''' Output AuthorisationEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AuthorisationEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AuthorisationEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AuthorisationEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AuthorisationEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AdditionalSupplyChainActorEGType + +#Region "Private fields" + Private _role As String + + Private _identificationNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Role() As String + Get + Return Me._role + End Get + Set + Me._role = Value + End Set + End Property + + + Public Property IdentificationNumber() As String + Get + Return Me._identificationNumber + End Get + Set + Me._identificationNumber = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdditionalSupplyChainActorEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AdditionalSupplyChainActorEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AdditionalSupplyChainActorEGType object + ''' + ''' string to deserialize + ''' Output AdditionalSupplyChainActorEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalSupplyChainActorEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalSupplyChainActorEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalSupplyChainActorEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AdditionalSupplyChainActorEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalSupplyChainActorEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdditionalSupplyChainActorEGType + Return CType(SerializerXml.Deserialize(s), AdditionalSupplyChainActorEGType) + End Function +#End Region + + ''' + ''' Serializes current AdditionalSupplyChainActorEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AdditionalSupplyChainActorEGType object + ''' + ''' File to load and deserialize + ''' Output AdditionalSupplyChainActorEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalSupplyChainActorEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalSupplyChainActorEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalSupplyChainActorEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdditionalSupplyChainActorEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AdditionalReferenceGoodsItemEGType + Inherits AdditionalReferenceEGType + +#Region "Private fields" + Private _detail As String + + Private _currency As String + + Private _amount As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Detail() As String + Get + Return Me._detail + End Get + Set + Me._detail = Value + End Set + End Property + + + Public Property Currency() As String + Get + Return Me._currency + End Get + Set + Me._currency = Value + End Set + End Property + + + Public Property Amount() As String + Get + Return Me._amount + End Get + Set + Me._amount = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdditionalReferenceGoodsItemEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AdditionalReferenceGoodsItemEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AdditionalReferenceGoodsItemEGType object + ''' + ''' string to deserialize + ''' Output AdditionalReferenceGoodsItemEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalReferenceGoodsItemEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalReferenceGoodsItemEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalReferenceGoodsItemEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AdditionalReferenceGoodsItemEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalReferenceGoodsItemEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdditionalReferenceGoodsItemEGType + Return CType(SerializerXml.Deserialize(s), AdditionalReferenceGoodsItemEGType) + End Function +#End Region + + ''' + ''' Serializes current AdditionalReferenceGoodsItemEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AdditionalReferenceGoodsItemEGType object + ''' + ''' File to load and deserialize + ''' Output AdditionalReferenceGoodsItemEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalReferenceGoodsItemEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalReferenceGoodsItemEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalReferenceGoodsItemEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdditionalReferenceGoodsItemEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AdditionalReferenceEGType + +#Region "Private fields" + Private _type As String + + Private _qualifier As String + + Private _referenceNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Type() As String + Get + Return Me._type + End Get + Set + Me._type = Value + End Set + End Property + + + Public Property Qualifier() As String + Get + Return Me._qualifier + End Get + Set + Me._qualifier = Value + End Set + End Property + + + Public Property ReferenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdditionalReferenceEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AdditionalReferenceEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AdditionalReferenceEGType object + ''' + ''' string to deserialize + ''' Output AdditionalReferenceEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalReferenceEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalReferenceEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalReferenceEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AdditionalReferenceEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalReferenceEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdditionalReferenceEGType + Return CType(SerializerXml.Deserialize(s), AdditionalReferenceEGType) + End Function +#End Region + + ''' + ''' Serializes current AdditionalReferenceEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AdditionalReferenceEGType object + ''' + ''' File to load and deserialize + ''' Output AdditionalReferenceEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalReferenceEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalReferenceEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalReferenceEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdditionalReferenceEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AddressEGType + +#Region "Private fields" + Private _addressCode As String + + Private _identificationNumber As String + + Private _subsidiaryNumber As String + + Private _name As String + + Private _streetAndNumber As String + + Private _city As String + + Private _postcode As String + + Private _country As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property AddressCode() As String + Get + Return Me._addressCode + End Get + Set + Me._addressCode = Value + End Set + End Property + + + Public Property IdentificationNumber() As String + Get + Return Me._identificationNumber + End Get + Set + Me._identificationNumber = Value + End Set + End Property + + + Public Property SubsidiaryNumber() As String + Get + Return Me._subsidiaryNumber + End Get + Set + Me._subsidiaryNumber = Value + End Set + End Property + + + Public Property Name() As String + Get + Return Me._name + End Get + Set + Me._name = Value + End Set + End Property + + + Public Property StreetAndNumber() As String + Get + Return Me._streetAndNumber + End Get + Set + Me._streetAndNumber = Value + End Set + End Property + + + Public Property City() As String + Get + Return Me._city + End Get + Set + Me._city = Value + End Set + End Property + + + Public Property Postcode() As String + Get + Return Me._postcode + End Get + Set + Me._postcode = Value + End Set + End Property + + + Public Property Country() As String + Get + Return Me._country + End Get + Set + Me._country = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AddressEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AddressEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AddressEGType object + ''' + ''' string to deserialize + ''' Output AddressEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AddressEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AddressEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AddressEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AddressEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AddressEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AddressEGType + Return CType(SerializerXml.Deserialize(s), AddressEGType) + End Function +#End Region + + ''' + ''' Serializes current AddressEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AddressEGType object + ''' + ''' File to load and deserialize + ''' Output AddressEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AddressEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AddressEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AddressEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AddressEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DeclarantEGType + Inherits AddressEGType + +#Region "Private fields" + Private _contactPerson As ContactPersonEGType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contactPerson = New ContactPersonEGType() + End Sub + + + Public Property ContactPerson() As ContactPersonEGType + Get + Return Me._contactPerson + End Get + Set + Me._contactPerson = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DeclarantEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DeclarantEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DeclarantEGType object + ''' + ''' string to deserialize + ''' Output DeclarantEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DeclarantEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DeclarantEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DeclarantEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DeclarantEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DeclarantEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DeclarantEGType + Return CType(SerializerXml.Deserialize(s), DeclarantEGType) + End Function +#End Region + + ''' + ''' Serializes current DeclarantEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DeclarantEGType object + ''' + ''' File to load and deserialize + ''' Output DeclarantEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DeclarantEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DeclarantEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DeclarantEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DeclarantEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ContactPersonEGType + +#Region "Private fields" + Private _name As String + + Private _phoneNumber As String + + Private _eMailAddress As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Name() As String + Get + Return Me._name + End Get + Set + Me._name = Value + End Set + End Property + + + Public Property PhoneNumber() As String + Get + Return Me._phoneNumber + End Get + Set + Me._phoneNumber = Value + End Set + End Property + + + Public Property EMailAddress() As String + Get + Return Me._eMailAddress + End Get + Set + Me._eMailAddress = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ContactPersonEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ContactPersonEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ContactPersonEGType object + ''' + ''' string to deserialize + ''' Output ContactPersonEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ContactPersonEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ContactPersonEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ContactPersonEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ContactPersonEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ContactPersonEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ContactPersonEGType + Return CType(SerializerXml.Deserialize(s), ContactPersonEGType) + End Function +#End Region + + ''' + ''' Serializes current ContactPersonEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ContactPersonEGType object + ''' + ''' File to load and deserialize + ''' Output ContactPersonEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ContactPersonEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ContactPersonEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ContactPersonEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ContactPersonEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ApplicationInternalDataType + +#Region "Private fields" + Private _additionalDetails As List(Of ApplicationInternalDataAdditionalDetailsDataType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._additionalDetails = New List(Of ApplicationInternalDataAdditionalDetailsDataType)() + End Sub + + + Public Property AdditionalDetails() As List(Of ApplicationInternalDataAdditionalDetailsDataType) + Get + Return Me._additionalDetails + End Get + Set + Me._additionalDetails = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ApplicationInternalDataType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ApplicationInternalDataType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ApplicationInternalDataType object + ''' + ''' string to deserialize + ''' Output ApplicationInternalDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ApplicationInternalDataType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ApplicationInternalDataType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ApplicationInternalDataType + Return CType(SerializerXml.Deserialize(s), ApplicationInternalDataType) + End Function +#End Region + + ''' + ''' Serializes current ApplicationInternalDataType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ApplicationInternalDataType object + ''' + ''' File to load and deserialize + ''' Output ApplicationInternalDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ApplicationInternalDataType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ApplicationInternalDataAdditionalDetailsDataType + +#Region "Private fields" + Private _key As String + + Private _value As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Key() As String + Get + Return Me._key + End Get + Set + Me._key = Value + End Set + End Property + + + Public Property Value() As String + Get + Return Me._value + End Get + Set + Me._value = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ApplicationInternalDataAdditionalDetailsDataType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' string to deserialize + ''' Output ApplicationInternalDataAdditionalDetailsDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsDataType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ApplicationInternalDataAdditionalDetailsDataType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ApplicationInternalDataAdditionalDetailsDataType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ApplicationInternalDataAdditionalDetailsDataType + Return CType(SerializerXml.Deserialize(s), ApplicationInternalDataAdditionalDetailsDataType) + End Function +#End Region + + ''' + ''' Serializes current ApplicationInternalDataAdditionalDetailsDataType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' File to load and deserialize + ''' Output ApplicationInternalDataAdditionalDetailsDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsDataType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ApplicationInternalDataAdditionalDetailsDataType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class SupportingDocumentEGType + +#Region "Private fields" + Private _type As String + + Private _qualifier As String + + Private _referenceNumber As String + + Private _documentLineItemNumber As String + + Private _issuingAuthorityName As String + + Private _issuingDate As Date + + Private _validityDate As Date + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Type() As String + Get + Return Me._type + End Get + Set + Me._type = Value + End Set + End Property + + + Public Property Qualifier() As String + Get + Return Me._qualifier + End Get + Set + Me._qualifier = Value + End Set + End Property + + + Public Property ReferenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + + Public Property DocumentLineItemNumber() As String + Get + Return Me._documentLineItemNumber + End Get + Set + Me._documentLineItemNumber = Value + End Set + End Property + + + Public Property IssuingAuthorityName() As String + Get + Return Me._issuingAuthorityName + End Get + Set + Me._issuingAuthorityName = Value + End Set + End Property + + + Public Property IssuingDate() As Date + Get + Return Me._issuingDate + End Get + Set + Me._issuingDate = Value + End Set + End Property + + + Public Property ValidityDate() As Date + Get + Return Me._validityDate + End Get + Set + Me._validityDate = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(SupportingDocumentEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize SupportingDocumentEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes SupportingDocumentEGType object + ''' + ''' string to deserialize + ''' Output SupportingDocumentEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SupportingDocumentEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SupportingDocumentEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SupportingDocumentEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As SupportingDocumentEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), SupportingDocumentEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As SupportingDocumentEGType + Return CType(SerializerXml.Deserialize(s), SupportingDocumentEGType) + End Function +#End Region + + ''' + ''' Serializes current SupportingDocumentEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an SupportingDocumentEGType object + ''' + ''' File to load and deserialize + ''' Output SupportingDocumentEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SupportingDocumentEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SupportingDocumentEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SupportingDocumentEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As SupportingDocumentEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class PreviousDocumentEGType + +#Region "Private fields" + Private _type As String + + Private _qualifier As String + + Private _referenceNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Type() As String + Get + Return Me._type + End Get + Set + Me._type = Value + End Set + End Property + + + Public Property Qualifier() As String + Get + Return Me._qualifier + End Get + Set + Me._qualifier = Value + End Set + End Property + + + Public Property ReferenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PreviousDocumentEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize PreviousDocumentEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes PreviousDocumentEGType object + ''' + ''' string to deserialize + ''' Output PreviousDocumentEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PreviousDocumentEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PreviousDocumentEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PreviousDocumentEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As PreviousDocumentEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PreviousDocumentEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As PreviousDocumentEGType + Return CType(SerializerXml.Deserialize(s), PreviousDocumentEGType) + End Function +#End Region + + ''' + ''' Serializes current PreviousDocumentEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an PreviousDocumentEGType object + ''' + ''' File to load and deserialize + ''' Output PreviousDocumentEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PreviousDocumentEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PreviousDocumentEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PreviousDocumentEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PreviousDocumentEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransportDocumentEGType + +#Region "Private fields" + Private _type As String + + Private _qualifier As String + + Private _referenceNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Type() As String + Get + Return Me._type + End Get + Set + Me._type = Value + End Set + End Property + + + Public Property Qualifier() As String + Get + Return Me._qualifier + End Get + Set + Me._qualifier = Value + End Set + End Property + + + Public Property ReferenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransportDocumentEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransportDocumentEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransportDocumentEGType object + ''' + ''' string to deserialize + ''' Output TransportDocumentEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransportDocumentEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransportDocumentEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransportDocumentEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransportDocumentEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransportDocumentEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransportDocumentEGType + Return CType(SerializerXml.Deserialize(s), TransportDocumentEGType) + End Function +#End Region + + ''' + ''' Serializes current TransportDocumentEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransportDocumentEGType object + ''' + ''' File to load and deserialize + ''' Output TransportDocumentEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransportDocumentEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransportDocumentEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransportDocumentEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransportDocumentEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DeliveryTermsEGType + +#Region "Private fields" + Private _incotermCode As String + + Private _uNLocode As String + + Private _text As String + + Private _location As String + + Private _country As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property IncotermCode() As String + Get + Return Me._incotermCode + End Get + Set + Me._incotermCode = Value + End Set + End Property + + + Public Property UNLocode() As String + Get + Return Me._uNLocode + End Get + Set + Me._uNLocode = Value + End Set + End Property + + + Public Property Text() As String + Get + Return Me._text + End Get + Set + Me._text = Value + End Set + End Property + + + Public Property Location() As String + Get + Return Me._location + End Get + Set + Me._location = Value + End Set + End Property + + + Public Property Country() As String + Get + Return Me._country + End Get + Set + Me._country = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DeliveryTermsEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DeliveryTermsEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DeliveryTermsEGType object + ''' + ''' string to deserialize + ''' Output DeliveryTermsEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DeliveryTermsEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DeliveryTermsEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DeliveryTermsEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DeliveryTermsEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DeliveryTermsEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DeliveryTermsEGType + Return CType(SerializerXml.Deserialize(s), DeliveryTermsEGType) + End Function +#End Region + + ''' + ''' Serializes current DeliveryTermsEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DeliveryTermsEGType object + ''' + ''' File to load and deserialize + ''' Output DeliveryTermsEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DeliveryTermsEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DeliveryTermsEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DeliveryTermsEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DeliveryTermsEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ProductEGType + +#Region "Private fields" + Private _commodityCode As String + + Private _descriptionOfGoods As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property CommodityCode() As String + Get + Return Me._commodityCode + End Get + Set + Me._commodityCode = Value + End Set + End Property + + + Public Property DescriptionOfGoods() As String + Get + Return Me._descriptionOfGoods + End Get + Set + Me._descriptionOfGoods = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ProductEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ProductEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ProductEGType object + ''' + ''' string to deserialize + ''' Output ProductEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ProductEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ProductEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ProductEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ProductEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ProductEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ProductEGType + Return CType(SerializerXml.Deserialize(s), ProductEGType) + End Function +#End Region + + ''' + ''' Serializes current ProductEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ProductEGType object + ''' + ''' File to load and deserialize + ''' Output ProductEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ProductEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ProductEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ProductEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ProductEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class IdentificationMeansEGType + +#Region "Private fields" + Private _type As String + + Private _description As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Type() As String + Get + Return Me._type + End Get + Set + Me._type = Value + End Set + End Property + + + Public Property Description() As String + Get + Return Me._description + End Get + Set + Me._description = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(IdentificationMeansEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize IdentificationMeansEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes IdentificationMeansEGType object + ''' + ''' string to deserialize + ''' Output IdentificationMeansEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As IdentificationMeansEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, IdentificationMeansEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As IdentificationMeansEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As IdentificationMeansEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), IdentificationMeansEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As IdentificationMeansEGType + Return CType(SerializerXml.Deserialize(s), IdentificationMeansEGType) + End Function +#End Region + + ''' + ''' Serializes current IdentificationMeansEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an IdentificationMeansEGType object + ''' + ''' File to load and deserialize + ''' Output IdentificationMeansEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As IdentificationMeansEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, IdentificationMeansEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As IdentificationMeansEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As IdentificationMeansEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class OutwardProcessingEGType + +#Region "Private fields" + Private _countryOfReimport As List(Of String) + + Private _identificationMeans As List(Of IdentificationMeansEGType) + + Private _product As List(Of ProductEGType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._product = New List(Of ProductEGType)() + Me._identificationMeans = New List(Of IdentificationMeansEGType)() + Me._countryOfReimport = New List(Of String)() + End Sub + + + Public Property CountryOfReimport() As List(Of String) + Get + Return Me._countryOfReimport + End Get + Set + Me._countryOfReimport = Value + End Set + End Property + + + Public Property IdentificationMeans() As List(Of IdentificationMeansEGType) + Get + Return Me._identificationMeans + End Get + Set + Me._identificationMeans = Value + End Set + End Property + + + Public Property Product() As List(Of ProductEGType) + Get + Return Me._product + End Get + Set + Me._product = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(OutwardProcessingEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize OutwardProcessingEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes OutwardProcessingEGType object + ''' + ''' string to deserialize + ''' Output OutwardProcessingEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As OutwardProcessingEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, OutwardProcessingEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As OutwardProcessingEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As OutwardProcessingEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), OutwardProcessingEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As OutwardProcessingEGType + Return CType(SerializerXml.Deserialize(s), OutwardProcessingEGType) + End Function +#End Region + + ''' + ''' Serializes current OutwardProcessingEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an OutwardProcessingEGType object + ''' + ''' File to load and deserialize + ''' Output OutwardProcessingEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As OutwardProcessingEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, OutwardProcessingEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As OutwardProcessingEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As OutwardProcessingEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class CarrierEGType + +#Region "Private fields" + Private _addressCode As String + + Private _identificationNumber As String + + Private _subsidiaryNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property AddressCode() As String + Get + Return Me._addressCode + End Get + Set + Me._addressCode = Value + End Set + End Property + + + Public Property IdentificationNumber() As String + Get + Return Me._identificationNumber + End Get + Set + Me._identificationNumber = Value + End Set + End Property + + + Public Property SubsidiaryNumber() As String + Get + Return Me._subsidiaryNumber + End Get + Set + Me._subsidiaryNumber = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(CarrierEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize CarrierEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes CarrierEGType object + ''' + ''' string to deserialize + ''' Output CarrierEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CarrierEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, CarrierEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CarrierEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As CarrierEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CarrierEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As CarrierEGType + Return CType(SerializerXml.Deserialize(s), CarrierEGType) + End Function +#End Region + + ''' + ''' Serializes current CarrierEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an CarrierEGType object + ''' + ''' File to load and deserialize + ''' Output CarrierEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CarrierEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, CarrierEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CarrierEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As CarrierEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class RepresentativeEGType + +#Region "Private fields" + Private _addressCode As String + + Private _identificationNumber As String + + Private _subsidiaryNumber As String + + Private _contactPerson As ContactPersonEGType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contactPerson = New ContactPersonEGType() + End Sub + + + Public Property AddressCode() As String + Get + Return Me._addressCode + End Get + Set + Me._addressCode = Value + End Set + End Property + + + Public Property IdentificationNumber() As String + Get + Return Me._identificationNumber + End Get + Set + Me._identificationNumber = Value + End Set + End Property + + + Public Property SubsidiaryNumber() As String + Get + Return Me._subsidiaryNumber + End Get + Set + Me._subsidiaryNumber = Value + End Set + End Property + + + Public Property ContactPerson() As ContactPersonEGType + Get + Return Me._contactPerson + End Get + Set + Me._contactPerson = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(RepresentativeEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize RepresentativeEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes RepresentativeEGType object + ''' + ''' string to deserialize + ''' Output RepresentativeEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As RepresentativeEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, RepresentativeEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As RepresentativeEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As RepresentativeEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), RepresentativeEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As RepresentativeEGType + Return CType(SerializerXml.Deserialize(s), RepresentativeEGType) + End Function +#End Region + + ''' + ''' Serializes current RepresentativeEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an RepresentativeEGType object + ''' + ''' File to load and deserialize + ''' Output RepresentativeEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As RepresentativeEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, RepresentativeEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As RepresentativeEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As RepresentativeEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransportEquipmentEGType + +#Region "Private fields" + Private _numberOfSeals As String + + Private _seal As List(Of String) + + Private _containerIdentificationNumber As String + + Private _goodsReference As List(Of String) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsReference = New List(Of String)() + Me._seal = New List(Of String)() + End Sub + + + Public Property NumberOfSeals() As String + Get + Return Me._numberOfSeals + End Get + Set + Me._numberOfSeals = Value + End Set + End Property + + + Public Property Seal() As List(Of String) + Get + Return Me._seal + End Get + Set + Me._seal = Value + End Set + End Property + + + Public Property ContainerIdentificationNumber() As String + Get + Return Me._containerIdentificationNumber + End Get + Set + Me._containerIdentificationNumber = Value + End Set + End Property + + + Public Property GoodsReference() As List(Of String) + Get + Return Me._goodsReference + End Get + Set + Me._goodsReference = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransportEquipmentEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransportEquipmentEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransportEquipmentEGType object + ''' + ''' string to deserialize + ''' Output TransportEquipmentEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransportEquipmentEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransportEquipmentEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransportEquipmentEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransportEquipmentEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransportEquipmentEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransportEquipmentEGType + Return CType(SerializerXml.Deserialize(s), TransportEquipmentEGType) + End Function +#End Region + + ''' + ''' Serializes current TransportEquipmentEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransportEquipmentEGType object + ''' + ''' File to load and deserialize + ''' Output TransportEquipmentEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransportEquipmentEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransportEquipmentEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransportEquipmentEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransportEquipmentEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class LocationOfGoodsAddressEGType + +#Region "Private fields" + Private _streetAndNumber As String + + Private _postcode As String + + Private _city As String + + Private _country As String + + Private _complementOfInformation As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property StreetAndNumber() As String + Get + Return Me._streetAndNumber + End Get + Set + Me._streetAndNumber = Value + End Set + End Property + + + Public Property Postcode() As String + Get + Return Me._postcode + End Get + Set + Me._postcode = Value + End Set + End Property + + + Public Property City() As String + Get + Return Me._city + End Get + Set + Me._city = Value + End Set + End Property + + + Public Property Country() As String + Get + Return Me._country + End Get + Set + Me._country = Value + End Set + End Property + + + Public Property ComplementOfInformation() As String + Get + Return Me._complementOfInformation + End Get + Set + Me._complementOfInformation = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(LocationOfGoodsAddressEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize LocationOfGoodsAddressEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes LocationOfGoodsAddressEGType object + ''' + ''' string to deserialize + ''' Output LocationOfGoodsAddressEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As LocationOfGoodsAddressEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, LocationOfGoodsAddressEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As LocationOfGoodsAddressEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As LocationOfGoodsAddressEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), LocationOfGoodsAddressEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As LocationOfGoodsAddressEGType + Return CType(SerializerXml.Deserialize(s), LocationOfGoodsAddressEGType) + End Function +#End Region + + ''' + ''' Serializes current LocationOfGoodsAddressEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an LocationOfGoodsAddressEGType object + ''' + ''' File to load and deserialize + ''' Output LocationOfGoodsAddressEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As LocationOfGoodsAddressEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, LocationOfGoodsAddressEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As LocationOfGoodsAddressEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As LocationOfGoodsAddressEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class LocationOfGoodsEGType + +#Region "Private fields" + Private _typeOfLocation As String + + Private _qualifierOfIdentification As String + + Private _additionalIdentifier As String + + Private _authorisationNumber As String + + Private _uNLocode As String + + Private _latitude As String + + Private _longitude As String + + Private _address As LocationOfGoodsAddressEGType + + Private _contactPerson As ContactPersonEGType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contactPerson = New ContactPersonEGType() + Me._address = New LocationOfGoodsAddressEGType() + End Sub + + + Public Property TypeOfLocation() As String + Get + Return Me._typeOfLocation + End Get + Set + Me._typeOfLocation = Value + End Set + End Property + + + Public Property QualifierOfIdentification() As String + Get + Return Me._qualifierOfIdentification + End Get + Set + Me._qualifierOfIdentification = Value + End Set + End Property + + + Public Property AdditionalIdentifier() As String + Get + Return Me._additionalIdentifier + End Get + Set + Me._additionalIdentifier = Value + End Set + End Property + + + Public Property AuthorisationNumber() As String + Get + Return Me._authorisationNumber + End Get + Set + Me._authorisationNumber = Value + End Set + End Property + + + Public Property UNLocode() As String + Get + Return Me._uNLocode + End Get + Set + Me._uNLocode = Value + End Set + End Property + + + Public Property Latitude() As String + Get + Return Me._latitude + End Get + Set + Me._latitude = Value + End Set + End Property + + + Public Property Longitude() As String + Get + Return Me._longitude + End Get + Set + Me._longitude = Value + End Set + End Property + + + Public Property Address() As LocationOfGoodsAddressEGType + Get + Return Me._address + End Get + Set + Me._address = Value + End Set + End Property + + + Public Property ContactPerson() As ContactPersonEGType + Get + Return Me._contactPerson + End Get + Set + Me._contactPerson = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(LocationOfGoodsEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize LocationOfGoodsEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes LocationOfGoodsEGType object + ''' + ''' string to deserialize + ''' Output LocationOfGoodsEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As LocationOfGoodsEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, LocationOfGoodsEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As LocationOfGoodsEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As LocationOfGoodsEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), LocationOfGoodsEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As LocationOfGoodsEGType + Return CType(SerializerXml.Deserialize(s), LocationOfGoodsEGType) + End Function +#End Region + + ''' + ''' Serializes current LocationOfGoodsEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an LocationOfGoodsEGType object + ''' + ''' File to load and deserialize + ''' Output LocationOfGoodsEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As LocationOfGoodsEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, LocationOfGoodsEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As LocationOfGoodsEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As LocationOfGoodsEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ActiveBorderTransportMeansEGType + +#Region "Private fields" + Private _typeOfIdentification As String + + Private _identificationNumber As String + + Private _nationality As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property TypeOfIdentification() As String + Get + Return Me._typeOfIdentification + End Get + Set + Me._typeOfIdentification = Value + End Set + End Property + + + Public Property IdentificationNumber() As String + Get + Return Me._identificationNumber + End Get + Set + Me._identificationNumber = Value + End Set + End Property + + + Public Property Nationality() As String + Get + Return Me._nationality + End Get + Set + Me._nationality = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ActiveBorderTransportMeansEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ActiveBorderTransportMeansEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ActiveBorderTransportMeansEGType object + ''' + ''' string to deserialize + ''' Output ActiveBorderTransportMeansEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ActiveBorderTransportMeansEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ActiveBorderTransportMeansEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ActiveBorderTransportMeansEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ActiveBorderTransportMeansEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ActiveBorderTransportMeansEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ActiveBorderTransportMeansEGType + Return CType(SerializerXml.Deserialize(s), ActiveBorderTransportMeansEGType) + End Function +#End Region + + ''' + ''' Serializes current ActiveBorderTransportMeansEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ActiveBorderTransportMeansEGType object + ''' + ''' File to load and deserialize + ''' Output ActiveBorderTransportMeansEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ActiveBorderTransportMeansEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ActiveBorderTransportMeansEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ActiveBorderTransportMeansEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ActiveBorderTransportMeansEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DepartureTransportMeansEGType + +#Region "Private fields" + Private _typeOfIdentification As String + + Private _identificationNumber As String + + Private _nationality As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property TypeOfIdentification() As String + Get + Return Me._typeOfIdentification + End Get + Set + Me._typeOfIdentification = Value + End Set + End Property + + + Public Property IdentificationNumber() As String + Get + Return Me._identificationNumber + End Get + Set + Me._identificationNumber = Value + End Set + End Property + + + Public Property Nationality() As String + Get + Return Me._nationality + End Get + Set + Me._nationality = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DepartureTransportMeansEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DepartureTransportMeansEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DepartureTransportMeansEGType object + ''' + ''' string to deserialize + ''' Output DepartureTransportMeansEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DepartureTransportMeansEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DepartureTransportMeansEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DepartureTransportMeansEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DepartureTransportMeansEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DepartureTransportMeansEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DepartureTransportMeansEGType + Return CType(SerializerXml.Deserialize(s), DepartureTransportMeansEGType) + End Function +#End Region + + ''' + ''' Serializes current DepartureTransportMeansEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DepartureTransportMeansEGType object + ''' + ''' File to load and deserialize + ''' Output DepartureTransportMeansEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DepartureTransportMeansEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DepartureTransportMeansEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DepartureTransportMeansEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DepartureTransportMeansEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ExportOperationEGType + +#Region "Private fields" + Private _declarationType As String + + Private _exportDeclarationType As String + + Private _security As String + + Private _countryOfExport As String + + Private _countryOfDestination As String + + Private _additionalSupplyChainActor As List(Of AdditionalSupplyChainActorEGType) + + Private _declarationSubmissionDateAndTime As Date + + Private _exitDate As Date + + Private _decisiveDate As Date + + Private _specificCircumstanceIndicator As String + + Private _transportCharges As String + + Private _containerIndicator As String + + Private _partyConstellation As String + + Private _grossMass As String + + Private _registrationNumberExternal As String + + Private _referenceNumberUCR As String + + Private _authorisation As List(Of AuthorisationEGType) + + Private _inlandModeOfTransport As String + + Private _departureTransportMeans As List(Of DepartureTransportMeansEGType) + + Private _modeOfTransportAtTheBorder As String + + Private _activeBorderTransportMeans As ActiveBorderTransportMeansEGType + + Private _locationOfGoods As LocationOfGoodsEGType + + Private _customsOfficeOfExport As String + + Private _customsOfficeOfExitDeclared As String + + Private _customsOfficeOfSupplement As String + + Private _customsOfficeOfPresentation As String + + Private _customsOfficeOfExitActual As String + + Private _natureOfTransaction As String + + Private _totalAmountInvoiced As String + + Private _invoiceCurrency As String + + Private _additionalInformation As List(Of AdditionalInformationEGType) + + Private _transportEquipment As List(Of TransportEquipmentEGType) + + Private _presentationStartDateAndTime As Date + + Private _loadingEndDateAndTime As Date + + Private _exporter As AddressEGType + + Private _consignee As AddressEGType + + Private _declarant As DeclarantEGType + + Private _representative As RepresentativeEGType + + Private _subContractor As AddressEGType + + Private _contractualPartner As AddressEGType + + Private _carrier As CarrierEGType + + Private _consignor As AddressEGType + + Private _countryOfRoutingOfConsignment As List(Of String) + + Private _outwardProcessing As OutwardProcessingEGType + + Private _aBDEmailAddress As String + + Private _aVMEmailAddress As String + + Private _deliveryTerms As DeliveryTermsEGType + + Private _transportDocument As List(Of TransportDocumentEGType) + + Private _previousDocument As List(Of PreviousDocumentEGType) + + Private _supportingDocument As List(Of SupportingDocumentEGType) + + Private _additionalReference As List(Of AdditionalReferenceEGType) + + Private _applicationInternalData As ApplicationInternalDataType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._applicationInternalData = New ApplicationInternalDataType() + Me._additionalReference = New List(Of AdditionalReferenceEGType)() + Me._supportingDocument = New List(Of SupportingDocumentEGType)() + Me._previousDocument = New List(Of PreviousDocumentEGType)() + Me._transportDocument = New List(Of TransportDocumentEGType)() + Me._deliveryTerms = New DeliveryTermsEGType() + Me._outwardProcessing = New OutwardProcessingEGType() + Me._countryOfRoutingOfConsignment = New List(Of String)() + Me._consignor = New AddressEGType() + Me._carrier = New CarrierEGType() + Me._contractualPartner = New AddressEGType() + Me._subContractor = New AddressEGType() + Me._representative = New RepresentativeEGType() + Me._declarant = New DeclarantEGType() + Me._consignee = New AddressEGType() + Me._exporter = New AddressEGType() + Me._transportEquipment = New List(Of TransportEquipmentEGType)() + Me._additionalInformation = New List(Of AdditionalInformationEGType)() + Me._locationOfGoods = New LocationOfGoodsEGType() + Me._activeBorderTransportMeans = New ActiveBorderTransportMeansEGType() + Me._departureTransportMeans = New List(Of DepartureTransportMeansEGType)() + Me._authorisation = New List(Of AuthorisationEGType)() + Me._additionalSupplyChainActor = New List(Of AdditionalSupplyChainActorEGType)() + End Sub + + + Public Property DeclarationType() As String + Get + Return Me._declarationType + End Get + Set + Me._declarationType = Value + End Set + End Property + + + Public Property ExportDeclarationType() As String + Get + Return Me._exportDeclarationType + End Get + Set + Me._exportDeclarationType = Value + End Set + End Property + + + Public Property Security() As String + Get + Return Me._security + End Get + Set + Me._security = Value + End Set + End Property + + + Public Property CountryOfExport() As String + Get + Return Me._countryOfExport + End Get + Set + Me._countryOfExport = Value + End Set + End Property + + + Public Property CountryOfDestination() As String + Get + Return Me._countryOfDestination + End Get + Set + Me._countryOfDestination = Value + End Set + End Property + + + Public Property AdditionalSupplyChainActor() As List(Of AdditionalSupplyChainActorEGType) + Get + Return Me._additionalSupplyChainActor + End Get + Set + Me._additionalSupplyChainActor = Value + End Set + End Property + + + Public Property DeclarationSubmissionDateAndTime() As Date + Get + Return Me._declarationSubmissionDateAndTime + End Get + Set + Me._declarationSubmissionDateAndTime = Value + End Set + End Property + + + Public Property ExitDate() As Date + Get + Return Me._exitDate + End Get + Set + Me._exitDate = Value + End Set + End Property + + + Public Property DecisiveDate() As Date + Get + Return Me._decisiveDate + End Get + Set + Me._decisiveDate = Value + End Set + End Property + + + Public Property SpecificCircumstanceIndicator() As String + Get + Return Me._specificCircumstanceIndicator + End Get + Set + Me._specificCircumstanceIndicator = Value + End Set + End Property + + + Public Property TransportCharges() As String + Get + Return Me._transportCharges + End Get + Set + Me._transportCharges = Value + End Set + End Property + + + Public Property ContainerIndicator() As String + Get + Return Me._containerIndicator + End Get + Set + Me._containerIndicator = Value + End Set + End Property + + + Public Property PartyConstellation() As String + Get + Return Me._partyConstellation + End Get + Set + Me._partyConstellation = Value + End Set + End Property + + + Public Property GrossMass() As String + Get + Return Me._grossMass + End Get + Set + Me._grossMass = Value + End Set + End Property + + + Public Property RegistrationNumberExternal() As String + Get + Return Me._registrationNumberExternal + End Get + Set + Me._registrationNumberExternal = Value + End Set + End Property + + + Public Property ReferenceNumberUCR() As String + Get + Return Me._referenceNumberUCR + End Get + Set + Me._referenceNumberUCR = Value + End Set + End Property + + + Public Property Authorisation() As List(Of AuthorisationEGType) + Get + Return Me._authorisation + End Get + Set + Me._authorisation = Value + End Set + End Property + + + 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 DepartureTransportMeansEGType) + 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 ActiveBorderTransportMeansEGType + Get + Return Me._activeBorderTransportMeans + End Get + Set + Me._activeBorderTransportMeans = Value + End Set + End Property + + + Public Property LocationOfGoods() As LocationOfGoodsEGType + Get + Return Me._locationOfGoods + End Get + Set + Me._locationOfGoods = Value + End Set + End Property + + + Public Property CustomsOfficeOfExport() As String + Get + Return Me._customsOfficeOfExport + End Get + Set + Me._customsOfficeOfExport = Value + End Set + End Property + + + Public Property CustomsOfficeOfExitDeclared() As String + Get + Return Me._customsOfficeOfExitDeclared + End Get + Set + Me._customsOfficeOfExitDeclared = Value + End Set + End Property + + + Public Property CustomsOfficeOfSupplement() As String + Get + Return Me._customsOfficeOfSupplement + End Get + Set + Me._customsOfficeOfSupplement = Value + End Set + End Property + + + Public Property CustomsOfficeOfPresentation() As String + Get + Return Me._customsOfficeOfPresentation + End Get + Set + Me._customsOfficeOfPresentation = Value + End Set + End Property + + + Public Property CustomsOfficeOfExitActual() As String + Get + Return Me._customsOfficeOfExitActual + End Get + Set + Me._customsOfficeOfExitActual = Value + End Set + End Property + + + Public Property NatureOfTransaction() As String + Get + Return Me._natureOfTransaction + End Get + Set + Me._natureOfTransaction = Value + End Set + End Property + + + Public Property TotalAmountInvoiced() As String + Get + Return Me._totalAmountInvoiced + End Get + Set + Me._totalAmountInvoiced = Value + End Set + End Property + + + Public Property InvoiceCurrency() As String + Get + Return Me._invoiceCurrency + End Get + Set + Me._invoiceCurrency = Value + End Set + End Property + + + Public Property AdditionalInformation() As List(Of AdditionalInformationEGType) + Get + Return Me._additionalInformation + End Get + Set + Me._additionalInformation = Value + End Set + End Property + + + Public Property TransportEquipment() As List(Of TransportEquipmentEGType) + Get + Return Me._transportEquipment + End Get + Set + Me._transportEquipment = Value + End Set + End Property + + + Public Property PresentationStartDateAndTime() As Date + Get + Return Me._presentationStartDateAndTime + End Get + Set + Me._presentationStartDateAndTime = Value + End Set + End Property + + + Public Property LoadingEndDateAndTime() As Date + Get + Return Me._loadingEndDateAndTime + End Get + Set + Me._loadingEndDateAndTime = Value + End Set + End Property + + + Public Property Exporter() As AddressEGType + Get + Return Me._exporter + End Get + Set + Me._exporter = Value + End Set + End Property + + + Public Property Consignee() As AddressEGType + Get + Return Me._consignee + End Get + Set + Me._consignee = Value + End Set + End Property + + + Public Property Declarant() As DeclarantEGType + Get + Return Me._declarant + End Get + Set + Me._declarant = Value + End Set + End Property + + + Public Property Representative() As RepresentativeEGType + Get + Return Me._representative + End Get + Set + Me._representative = Value + End Set + End Property + + + Public Property SubContractor() As AddressEGType + Get + Return Me._subContractor + End Get + Set + Me._subContractor = Value + End Set + End Property + + + Public Property ContractualPartner() As AddressEGType + Get + Return Me._contractualPartner + End Get + Set + Me._contractualPartner = Value + End Set + End Property + + + Public Property Carrier() As CarrierEGType + Get + Return Me._carrier + End Get + Set + Me._carrier = Value + End Set + End Property + + + Public Property Consignor() As AddressEGType + Get + Return Me._consignor + End Get + Set + Me._consignor = Value + End Set + End Property + + + Public Property CountryOfRoutingOfConsignment() As List(Of String) + Get + Return Me._countryOfRoutingOfConsignment + End Get + Set + Me._countryOfRoutingOfConsignment = Value + End Set + End Property + + + Public Property OutwardProcessing() As OutwardProcessingEGType + Get + Return Me._outwardProcessing + End Get + Set + Me._outwardProcessing = Value + End Set + End Property + + + Public Property ABDEmailAddress() As String + Get + Return Me._aBDEmailAddress + End Get + Set + Me._aBDEmailAddress = Value + End Set + End Property + + + Public Property AVMEmailAddress() As String + Get + Return Me._aVMEmailAddress + End Get + Set + Me._aVMEmailAddress = Value + End Set + End Property + + + Public Property DeliveryTerms() As DeliveryTermsEGType + Get + Return Me._deliveryTerms + End Get + Set + Me._deliveryTerms = Value + End Set + End Property + + + Public Property TransportDocument() As List(Of TransportDocumentEGType) + Get + Return Me._transportDocument + End Get + Set + Me._transportDocument = Value + End Set + End Property + + + Public Property PreviousDocument() As List(Of PreviousDocumentEGType) + Get + Return Me._previousDocument + End Get + Set + Me._previousDocument = Value + End Set + End Property + + + Public Property SupportingDocument() As List(Of SupportingDocumentEGType) + Get + Return Me._supportingDocument + End Get + Set + Me._supportingDocument = Value + End Set + End Property + + + Public Property AdditionalReference() As List(Of AdditionalReferenceEGType) + Get + Return Me._additionalReference + End Get + Set + Me._additionalReference = 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(ExportOperationEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ExportOperationEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ExportOperationEGType object + ''' + ''' string to deserialize + ''' Output ExportOperationEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ExportOperationEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ExportOperationEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ExportOperationEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ExportOperationEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ExportOperationEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ExportOperationEGType + Return CType(SerializerXml.Deserialize(s), ExportOperationEGType) + End Function +#End Region + + ''' + ''' Serializes current ExportOperationEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ExportOperationEGType object + ''' + ''' File to load and deserialize + ''' Output ExportOperationEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ExportOperationEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ExportOperationEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ExportOperationEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ExportOperationEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransaktionExportTyp + +#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(TransaktionExportTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransaktionExportTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransaktionExportTyp object + ''' + ''' string to deserialize + ''' Output TransaktionExportTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransaktionExportTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransaktionExportTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransaktionExportTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransaktionExportTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransaktionExportTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransaktionExportTyp + Return CType(SerializerXml.Deserialize(s), TransaktionExportTyp) + End Function +#End Region + + ''' + ''' Serializes current TransaktionExportTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransaktionExportTyp object + ''' + ''' File to load and deserialize + ''' Output TransaktionExportTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransaktionExportTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransaktionExportTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransaktionExportTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransaktionExportTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DatenaustauschExportTyp + +#Region "Private fields" + Private _transaktion As TransaktionExportTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._transaktion = New TransaktionExportTyp() + End Sub + + + Public Property Transaktion() As TransaktionExportTyp + 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(DatenaustauschExportTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DatenaustauschExportTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DatenaustauschExportTyp object + ''' + ''' string to deserialize + ''' Output DatenaustauschExportTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DatenaustauschExportTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DatenaustauschExportTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DatenaustauschExportTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DatenaustauschExportTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DatenaustauschExportTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DatenaustauschExportTyp + Return CType(SerializerXml.Deserialize(s), DatenaustauschExportTyp) + End Function +#End Region + + ''' + ''' Serializes current DatenaustauschExportTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DatenaustauschExportTyp object + ''' + ''' File to load and deserialize + ''' Output DatenaustauschExportTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DatenaustauschExportTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DatenaustauschExportTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DatenaustauschExportTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DatenaustauschExportTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) 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() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes 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 +#Enable Warning diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/AES/AusfuhrAnmeldung_004.xsd b/DAKOSY_Worker/DAKOSY/ATLAS/AES/AusfuhrAnmeldung_004.xsd new file mode 100644 index 0000000..781a454 --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/AES/AusfuhrAnmeldung_004.xsd @@ -0,0 +1,658 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/AES/BestaetigungAusfuhr/BestaetigungAusfuhr_007.Designer.vb b/DAKOSY_Worker/DAKOSY/ATLAS/AES/BestaetigungAusfuhr/BestaetigungAusfuhr_007.Designer.vb new file mode 100644 index 0000000..120da20 --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/AES/BestaetigungAusfuhr/BestaetigungAusfuhr_007.Designer.vb @@ -0,0 +1,6802 @@ +'' ------------------------------------------------------------------------------ +'' +'' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com +'' {"TargetFramework":"Net47","NameSpace":"BestaetigungAusfuhr_007","Language":"VisualBasic","Properties":{},"XmlAttribute":{"Enabled":true},"ClassParams":{},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{},"JsonOutput":{},"Enabled":true},"Miscellaneous":{}} +'' +'' ------------------------------------------------------------------------------ +#Disable Warning +Imports System +Imports System.Diagnostics +Imports System.Xml.Serialization +Imports System.Runtime.Serialization +Imports System.Collections +Imports System.Xml.Schema +Imports System.ComponentModel +Imports System.Xml +Imports System.IO +Imports System.Text +Imports System.Collections.Generic + +Namespace BestaetigungAusfuhr_007 + + + Partial Public Class BestaetigungAusfuhrENTyp + Inherits DatenaustauschExportTyp + +#Region "Private fields" + Private _einzelBestaetigung As List(Of EinzelBestaetigungAusfuhrTyp) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._einzelBestaetigung = New List(Of EinzelBestaetigungAusfuhrTyp)() + End Sub + + + Public Property EinzelBestaetigung() As List(Of EinzelBestaetigungAusfuhrTyp) + Get + Return Me._einzelBestaetigung + End Get + Set + Me._einzelBestaetigung = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(BestaetigungAusfuhrENTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize BestaetigungAusfuhrENTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes BestaetigungAusfuhrENTyp object + ''' + ''' string to deserialize + ''' Output BestaetigungAusfuhrENTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BestaetigungAusfuhrENTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BestaetigungAusfuhrENTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BestaetigungAusfuhrENTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As BestaetigungAusfuhrENTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), BestaetigungAusfuhrENTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As BestaetigungAusfuhrENTyp + Return CType(SerializerXml.Deserialize(s), BestaetigungAusfuhrENTyp) + End Function +#End Region + + ''' + ''' Serializes current BestaetigungAusfuhrENTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an BestaetigungAusfuhrENTyp object + ''' + ''' File to load and deserialize + ''' Output BestaetigungAusfuhrENTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BestaetigungAusfuhrENTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BestaetigungAusfuhrENTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BestaetigungAusfuhrENTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As BestaetigungAusfuhrENTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class EinzelBestaetigungAusfuhrTyp + +#Region "Private fields" + Private _objektIdentifizierung As ObjektIdentifizierungENTyp + + Private _kopfDaten As KopfDatenBestaetigungAusfuhrTyp + + Private _warenPosition As List(Of PositionBestaetigungAusfuhrTyp) + + Private _exportOperation As ExportOperationENType + + Private _goodsItem As List(Of GoodsItemENType) + + Private _attachments As List(Of AttachmentENType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._attachments = New List(Of AttachmentENType)() + Me._goodsItem = New List(Of GoodsItemENType)() + Me._exportOperation = New ExportOperationENType() + Me._warenPosition = New List(Of PositionBestaetigungAusfuhrTyp)() + Me._kopfDaten = New KopfDatenBestaetigungAusfuhrTyp() + Me._objektIdentifizierung = New ObjektIdentifizierungENTyp() + End Sub + + + Public Property ObjektIdentifizierung() As ObjektIdentifizierungENTyp + Get + Return Me._objektIdentifizierung + End Get + Set + Me._objektIdentifizierung = Value + End Set + End Property + + + Public Property KopfDaten() As KopfDatenBestaetigungAusfuhrTyp + Get + Return Me._kopfDaten + End Get + Set + Me._kopfDaten = Value + End Set + End Property + + + Public Property WarenPosition() As List(Of PositionBestaetigungAusfuhrTyp) + Get + Return Me._warenPosition + End Get + Set + Me._warenPosition = Value + End Set + End Property + + + Public Property ExportOperation() As ExportOperationENType + Get + Return Me._exportOperation + End Get + Set + Me._exportOperation = Value + End Set + End Property + + + Public Property GoodsItem() As List(Of GoodsItemENType) + Get + Return Me._goodsItem + End Get + Set + Me._goodsItem = Value + End Set + End Property + + + Public Property Attachments() As List(Of AttachmentENType) + 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(EinzelBestaetigungAusfuhrTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize EinzelBestaetigungAusfuhrTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes EinzelBestaetigungAusfuhrTyp object + ''' + ''' string to deserialize + ''' Output EinzelBestaetigungAusfuhrTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelBestaetigungAusfuhrTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EinzelBestaetigungAusfuhrTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelBestaetigungAusfuhrTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As EinzelBestaetigungAusfuhrTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), EinzelBestaetigungAusfuhrTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As EinzelBestaetigungAusfuhrTyp + Return CType(SerializerXml.Deserialize(s), EinzelBestaetigungAusfuhrTyp) + End Function +#End Region + + ''' + ''' Serializes current EinzelBestaetigungAusfuhrTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an EinzelBestaetigungAusfuhrTyp object + ''' + ''' File to load and deserialize + ''' Output EinzelBestaetigungAusfuhrTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelBestaetigungAusfuhrTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EinzelBestaetigungAusfuhrTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelBestaetigungAusfuhrTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As EinzelBestaetigungAusfuhrTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ObjektIdentifizierungENTyp + +#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(ObjektIdentifizierungENTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ObjektIdentifizierungENTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ObjektIdentifizierungENTyp object + ''' + ''' string to deserialize + ''' Output ObjektIdentifizierungENTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ObjektIdentifizierungENTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ObjektIdentifizierungENTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ObjektIdentifizierungENTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ObjektIdentifizierungENTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ObjektIdentifizierungENTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ObjektIdentifizierungENTyp + Return CType(SerializerXml.Deserialize(s), ObjektIdentifizierungENTyp) + End Function +#End Region + + ''' + ''' Serializes current ObjektIdentifizierungENTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ObjektIdentifizierungENTyp object + ''' + ''' File to load and deserialize + ''' Output ObjektIdentifizierungENTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ObjektIdentifizierungENTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ObjektIdentifizierungENTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ObjektIdentifizierungENTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ObjektIdentifizierungENTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AttachmentENType + +#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(AttachmentENType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AttachmentENType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AttachmentENType object + ''' + ''' string to deserialize + ''' Output AttachmentENType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AttachmentENType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AttachmentENType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AttachmentENType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AttachmentENType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AttachmentENType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AttachmentENType + Return CType(SerializerXml.Deserialize(s), AttachmentENType) + End Function +#End Region + + ''' + ''' Serializes current AttachmentENType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AttachmentENType object + ''' + ''' File to load and deserialize + ''' Output AttachmentENType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AttachmentENType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AttachmentENType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AttachmentENType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AttachmentENType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class PackagingENType + +#Region "Private fields" + Private _numberOfPackages As String + + Private _typeOfPackages As String + + Private _shippingMarks As String + + Private _packageReference As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property NumberOfPackages() As String + Get + Return Me._numberOfPackages + End Get + Set + Me._numberOfPackages = Value + End Set + End Property + + + Public Property TypeOfPackages() As String + Get + Return Me._typeOfPackages + End Get + Set + Me._typeOfPackages = Value + End Set + End Property + + + Public Property ShippingMarks() As String + Get + Return Me._shippingMarks + End Get + Set + Me._shippingMarks = Value + End Set + End Property + + + Public Property PackageReference() As String + Get + Return Me._packageReference + End Get + Set + Me._packageReference = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PackagingENType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize PackagingENType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes PackagingENType object + ''' + ''' string to deserialize + ''' Output PackagingENType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PackagingENType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PackagingENType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PackagingENType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As PackagingENType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PackagingENType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As PackagingENType + Return CType(SerializerXml.Deserialize(s), PackagingENType) + End Function +#End Region + + ''' + ''' Serializes current PackagingENType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an PackagingENType object + ''' + ''' File to load and deserialize + ''' Output PackagingENType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PackagingENType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PackagingENType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PackagingENType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PackagingENType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ProcedureENType + +#Region "Private fields" + Private _requestedProcedure As String + + Private _previousProcedure As String + + Private _additionalProcedure As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property RequestedProcedure() As String + Get + Return Me._requestedProcedure + End Get + Set + Me._requestedProcedure = Value + End Set + End Property + + + Public Property PreviousProcedure() As String + Get + Return Me._previousProcedure + End Get + Set + Me._previousProcedure = Value + End Set + End Property + + + Public Property AdditionalProcedure() As String + Get + Return Me._additionalProcedure + End Get + Set + Me._additionalProcedure = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ProcedureENType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ProcedureENType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ProcedureENType object + ''' + ''' string to deserialize + ''' Output ProcedureENType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ProcedureENType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ProcedureENType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ProcedureENType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ProcedureENType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ProcedureENType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ProcedureENType + Return CType(SerializerXml.Deserialize(s), ProcedureENType) + End Function +#End Region + + ''' + ''' Serializes current ProcedureENType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ProcedureENType object + ''' + ''' File to load and deserialize + ''' Output ProcedureENType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ProcedureENType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ProcedureENType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ProcedureENType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ProcedureENType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class GoodsItemENType + +#Region "Private fields" + Private _declarationGoodsItemNumber As String + + Private _harmonizedSystemSubHeadingCode As String + + Private _combinedNomenclatureCode As String + + Private _taricAdditionalCode As List(Of String) + + Private _descriptionOfGoods As String + + Private _registrationNumberExternal As String + + Private _referenceNumberUCR As String + + Private _netMass As Decimal + + Private _grossMass As Decimal + + Private _supplementaryUnits As Decimal + + Private _waterMark As String + + Private _procedure As ProcedureENType + + Private _statisticalValue As Decimal + + Private _countryOfExport As String + + Private _packaging As List(Of PackagingENType) + + Private _consignee As AddressENType + + Private _natureOfTransaction As String + + Private _applicationInternalData As ApplicationInternalDataType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._applicationInternalData = New ApplicationInternalDataType() + Me._consignee = New AddressENType() + Me._packaging = New List(Of PackagingENType)() + Me._procedure = New ProcedureENType() + Me._taricAdditionalCode = New List(Of String)() + End Sub + + + Public Property DeclarationGoodsItemNumber() As String + Get + Return Me._declarationGoodsItemNumber + End Get + Set + Me._declarationGoodsItemNumber = Value + End Set + End Property + + + Public Property HarmonizedSystemSubHeadingCode() As String + Get + Return Me._harmonizedSystemSubHeadingCode + End Get + Set + Me._harmonizedSystemSubHeadingCode = Value + End Set + End Property + + + Public Property CombinedNomenclatureCode() As String + Get + Return Me._combinedNomenclatureCode + End Get + Set + Me._combinedNomenclatureCode = Value + End Set + End Property + + + Public Property TaricAdditionalCode() As List(Of String) + Get + Return Me._taricAdditionalCode + End Get + Set + Me._taricAdditionalCode = Value + End Set + End Property + + + Public Property DescriptionOfGoods() As String + Get + Return Me._descriptionOfGoods + End Get + Set + Me._descriptionOfGoods = Value + End Set + End Property + + + Public Property RegistrationNumberExternal() As String + Get + Return Me._registrationNumberExternal + End Get + Set + Me._registrationNumberExternal = Value + End Set + End Property + + + Public Property ReferenceNumberUCR() As String + Get + Return Me._referenceNumberUCR + End Get + Set + Me._referenceNumberUCR = Value + End Set + End Property + + + Public Property NetMass() As Decimal + Get + Return Me._netMass + End Get + Set + Me._netMass = Value + End Set + End Property + + + Public Property GrossMass() As Decimal + Get + Return Me._grossMass + End Get + Set + Me._grossMass = Value + End Set + End Property + + + Public Property SupplementaryUnits() As Decimal + Get + Return Me._supplementaryUnits + End Get + Set + Me._supplementaryUnits = Value + End Set + End Property + + + Public Property WaterMark() As String + Get + Return Me._waterMark + End Get + Set + Me._waterMark = Value + End Set + End Property + + + Public Property Procedure() As ProcedureENType + Get + Return Me._procedure + End Get + Set + Me._procedure = Value + End Set + End Property + + + Public Property StatisticalValue() As Decimal + Get + Return Me._statisticalValue + End Get + Set + Me._statisticalValue = Value + End Set + End Property + + + Public Property CountryOfExport() As String + Get + Return Me._countryOfExport + End Get + Set + Me._countryOfExport = Value + End Set + End Property + + + Public Property Packaging() As List(Of PackagingENType) + Get + Return Me._packaging + End Get + Set + Me._packaging = Value + End Set + End Property + + + Public Property Consignee() As AddressENType + Get + Return Me._consignee + End Get + Set + Me._consignee = Value + End Set + End Property + + + Public Property NatureOfTransaction() As String + Get + Return Me._natureOfTransaction + End Get + Set + Me._natureOfTransaction = Value + End Set + End Property + + + Public Property ApplicationInternalData() As ApplicationInternalDataType + Get + Return Me._applicationInternalData + End Get + Set + Me._applicationInternalData = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(GoodsItemENType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize GoodsItemENType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes GoodsItemENType object + ''' + ''' string to deserialize + ''' Output GoodsItemENType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GoodsItemENType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, GoodsItemENType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GoodsItemENType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As GoodsItemENType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), GoodsItemENType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As GoodsItemENType + Return CType(SerializerXml.Deserialize(s), GoodsItemENType) + End Function +#End Region + + ''' + ''' Serializes current GoodsItemENType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an GoodsItemENType object + ''' + ''' File to load and deserialize + ''' Output GoodsItemENType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GoodsItemENType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, GoodsItemENType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GoodsItemENType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As GoodsItemENType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AddressENType + +#Region "Private fields" + Private _identificationNumber As String + + Private _subsidiaryNumber As String + + Private _name As String + + Private _streetAndNumber As String + + Private _city As String + + Private _postcode As String + + Private _country As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property IdentificationNumber() As String + Get + Return Me._identificationNumber + End Get + Set + Me._identificationNumber = Value + End Set + End Property + + + Public Property SubsidiaryNumber() As String + Get + Return Me._subsidiaryNumber + End Get + Set + Me._subsidiaryNumber = Value + End Set + End Property + + + Public Property Name() As String + Get + Return Me._name + End Get + Set + Me._name = Value + End Set + End Property + + + Public Property StreetAndNumber() As String + Get + Return Me._streetAndNumber + End Get + Set + Me._streetAndNumber = Value + End Set + End Property + + + Public Property City() As String + Get + Return Me._city + End Get + Set + Me._city = Value + End Set + End Property + + + Public Property Postcode() As String + Get + Return Me._postcode + End Get + Set + Me._postcode = Value + End Set + End Property + + + Public Property Country() As String + Get + Return Me._country + End Get + Set + Me._country = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AddressENType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AddressENType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AddressENType object + ''' + ''' string to deserialize + ''' Output AddressENType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AddressENType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AddressENType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AddressENType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AddressENType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AddressENType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AddressENType + Return CType(SerializerXml.Deserialize(s), AddressENType) + End Function +#End Region + + ''' + ''' Serializes current AddressENType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AddressENType object + ''' + ''' File to load and deserialize + ''' Output AddressENType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AddressENType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AddressENType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AddressENType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AddressENType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) 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 DeliveryTermsENType + +#Region "Private fields" + Private _incotermCode As String + + Private _text As String + + Private _location As String + + Private _uNLocode As String + + Private _country As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property IncotermCode() As String + Get + Return Me._incotermCode + End Get + Set + Me._incotermCode = Value + End Set + End Property + + + Public Property Text() As String + Get + Return Me._text + End Get + Set + Me._text = Value + End Set + End Property + + + Public Property Location() As String + Get + Return Me._location + End Get + Set + Me._location = Value + End Set + End Property + + + Public Property UNLocode() As String + Get + Return Me._uNLocode + End Get + Set + Me._uNLocode = 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(DeliveryTermsENType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DeliveryTermsENType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DeliveryTermsENType object + ''' + ''' string to deserialize + ''' Output DeliveryTermsENType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DeliveryTermsENType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DeliveryTermsENType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DeliveryTermsENType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DeliveryTermsENType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DeliveryTermsENType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DeliveryTermsENType + Return CType(SerializerXml.Deserialize(s), DeliveryTermsENType) + End Function +#End Region + + ''' + ''' Serializes current DeliveryTermsENType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DeliveryTermsENType object + ''' + ''' File to load and deserialize + ''' Output DeliveryTermsENType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DeliveryTermsENType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DeliveryTermsENType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DeliveryTermsENType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DeliveryTermsENType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ExportOperationENType + +#Region "Private fields" + Private _declarationType As String + + Private _exportDeclarationType As String + + Private _mRN As String + + Private _countryOfDestination As String + + Private _countryOfExport As String + + Private _exitDateAndTime As Date + + Private _declarationAcceptanceDateAndTime As Date + + Private _releaseDateAndTime As Date + + Private _alternativeEvidence As List(Of String) + + Private _shortage As String + + Private _partyConstellation As String + + Private _grossMass As Decimal + + Private _registrationNumberExternal As String + + Private _referenceNumberUCR As String + + Private _waterMark As String + + Private _customsOfficeOfPresentation As String + + Private _customsOfficeOfExport As String + + Private _customsOfficeOfExitActual As String + + Private _natureOfTransaction As String + + Private _totalAmountInvoiced As Decimal + + Private _invoiceCurrency As String + + Private _contractualPartner As AddressENType + + Private _exporter As AddressENType + + Private _consignee As AddressENType + + Private _declarant As AddressENType + + Private _representative As AddressENType + + Private _subContractor As AddressENType + + Private _deliveryTerms As DeliveryTermsENType + + Private _fileNameOfExitNotification As String + + Private _applicationInternalData As ApplicationInternalDataType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._applicationInternalData = New ApplicationInternalDataType() + Me._deliveryTerms = New DeliveryTermsENType() + Me._subContractor = New AddressENType() + Me._representative = New AddressENType() + Me._declarant = New AddressENType() + Me._consignee = New AddressENType() + Me._exporter = New AddressENType() + Me._contractualPartner = New AddressENType() + Me._alternativeEvidence = New List(Of String)() + End Sub + + + Public Property DeclarationType() As String + Get + Return Me._declarationType + End Get + Set + Me._declarationType = Value + End Set + End Property + + + Public Property ExportDeclarationType() As String + Get + Return Me._exportDeclarationType + End Get + Set + Me._exportDeclarationType = Value + End Set + End Property + + + Public Property MRN() As String + Get + Return Me._mRN + End Get + Set + Me._mRN = Value + End Set + End Property + + + Public Property CountryOfDestination() As String + Get + Return Me._countryOfDestination + End Get + Set + Me._countryOfDestination = Value + End Set + End Property + + + Public Property CountryOfExport() As String + Get + Return Me._countryOfExport + End Get + Set + Me._countryOfExport = Value + End Set + End Property + + + Public Property ExitDateAndTime() As Date + Get + Return Me._exitDateAndTime + End Get + Set + Me._exitDateAndTime = 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 AlternativeEvidence() As List(Of String) + Get + Return Me._alternativeEvidence + End Get + Set + Me._alternativeEvidence = Value + End Set + End Property + + + Public Property Shortage() As String + Get + Return Me._shortage + End Get + Set + Me._shortage = Value + End Set + End Property + + + Public Property PartyConstellation() As String + Get + Return Me._partyConstellation + End Get + Set + Me._partyConstellation = Value + End Set + End Property + + + Public Property GrossMass() As Decimal + Get + Return Me._grossMass + End Get + Set + Me._grossMass = Value + End Set + End Property + + + Public Property RegistrationNumberExternal() As String + Get + Return Me._registrationNumberExternal + End Get + Set + Me._registrationNumberExternal = Value + End Set + End Property + + + Public Property ReferenceNumberUCR() As String + Get + Return Me._referenceNumberUCR + End Get + Set + Me._referenceNumberUCR = Value + End Set + End Property + + + Public Property WaterMark() As String + Get + Return Me._waterMark + End Get + Set + Me._waterMark = Value + End Set + End Property + + + Public Property CustomsOfficeOfPresentation() As String + Get + Return Me._customsOfficeOfPresentation + End Get + Set + Me._customsOfficeOfPresentation = Value + End Set + End Property + + + Public Property CustomsOfficeOfExport() As String + Get + Return Me._customsOfficeOfExport + End Get + Set + Me._customsOfficeOfExport = Value + End Set + End Property + + + Public Property CustomsOfficeOfExitActual() As String + Get + Return Me._customsOfficeOfExitActual + End Get + Set + Me._customsOfficeOfExitActual = Value + End Set + End Property + + + Public Property NatureOfTransaction() As String + Get + Return Me._natureOfTransaction + End Get + Set + Me._natureOfTransaction = Value + End Set + End Property + + + Public Property TotalAmountInvoiced() As Decimal + Get + Return Me._totalAmountInvoiced + End Get + Set + Me._totalAmountInvoiced = Value + End Set + End Property + + + Public Property InvoiceCurrency() As String + Get + Return Me._invoiceCurrency + End Get + Set + Me._invoiceCurrency = Value + End Set + End Property + + + Public Property ContractualPartner() As AddressENType + Get + Return Me._contractualPartner + End Get + Set + Me._contractualPartner = Value + End Set + End Property + + + Public Property Exporter() As AddressENType + Get + Return Me._exporter + End Get + Set + Me._exporter = Value + End Set + End Property + + + Public Property Consignee() As AddressENType + Get + Return Me._consignee + End Get + Set + Me._consignee = Value + End Set + End Property + + + Public Property Declarant() As AddressENType + Get + Return Me._declarant + End Get + Set + Me._declarant = Value + End Set + End Property + + + Public Property Representative() As AddressENType + Get + Return Me._representative + End Get + Set + Me._representative = Value + End Set + End Property + + + Public Property SubContractor() As AddressENType + Get + Return Me._subContractor + End Get + Set + Me._subContractor = Value + End Set + End Property + + + Public Property DeliveryTerms() As DeliveryTermsENType + Get + Return Me._deliveryTerms + End Get + Set + Me._deliveryTerms = Value + End Set + End Property + + + Public Property FileNameOfExitNotification() As String + Get + Return Me._fileNameOfExitNotification + End Get + Set + Me._fileNameOfExitNotification = 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(ExportOperationENType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ExportOperationENType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ExportOperationENType object + ''' + ''' string to deserialize + ''' Output ExportOperationENType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ExportOperationENType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ExportOperationENType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ExportOperationENType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ExportOperationENType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ExportOperationENType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ExportOperationENType + Return CType(SerializerXml.Deserialize(s), ExportOperationENType) + End Function +#End Region + + ''' + ''' Serializes current ExportOperationENType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ExportOperationENType object + ''' + ''' File to load and deserialize + ''' Output ExportOperationENType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ExportOperationENType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ExportOperationENType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ExportOperationENType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ExportOperationENType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class EmpfaengerPositionENTyp + +#Region "Private fields" + Private _teilnehmerEORI As String + + Private _identifikationsart As String + + Private _teilnehmerNLNR As String + + Private _name As String + + Private _strasse As String + + Private _ort As String + + Private _pLZ As String + + Private _landCode As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property TeilnehmerEORI() As String + Get + Return Me._teilnehmerEORI + End Get + Set + Me._teilnehmerEORI = 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 TeilnehmerNLNR() As String + Get + Return Me._teilnehmerNLNR + End Get + Set + Me._teilnehmerNLNR = 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 Strasse() As String + Get + Return Me._strasse + End Get + Set + Me._strasse = 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 PLZ() As String + Get + Return Me._pLZ + End Get + Set + Me._pLZ = Value + End Set + End Property + + + Public Property LandCode() As String + Get + Return Me._landCode + End Get + Set + Me._landCode = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(EmpfaengerPositionENTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize EmpfaengerPositionENTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes EmpfaengerPositionENTyp object + ''' + ''' string to deserialize + ''' Output EmpfaengerPositionENTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EmpfaengerPositionENTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EmpfaengerPositionENTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EmpfaengerPositionENTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As EmpfaengerPositionENTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), EmpfaengerPositionENTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As EmpfaengerPositionENTyp + Return CType(SerializerXml.Deserialize(s), EmpfaengerPositionENTyp) + End Function +#End Region + + ''' + ''' Serializes current EmpfaengerPositionENTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an EmpfaengerPositionENTyp object + ''' + ''' File to load and deserialize + ''' Output EmpfaengerPositionENTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EmpfaengerPositionENTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EmpfaengerPositionENTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EmpfaengerPositionENTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As EmpfaengerPositionENTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class PackstueckENTyp + +#Region "Private fields" + Private _anzahl As String + + Private _verpackungsartCode As String + + Private _kennzeichnung As String + + Private _positionHauptpack 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 VerpackungsartCode() As String + Get + Return Me._verpackungsartCode + End Get + Set + Me._verpackungsartCode = Value + End Set + End Property + + + Public Property Kennzeichnung() As String + Get + Return Me._kennzeichnung + End Get + Set + Me._kennzeichnung = Value + End Set + End Property + + + Public Property PositionHauptpack() As String + Get + Return Me._positionHauptpack + End Get + Set + Me._positionHauptpack = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PackstueckENTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize PackstueckENTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes PackstueckENTyp object + ''' + ''' string to deserialize + ''' Output PackstueckENTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PackstueckENTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PackstueckENTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PackstueckENTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As PackstueckENTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PackstueckENTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As PackstueckENTyp + Return CType(SerializerXml.Deserialize(s), PackstueckENTyp) + End Function +#End Region + + ''' + ''' Serializes current PackstueckENTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an PackstueckENTyp object + ''' + ''' File to load and deserialize + ''' Output PackstueckENTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PackstueckENTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PackstueckENTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PackstueckENTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PackstueckENTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class VerfahrenENTyp + +#Region "Private fields" + Private _verfahrenAngemeldetCode As String + + Private _verfahrenVorangegangenCode As String + + Private _verfahrenNationalCode As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property VerfahrenAngemeldetCode() As String + Get + Return Me._verfahrenAngemeldetCode + End Get + Set + Me._verfahrenAngemeldetCode = Value + End Set + End Property + + + Public Property VerfahrenVorangegangenCode() As String + Get + Return Me._verfahrenVorangegangenCode + End Get + Set + Me._verfahrenVorangegangenCode = Value + End Set + End Property + + + Public Property VerfahrenNationalCode() As String + Get + Return Me._verfahrenNationalCode + End Get + Set + Me._verfahrenNationalCode = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(VerfahrenENTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize VerfahrenENTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes VerfahrenENTyp object + ''' + ''' string to deserialize + ''' Output VerfahrenENTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VerfahrenENTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VerfahrenENTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VerfahrenENTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As VerfahrenENTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), VerfahrenENTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As VerfahrenENTyp + Return CType(SerializerXml.Deserialize(s), VerfahrenENTyp) + End Function +#End Region + + ''' + ''' Serializes current VerfahrenENTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an VerfahrenENTyp object + ''' + ''' File to load and deserialize + ''' Output VerfahrenENTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VerfahrenENTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VerfahrenENTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VerfahrenENTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As VerfahrenENTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class PositionBestaetigungAusfuhrTyp + +#Region "Private fields" + Private _positionsnummer As String + + Private _warenNummerKN8 As String + + Private _warenNummerTARIC As String + + Private _warenNummerZusatz1 As String + + Private _warenNummerZusatz2 As String + + Private _warenNummerNational As String + + Private _warenBezeichnung As String + + Private _registrierNummerFremdSystem As String + + Private _kennnummerSendung As String + + Private _eigenmasse As Decimal + + Private _rohmasse As Decimal + + Private _wasserzeichen As String + + Private _verfahren As VerfahrenENTyp + + Private _ausfuhrerstattungVerfahrensCode As String + + Private _packstueck As List(Of PackstueckENTyp) + + Private _empfaenger As EmpfaengerPositionENTyp + + Private _incotermCode As String + + Private _incotermText As String + + Private _incotermOrt As String + + Private _geschaeftArtCode As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._empfaenger = New EmpfaengerPositionENTyp() + Me._packstueck = New List(Of PackstueckENTyp)() + Me._verfahren = New VerfahrenENTyp() + End Sub + + + Public Property Positionsnummer() As String + Get + Return Me._positionsnummer + End Get + Set + Me._positionsnummer = Value + End Set + End Property + + + Public Property WarenNummerKN8() As String + Get + Return Me._warenNummerKN8 + End Get + Set + Me._warenNummerKN8 = Value + End Set + End Property + + + Public Property WarenNummerTARIC() As String + Get + Return Me._warenNummerTARIC + End Get + Set + Me._warenNummerTARIC = Value + End Set + End Property + + + Public Property WarenNummerZusatz1() As String + Get + Return Me._warenNummerZusatz1 + End Get + Set + Me._warenNummerZusatz1 = Value + End Set + End Property + + + Public Property WarenNummerZusatz2() As String + Get + Return Me._warenNummerZusatz2 + End Get + Set + Me._warenNummerZusatz2 = Value + End Set + End Property + + + Public Property WarenNummerNational() As String + Get + Return Me._warenNummerNational + End Get + Set + Me._warenNummerNational = 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 RegistrierNummerFremdSystem() As String + Get + Return Me._registrierNummerFremdSystem + End Get + Set + Me._registrierNummerFremdSystem = 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 Eigenmasse() As Decimal + Get + Return Me._eigenmasse + End Get + Set + Me._eigenmasse = 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 Wasserzeichen() As String + Get + Return Me._wasserzeichen + End Get + Set + Me._wasserzeichen = Value + End Set + End Property + + + Public Property Verfahren() As VerfahrenENTyp + Get + Return Me._verfahren + End Get + Set + Me._verfahren = Value + End Set + End Property + + + Public Property AusfuhrerstattungVerfahrensCode() As String + Get + Return Me._ausfuhrerstattungVerfahrensCode + End Get + Set + Me._ausfuhrerstattungVerfahrensCode = Value + End Set + End Property + + + Public Property Packstueck() As List(Of PackstueckENTyp) + Get + Return Me._packstueck + End Get + Set + Me._packstueck = Value + End Set + End Property + + + Public Property Empfaenger() As EmpfaengerPositionENTyp + Get + Return Me._empfaenger + End Get + Set + Me._empfaenger = Value + End Set + End Property + + + Public Property IncotermCode() As String + Get + Return Me._incotermCode + End Get + Set + Me._incotermCode = Value + End Set + End Property + + + Public Property IncotermText() As String + Get + Return Me._incotermText + End Get + Set + Me._incotermText = Value + End Set + End Property + + + Public Property IncotermOrt() As String + Get + Return Me._incotermOrt + End Get + Set + Me._incotermOrt = Value + End Set + End Property + + + Public Property GeschaeftArtCode() As String + Get + Return Me._geschaeftArtCode + End Get + Set + Me._geschaeftArtCode = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PositionBestaetigungAusfuhrTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize PositionBestaetigungAusfuhrTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes PositionBestaetigungAusfuhrTyp object + ''' + ''' string to deserialize + ''' Output PositionBestaetigungAusfuhrTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PositionBestaetigungAusfuhrTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PositionBestaetigungAusfuhrTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PositionBestaetigungAusfuhrTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As PositionBestaetigungAusfuhrTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PositionBestaetigungAusfuhrTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As PositionBestaetigungAusfuhrTyp + Return CType(SerializerXml.Deserialize(s), PositionBestaetigungAusfuhrTyp) + End Function +#End Region + + ''' + ''' Serializes current PositionBestaetigungAusfuhrTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an PositionBestaetigungAusfuhrTyp object + ''' + ''' File to load and deserialize + ''' Output PositionBestaetigungAusfuhrTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PositionBestaetigungAusfuhrTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PositionBestaetigungAusfuhrTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PositionBestaetigungAusfuhrTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PositionBestaetigungAusfuhrTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class LieferbedingungENTyp + +#Region "Private fields" + Private _incotermCode As String + + Private _incotermText As String + + Private _incotermOrt As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property IncotermCode() As String + Get + Return Me._incotermCode + End Get + Set + Me._incotermCode = Value + End Set + End Property + + + Public Property IncotermText() As String + Get + Return Me._incotermText + End Get + Set + Me._incotermText = Value + End Set + End Property + + + Public Property IncotermOrt() As String + Get + Return Me._incotermOrt + End Get + Set + Me._incotermOrt = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(LieferbedingungENTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize LieferbedingungENTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes LieferbedingungENTyp object + ''' + ''' string to deserialize + ''' Output LieferbedingungENTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As LieferbedingungENTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, LieferbedingungENTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As LieferbedingungENTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As LieferbedingungENTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), LieferbedingungENTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As LieferbedingungENTyp + Return CType(SerializerXml.Deserialize(s), LieferbedingungENTyp) + End Function +#End Region + + ''' + ''' Serializes current LieferbedingungENTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an LieferbedingungENTyp object + ''' + ''' File to load and deserialize + ''' Output LieferbedingungENTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As LieferbedingungENTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, LieferbedingungENTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As LieferbedingungENTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As LieferbedingungENTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class SubUnternehmerENTyp + +#Region "Private fields" + Private _teilnehmerEORI As String + + Private _teilnehmerNLNR As String + + Private _name As String + + Private _strasse As String + + Private _ort As String + + Private _pLZ As String + + Private _landCode As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property TeilnehmerEORI() As String + Get + Return Me._teilnehmerEORI + End Get + Set + Me._teilnehmerEORI = Value + End Set + End Property + + + Public Property TeilnehmerNLNR() As String + Get + Return Me._teilnehmerNLNR + End Get + Set + Me._teilnehmerNLNR = 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 Strasse() As String + Get + Return Me._strasse + End Get + Set + Me._strasse = 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 PLZ() As String + Get + Return Me._pLZ + End Get + Set + Me._pLZ = Value + End Set + End Property + + + Public Property LandCode() As String + Get + Return Me._landCode + End Get + Set + Me._landCode = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(SubUnternehmerENTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize SubUnternehmerENTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes SubUnternehmerENTyp object + ''' + ''' string to deserialize + ''' Output SubUnternehmerENTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SubUnternehmerENTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SubUnternehmerENTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SubUnternehmerENTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As SubUnternehmerENTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), SubUnternehmerENTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As SubUnternehmerENTyp + Return CType(SerializerXml.Deserialize(s), SubUnternehmerENTyp) + End Function +#End Region + + ''' + ''' Serializes current SubUnternehmerENTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an SubUnternehmerENTyp object + ''' + ''' File to load and deserialize + ''' Output SubUnternehmerENTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SubUnternehmerENTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SubUnternehmerENTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SubUnternehmerENTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As SubUnternehmerENTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class VertreterAnmelderENTyp + +#Region "Private fields" + Private _teilnehmerEORI As String + + Private _teilnehmerNLNR As String + + Private _name As String + + Private _strasse As String + + Private _ort As String + + Private _pLZ As String + + Private _landCode As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property TeilnehmerEORI() As String + Get + Return Me._teilnehmerEORI + End Get + Set + Me._teilnehmerEORI = Value + End Set + End Property + + + Public Property TeilnehmerNLNR() As String + Get + Return Me._teilnehmerNLNR + End Get + Set + Me._teilnehmerNLNR = 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 Strasse() As String + Get + Return Me._strasse + End Get + Set + Me._strasse = 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 PLZ() As String + Get + Return Me._pLZ + End Get + Set + Me._pLZ = Value + End Set + End Property + + + Public Property LandCode() As String + Get + Return Me._landCode + End Get + Set + Me._landCode = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(VertreterAnmelderENTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize VertreterAnmelderENTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes VertreterAnmelderENTyp object + ''' + ''' string to deserialize + ''' Output VertreterAnmelderENTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VertreterAnmelderENTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VertreterAnmelderENTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VertreterAnmelderENTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As VertreterAnmelderENTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), VertreterAnmelderENTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As VertreterAnmelderENTyp + Return CType(SerializerXml.Deserialize(s), VertreterAnmelderENTyp) + End Function +#End Region + + ''' + ''' Serializes current VertreterAnmelderENTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an VertreterAnmelderENTyp object + ''' + ''' File to load and deserialize + ''' Output VertreterAnmelderENTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VertreterAnmelderENTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VertreterAnmelderENTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VertreterAnmelderENTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As VertreterAnmelderENTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AnmelderENTyp + +#Region "Private fields" + Private _teilnehmerEORI As String + + Private _teilnehmerNLNR As String + + Private _name As String + + Private _strasse As String + + Private _ort As String + + Private _pLZ As String + + Private _landCode As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property TeilnehmerEORI() As String + Get + Return Me._teilnehmerEORI + End Get + Set + Me._teilnehmerEORI = Value + End Set + End Property + + + Public Property TeilnehmerNLNR() As String + Get + Return Me._teilnehmerNLNR + End Get + Set + Me._teilnehmerNLNR = 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 Strasse() As String + Get + Return Me._strasse + End Get + Set + Me._strasse = 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 PLZ() As String + Get + Return Me._pLZ + End Get + Set + Me._pLZ = Value + End Set + End Property + + + Public Property LandCode() As String + Get + Return Me._landCode + End Get + Set + Me._landCode = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AnmelderENTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AnmelderENTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AnmelderENTyp object + ''' + ''' string to deserialize + ''' Output AnmelderENTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AnmelderENTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AnmelderENTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AnmelderENTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AnmelderENTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AnmelderENTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AnmelderENTyp + Return CType(SerializerXml.Deserialize(s), AnmelderENTyp) + End Function +#End Region + + ''' + ''' Serializes current AnmelderENTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AnmelderENTyp object + ''' + ''' File to load and deserialize + ''' Output AnmelderENTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AnmelderENTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AnmelderENTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AnmelderENTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AnmelderENTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class EmpfaengerENTyp + +#Region "Private fields" + Private _teilnehmerEORI As String + + Private _identifikationsart As String + + Private _teilnehmerNLNR As String + + Private _name As String + + Private _strasse As String + + Private _ort As String + + Private _pLZ As String + + Private _landCode As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property TeilnehmerEORI() As String + Get + Return Me._teilnehmerEORI + End Get + Set + Me._teilnehmerEORI = 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 TeilnehmerNLNR() As String + Get + Return Me._teilnehmerNLNR + End Get + Set + Me._teilnehmerNLNR = 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 Strasse() As String + Get + Return Me._strasse + End Get + Set + Me._strasse = 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 PLZ() As String + Get + Return Me._pLZ + End Get + Set + Me._pLZ = Value + End Set + End Property + + + Public Property LandCode() As String + Get + Return Me._landCode + End Get + Set + Me._landCode = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(EmpfaengerENTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize EmpfaengerENTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes EmpfaengerENTyp object + ''' + ''' string to deserialize + ''' Output EmpfaengerENTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EmpfaengerENTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EmpfaengerENTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EmpfaengerENTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As EmpfaengerENTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), EmpfaengerENTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As EmpfaengerENTyp + Return CType(SerializerXml.Deserialize(s), EmpfaengerENTyp) + End Function +#End Region + + ''' + ''' Serializes current EmpfaengerENTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an EmpfaengerENTyp object + ''' + ''' File to load and deserialize + ''' Output EmpfaengerENTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EmpfaengerENTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EmpfaengerENTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EmpfaengerENTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As EmpfaengerENTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AusfuehrerENTyp + +#Region "Private fields" + Private _teilnehmerEORI As String + + Private _identifikationsart As String + + Private _teilnehmerNLNR As String + + Private _name As String + + Private _strasse As String + + Private _ort As String + + Private _pLZ As String + + Private _landCode As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property TeilnehmerEORI() As String + Get + Return Me._teilnehmerEORI + End Get + Set + Me._teilnehmerEORI = 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 TeilnehmerNLNR() As String + Get + Return Me._teilnehmerNLNR + End Get + Set + Me._teilnehmerNLNR = 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 Strasse() As String + Get + Return Me._strasse + End Get + Set + Me._strasse = 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 PLZ() As String + Get + Return Me._pLZ + End Get + Set + Me._pLZ = Value + End Set + End Property + + + Public Property LandCode() As String + Get + Return Me._landCode + End Get + Set + Me._landCode = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AusfuehrerENTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AusfuehrerENTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AusfuehrerENTyp object + ''' + ''' string to deserialize + ''' Output AusfuehrerENTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AusfuehrerENTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AusfuehrerENTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AusfuehrerENTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AusfuehrerENTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AusfuehrerENTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AusfuehrerENTyp + Return CType(SerializerXml.Deserialize(s), AusfuehrerENTyp) + End Function +#End Region + + ''' + ''' Serializes current AusfuehrerENTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AusfuehrerENTyp object + ''' + ''' File to load and deserialize + ''' Output AusfuehrerENTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AusfuehrerENTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AusfuehrerENTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AusfuehrerENTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AusfuehrerENTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class VerfahrensinhaberPVENTyp + +#Region "Private fields" + Private _teilnehmerEORI As String + + Private _teilnehmerNLNR As String + + Private _name As String + + Private _strasse As String + + Private _ort As String + + Private _pLZ As String + + Private _landCode As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property TeilnehmerEORI() As String + Get + Return Me._teilnehmerEORI + End Get + Set + Me._teilnehmerEORI = Value + End Set + End Property + + + Public Property TeilnehmerNLNR() As String + Get + Return Me._teilnehmerNLNR + End Get + Set + Me._teilnehmerNLNR = 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 Strasse() As String + Get + Return Me._strasse + End Get + Set + Me._strasse = 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 PLZ() As String + Get + Return Me._pLZ + End Get + Set + Me._pLZ = Value + End Set + End Property + + + Public Property LandCode() As String + Get + Return Me._landCode + End Get + Set + Me._landCode = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(VerfahrensinhaberPVENTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize VerfahrensinhaberPVENTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes VerfahrensinhaberPVENTyp object + ''' + ''' string to deserialize + ''' Output VerfahrensinhaberPVENTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VerfahrensinhaberPVENTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VerfahrensinhaberPVENTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VerfahrensinhaberPVENTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As VerfahrensinhaberPVENTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), VerfahrensinhaberPVENTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As VerfahrensinhaberPVENTyp + Return CType(SerializerXml.Deserialize(s), VerfahrensinhaberPVENTyp) + End Function +#End Region + + ''' + ''' Serializes current VerfahrensinhaberPVENTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an VerfahrensinhaberPVENTyp object + ''' + ''' File to load and deserialize + ''' Output VerfahrensinhaberPVENTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VerfahrensinhaberPVENTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VerfahrensinhaberPVENTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VerfahrensinhaberPVENTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As VerfahrensinhaberPVENTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class KopfDatenBestaetigungAusfuhrTyp + +#Region "Private fields" + Private _anmeldeArtAusfuhrCode As String + + Private _anmeldeArtVerfahrenCode As String + + Private _anmeldeArtUeberfuehrungCode As String + + Private _movementReferenceNumber As String + + Private _bestimmungslandCode As String + + Private _ausfuhrlandCode As String + + Private _ausgangDatumZeit As Date + + Private _ueberlassungDatumZeit As Date + + Private _alternativerNachweis As String + + Private _minderMengeIndikator As String + + Private _beteiligtenKonstellation As String + + Private _gesamtRohMasse As Decimal + + Private _registrierNummerFremdSystem As String + + Private _kennnummerSendung As String + + Private _anzahlPackStuecke As String + + Private _anzahlPositionen As String + + Private _wasserzeichen As String + + Private _ausfuhrZollstelleID As String + + Private _ausgangZollstelleID As String + + Private _geschaeftArtCode As String + + Private _rechnungspreis As Decimal + + Private _rechnungswaehrung As String + + Private _verfahrensinhaberPV As VerfahrensinhaberPVENTyp + + Private _ausfuehrer As AusfuehrerENTyp + + Private _empfaenger As EmpfaengerENTyp + + Private _anmelder As AnmelderENTyp + + Private _vertreterAnmelder As VertreterAnmelderENTyp + + Private _subUnternehmer As SubUnternehmerENTyp + + Private _lieferbedingung As LieferbedingungENTyp + + Private _dateinameAusgangsvermerk As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._lieferbedingung = New LieferbedingungENTyp() + Me._subUnternehmer = New SubUnternehmerENTyp() + Me._vertreterAnmelder = New VertreterAnmelderENTyp() + Me._anmelder = New AnmelderENTyp() + Me._empfaenger = New EmpfaengerENTyp() + Me._ausfuehrer = New AusfuehrerENTyp() + Me._verfahrensinhaberPV = New VerfahrensinhaberPVENTyp() + End Sub + + + Public Property AnmeldeArtAusfuhrCode() As String + Get + Return Me._anmeldeArtAusfuhrCode + End Get + Set + Me._anmeldeArtAusfuhrCode = Value + End Set + End Property + + + Public Property AnmeldeArtVerfahrenCode() As String + Get + Return Me._anmeldeArtVerfahrenCode + End Get + Set + Me._anmeldeArtVerfahrenCode = Value + End Set + End Property + + + Public Property AnmeldeArtUeberfuehrungCode() As String + Get + Return Me._anmeldeArtUeberfuehrungCode + End Get + Set + Me._anmeldeArtUeberfuehrungCode = Value + End Set + End Property + + + Public Property MovementReferenceNumber() As String + Get + Return Me._movementReferenceNumber + End Get + Set + Me._movementReferenceNumber = Value + End Set + End Property + + + Public Property BestimmungslandCode() As String + Get + Return Me._bestimmungslandCode + End Get + Set + Me._bestimmungslandCode = Value + End Set + End Property + + + Public Property AusfuhrlandCode() As String + Get + Return Me._ausfuhrlandCode + End Get + Set + Me._ausfuhrlandCode = Value + End Set + End Property + + + Public Property AusgangDatumZeit() As Date + Get + Return Me._ausgangDatumZeit + End Get + Set + Me._ausgangDatumZeit = Value + End Set + End Property + + + Public Property UeberlassungDatumZeit() As Date + Get + Return Me._ueberlassungDatumZeit + End Get + Set + Me._ueberlassungDatumZeit = Value + End Set + End Property + + + Public Property AlternativerNachweis() As String + Get + Return Me._alternativerNachweis + End Get + Set + Me._alternativerNachweis = Value + End Set + End Property + + + Public Property MinderMengeIndikator() As String + Get + Return Me._minderMengeIndikator + End Get + Set + Me._minderMengeIndikator = Value + End Set + End Property + + + Public Property BeteiligtenKonstellation() As String + Get + Return Me._beteiligtenKonstellation + End Get + Set + Me._beteiligtenKonstellation = 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 RegistrierNummerFremdSystem() As String + Get + Return Me._registrierNummerFremdSystem + End Get + Set + Me._registrierNummerFremdSystem = 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 AnzahlPackStuecke() As String + Get + Return Me._anzahlPackStuecke + End Get + Set + Me._anzahlPackStuecke = 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 Wasserzeichen() As String + Get + Return Me._wasserzeichen + End Get + Set + Me._wasserzeichen = Value + End Set + End Property + + + Public Property AusfuhrZollstelleID() As String + Get + Return Me._ausfuhrZollstelleID + End Get + Set + Me._ausfuhrZollstelleID = Value + End Set + End Property + + + Public Property AusgangZollstelleID() As String + Get + Return Me._ausgangZollstelleID + End Get + Set + Me._ausgangZollstelleID = Value + End Set + End Property + + + Public Property GeschaeftArtCode() As String + Get + Return Me._geschaeftArtCode + End Get + Set + Me._geschaeftArtCode = Value + End Set + End Property + + + Public Property Rechnungspreis() As Decimal + Get + Return Me._rechnungspreis + End Get + Set + Me._rechnungspreis = Value + End Set + End Property + + + Public Property Rechnungswaehrung() As String + Get + Return Me._rechnungswaehrung + End Get + Set + Me._rechnungswaehrung = Value + End Set + End Property + + + Public Property VerfahrensinhaberPV() As VerfahrensinhaberPVENTyp + Get + Return Me._verfahrensinhaberPV + End Get + Set + Me._verfahrensinhaberPV = Value + End Set + End Property + + + Public Property Ausfuehrer() As AusfuehrerENTyp + Get + Return Me._ausfuehrer + End Get + Set + Me._ausfuehrer = Value + End Set + End Property + + + Public Property Empfaenger() As EmpfaengerENTyp + Get + Return Me._empfaenger + End Get + Set + Me._empfaenger = Value + End Set + End Property + + + Public Property Anmelder() As AnmelderENTyp + Get + Return Me._anmelder + End Get + Set + Me._anmelder = Value + End Set + End Property + + + Public Property VertreterAnmelder() As VertreterAnmelderENTyp + Get + Return Me._vertreterAnmelder + End Get + Set + Me._vertreterAnmelder = Value + End Set + End Property + + + Public Property SubUnternehmer() As SubUnternehmerENTyp + Get + Return Me._subUnternehmer + End Get + Set + Me._subUnternehmer = Value + End Set + End Property + + + Public Property Lieferbedingung() As LieferbedingungENTyp + Get + Return Me._lieferbedingung + End Get + Set + Me._lieferbedingung = Value + End Set + End Property + + + Public Property DateinameAusgangsvermerk() As String + Get + Return Me._dateinameAusgangsvermerk + End Get + Set + Me._dateinameAusgangsvermerk = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(KopfDatenBestaetigungAusfuhrTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize KopfDatenBestaetigungAusfuhrTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes KopfDatenBestaetigungAusfuhrTyp object + ''' + ''' string to deserialize + ''' Output KopfDatenBestaetigungAusfuhrTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As KopfDatenBestaetigungAusfuhrTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, KopfDatenBestaetigungAusfuhrTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As KopfDatenBestaetigungAusfuhrTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As KopfDatenBestaetigungAusfuhrTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), KopfDatenBestaetigungAusfuhrTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As KopfDatenBestaetigungAusfuhrTyp + Return CType(SerializerXml.Deserialize(s), KopfDatenBestaetigungAusfuhrTyp) + End Function +#End Region + + ''' + ''' Serializes current KopfDatenBestaetigungAusfuhrTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an KopfDatenBestaetigungAusfuhrTyp object + ''' + ''' File to load and deserialize + ''' Output KopfDatenBestaetigungAusfuhrTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As KopfDatenBestaetigungAusfuhrTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, KopfDatenBestaetigungAusfuhrTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As KopfDatenBestaetigungAusfuhrTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As KopfDatenBestaetigungAusfuhrTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransaktionExportTyp + +#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(TransaktionExportTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransaktionExportTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransaktionExportTyp object + ''' + ''' string to deserialize + ''' Output TransaktionExportTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransaktionExportTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransaktionExportTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransaktionExportTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransaktionExportTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransaktionExportTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransaktionExportTyp + Return CType(SerializerXml.Deserialize(s), TransaktionExportTyp) + End Function +#End Region + + ''' + ''' Serializes current TransaktionExportTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransaktionExportTyp object + ''' + ''' File to load and deserialize + ''' Output TransaktionExportTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransaktionExportTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransaktionExportTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransaktionExportTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransaktionExportTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DatenaustauschExportTyp + +#Region "Private fields" + Private _transaktion As TransaktionExportTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._transaktion = New TransaktionExportTyp() + End Sub + + + Public Property Transaktion() As TransaktionExportTyp + 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(DatenaustauschExportTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DatenaustauschExportTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DatenaustauschExportTyp object + ''' + ''' string to deserialize + ''' Output DatenaustauschExportTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DatenaustauschExportTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DatenaustauschExportTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DatenaustauschExportTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DatenaustauschExportTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DatenaustauschExportTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DatenaustauschExportTyp + Return CType(SerializerXml.Deserialize(s), DatenaustauschExportTyp) + End Function +#End Region + + ''' + ''' Serializes current DatenaustauschExportTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DatenaustauschExportTyp object + ''' + ''' File to load and deserialize + ''' Output DatenaustauschExportTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DatenaustauschExportTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DatenaustauschExportTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DatenaustauschExportTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DatenaustauschExportTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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/AES/BestaetigungAusfuhr/BestaetigungAusfuhr_007.xsd b/DAKOSY_Worker/DAKOSY/ATLAS/AES/BestaetigungAusfuhr/BestaetigungAusfuhr_007.xsd new file mode 100644 index 0000000..efc0fee --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/AES/BestaetigungAusfuhr/BestaetigungAusfuhr_007.xsd @@ -0,0 +1,524 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/AES/DEXPDF_2023.Designer.vb b/DAKOSY_Worker/DAKOSY/ATLAS/AES/DEXPDF_2023.Designer.vb new file mode 100644 index 0000000..9cdf9bf --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/AES/DEXPDF_2023.Designer.vb @@ -0,0 +1,19576 @@ +'' ------------------------------------------------------------------------------ +'' +'' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com +'' {"TargetFramework":"Net47","NameSpace":"DEXPDF","Language":"VisualBasic","ExcludeImportedTypes":true,"ExpandNestedAttributeGroup":true,"GenerateUnusedComplexType":true,"GenerateUnusedSimpleType":true,"Properties":{},"XmlAttribute":{"Enabled":true},"ClassParams":{},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{"Formating":true},"JsonOutput":{},"Enabled":true},"Miscellaneous":{}} +'' +'' ------------------------------------------------------------------------------ +#Disable Warning +Imports System +Imports System.Diagnostics +Imports System.Xml.Serialization +Imports System.Runtime.Serialization +Imports System.Collections +Imports System.Xml.Schema +Imports System.ComponentModel +Imports System.Xml +Imports System.IO +Imports System.Text +Imports System.Collections.Generic + +Namespace DEXPDF + + + Partial Public Class DEXPDF + +#Region "Private fields" + Private _preparationDateAndTime As Date + + Private _messageIdentification As String + + Private _messageGroup As DEXPDFMessageGroup + + Private _messageType As DEXPDFMessageType + + Private _messageVersion As String + + Private _messageSender As DEXPDFMessageSender + + Private _messageRecipient As DEXPDFMessageRecipient + + Private _exportOperation As DEXPDFExportOperation + + Private _authorisation As List(Of DEXPDFAuthorisation) + + Private _customsOfficeOfPresentation As DEXPDFCustomsOfficeOfPresentation + + Private _customsOfficeOfExport As DEXPDFCustomsOfficeOfExport + + Private _customsOfficeOfSupplement As DEXPDFCustomsOfficeOfSupplement + + Private _customsOfficeOfExitDeclared As DEXPDFCustomsOfficeOfExitDeclared + + Private _customsOfficeOfExitActual As DEXPDFCustomsOfficeOfExitActual + + Private _contractualPartner As DEXPDFContractualPartner + + Private _exporter As DEXPDFExporter + + Private _declarant As DEXPDFDeclarant + + Private _representative As DEXPDFRepresentative + + Private _subContractor As DEXPDFSubContractor + + Private _goodsShipment As DEXPDFGoodsShipment + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsShipment = New DEXPDFGoodsShipment() + Me._subContractor = New DEXPDFSubContractor() + Me._representative = New DEXPDFRepresentative() + Me._declarant = New DEXPDFDeclarant() + Me._exporter = New DEXPDFExporter() + Me._contractualPartner = New DEXPDFContractualPartner() + Me._customsOfficeOfExitActual = New DEXPDFCustomsOfficeOfExitActual() + Me._customsOfficeOfExitDeclared = New DEXPDFCustomsOfficeOfExitDeclared() + Me._customsOfficeOfSupplement = New DEXPDFCustomsOfficeOfSupplement() + Me._customsOfficeOfExport = New DEXPDFCustomsOfficeOfExport() + Me._customsOfficeOfPresentation = New DEXPDFCustomsOfficeOfPresentation() + Me._authorisation = New List(Of DEXPDFAuthorisation)() + Me._exportOperation = New DEXPDFExportOperation() + Me._messageRecipient = New DEXPDFMessageRecipient() + Me._messageSender = New DEXPDFMessageSender() + 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 DEXPDFMessageGroup + Get + Return Me._messageGroup + End Get + Set + Me._messageGroup = Value + End Set + End Property + + Public Property messageType() As DEXPDFMessageType + 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 DEXPDFMessageSender + Get + Return Me._messageSender + End Get + Set + Me._messageSender = Value + End Set + End Property + + Public Property MessageRecipient() As DEXPDFMessageRecipient + Get + Return Me._messageRecipient + End Get + Set + Me._messageRecipient = Value + End Set + End Property + + Public Property ExportOperation() As DEXPDFExportOperation + Get + Return Me._exportOperation + End Get + Set + Me._exportOperation = Value + End Set + End Property + + + Public Property Authorisation() As List(Of DEXPDFAuthorisation) + Get + Return Me._authorisation + End Get + Set + Me._authorisation = Value + End Set + End Property + + Public Property CustomsOfficeOfPresentation() As DEXPDFCustomsOfficeOfPresentation + Get + Return Me._customsOfficeOfPresentation + End Get + Set + Me._customsOfficeOfPresentation = Value + End Set + End Property + + Public Property CustomsOfficeOfExport() As DEXPDFCustomsOfficeOfExport + Get + Return Me._customsOfficeOfExport + End Get + Set + Me._customsOfficeOfExport = Value + End Set + End Property + + Public Property CustomsOfficeOfSupplement() As DEXPDFCustomsOfficeOfSupplement + Get + Return Me._customsOfficeOfSupplement + End Get + Set + Me._customsOfficeOfSupplement = Value + End Set + End Property + + Public Property CustomsOfficeOfExitDeclared() As DEXPDFCustomsOfficeOfExitDeclared + Get + Return Me._customsOfficeOfExitDeclared + End Get + Set + Me._customsOfficeOfExitDeclared = Value + End Set + End Property + + Public Property CustomsOfficeOfExitActual() As DEXPDFCustomsOfficeOfExitActual + Get + Return Me._customsOfficeOfExitActual + End Get + Set + Me._customsOfficeOfExitActual = Value + End Set + End Property + + Public Property ContractualPartner() As DEXPDFContractualPartner + Get + Return Me._contractualPartner + End Get + Set + Me._contractualPartner = Value + End Set + End Property + + Public Property Exporter() As DEXPDFExporter + Get + Return Me._exporter + End Get + Set + Me._exporter = Value + End Set + End Property + + Public Property Declarant() As DEXPDFDeclarant + Get + Return Me._declarant + End Get + Set + Me._declarant = Value + End Set + End Property + + Public Property Representative() As DEXPDFRepresentative + Get + Return Me._representative + End Get + Set + Me._representative = Value + End Set + End Property + + Public Property SubContractor() As DEXPDFSubContractor + Get + Return Me._subContractor + End Get + Set + Me._subContractor = Value + End Set + End Property + + Public Property GoodsShipment() As DEXPDFGoodsShipment + Get + Return Me._goodsShipment + End Get + Set + Me._goodsShipment = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDF)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDF object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDF object + ''' + ''' string to deserialize + ''' Output DEXPDF object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDF, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDF) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDF) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDF + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDF) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDF + Return CType(SerializerXml.Deserialize(s), DEXPDF) + End Function +#End Region + + ''' + ''' Serializes current DEXPDF object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDF object + ''' + ''' File to load and deserialize + ''' Output DEXPDF object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDF, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDF) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDF) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDF + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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 DEXPDFMessageGroup + + EXP + End Enum + + + Public Enum DEXPDFMessageType + + DEXPDF + End Enum + + + Partial Public Class DEXPDFMessageSender + +#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(DEXPDFMessageSender)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFMessageSender object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFMessageSender object + ''' + ''' string to deserialize + ''' Output DEXPDFMessageSender object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFMessageSender, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFMessageSender) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFMessageSender) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFMessageSender + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFMessageSender) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFMessageSender + Return CType(SerializerXml.Deserialize(s), DEXPDFMessageSender) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFMessageSender object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFMessageSender object + ''' + ''' File to load and deserialize + ''' Output DEXPDFMessageSender object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFMessageSender, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFMessageSender) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFMessageSender) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFMessageSender + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFMessageRecipient + +#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(DEXPDFMessageRecipient)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFMessageRecipient object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFMessageRecipient object + ''' + ''' string to deserialize + ''' Output DEXPDFMessageRecipient object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFMessageRecipient, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFMessageRecipient) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFMessageRecipient) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFMessageRecipient + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFMessageRecipient) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFMessageRecipient + Return CType(SerializerXml.Deserialize(s), DEXPDFMessageRecipient) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFMessageRecipient object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFMessageRecipient object + ''' + ''' File to load and deserialize + ''' Output DEXPDFMessageRecipient object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFMessageRecipient, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFMessageRecipient) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFMessageRecipient) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFMessageRecipient + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFExportOperation + +#Region "Private fields" + Private _lRN As String + + Private _declarationType As String + + Private _exportDeclarationType As DEXPDFExportOperationExportDeclarationType + + Private _partyConstellation As DEXPDFExportOperationPartyConstellation + + Private _declarationSubmissionDateAndTime As Date + + Private _decisiveDate As Date + + Private _exitDate As Date + + Private _presentationStartDateAndTime As Date + + Private _loadingEndDateAndTime As Date + + Private _security As String + + Private _specificCircumstanceIndicator As String + + Private _totalAmountInvoiced As Decimal + + Private _invoiceCurrency 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 exportDeclarationType() As DEXPDFExportOperationExportDeclarationType + Get + Return Me._exportDeclarationType + End Get + Set + Me._exportDeclarationType = Value + End Set + End Property + + Public Property partyConstellation() As DEXPDFExportOperationPartyConstellation + Get + Return Me._partyConstellation + End Get + Set + Me._partyConstellation = Value + End Set + End Property + + Public Property declarationSubmissionDateAndTime() As Date + Get + Return Me._declarationSubmissionDateAndTime + End Get + Set + Me._declarationSubmissionDateAndTime = Value + End Set + End Property + + + Public Property decisiveDate() As Date + Get + Return Me._decisiveDate + End Get + Set + Me._decisiveDate = Value + End Set + End Property + + + Public Property exitDate() As Date + Get + Return Me._exitDate + End Get + Set + Me._exitDate = Value + End Set + End Property + + Public Property presentationStartDateAndTime() As Date + Get + Return Me._presentationStartDateAndTime + End Get + Set + Me._presentationStartDateAndTime = Value + End Set + End Property + + Public Property loadingEndDateAndTime() As Date + Get + Return Me._loadingEndDateAndTime + End Get + Set + Me._loadingEndDateAndTime = 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 specificCircumstanceIndicator() As String + Get + Return Me._specificCircumstanceIndicator + End Get + Set + Me._specificCircumstanceIndicator = Value + End Set + End Property + + Public Property totalAmountInvoiced() As Decimal + Get + Return Me._totalAmountInvoiced + End Get + Set + Me._totalAmountInvoiced = Value + End Set + End Property + + Public Property invoiceCurrency() As String + Get + Return Me._invoiceCurrency + End Get + Set + Me._invoiceCurrency = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFExportOperation)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFExportOperation object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFExportOperation object + ''' + ''' string to deserialize + ''' Output DEXPDFExportOperation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFExportOperation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFExportOperation) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFExportOperation) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFExportOperation + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFExportOperation) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFExportOperation + Return CType(SerializerXml.Deserialize(s), DEXPDFExportOperation) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFExportOperation object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFExportOperation object + ''' + ''' File to load and deserialize + ''' Output DEXPDFExportOperation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFExportOperation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFExportOperation) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFExportOperation) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFExportOperation + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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 DEXPDFExportOperationExportDeclarationType + + + Item00000100 + + + Item00000110 + + + Item00000200 + + + Item00000210 + + + Item00000400 + + + Item00000901 + + + Item00000902 + + + Item00001300 + + + Item00001310 + + + Item00001410 + + + Item00110100 + + + Item00110110 + + + Item00110200 + + + Item00110210 + + + Item00110400 + + + Item00111300 + + + Item00111310 + + + Item00111410 + + + Item00120100 + + + Item00120110 + + + Item00120200 + + + Item00120210 + + + Item00200100 + + + Item00200110 + + + Item00200200 + + + Item00200210 + + + Item00200400 + + + Item00201300 + + + Item00201310 + + + Item00201410 + + + Item10000000 + + + Item10000400 + + + Item10110000 + + + Item10110400 + + + Item10200000 + + + Item10200400 + + + Item11000000 + + + Item11110000 + + + Item11120000 + + + Item11200000 + + + Item12000000 + + + Item12110000 + + + Item12120000 + + + Item12200000 + + + Item13000000 + + + Item20000000 + End Enum + + + Public Enum DEXPDFExportOperationPartyConstellation + + + Item0000 + + + Item0001 + + + Item0010 + + + Item0011 + + + Item0100 + + + Item0101 + + + Item0110 + + + Item0111 + + + Item1000 + + + Item1010 + + + Item1100 + + + Item1110 + End Enum + + + Partial Public Class DEXPDFAuthorisation + +#Region "Private fields" + Private _sequenceNumber As String + + Private _type As DEXPDFAuthorisationType + + 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 DEXPDFAuthorisationType + 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(DEXPDFAuthorisation)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFAuthorisation object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFAuthorisation object + ''' + ''' string to deserialize + ''' Output DEXPDFAuthorisation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFAuthorisation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFAuthorisation) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFAuthorisation) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFAuthorisation + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFAuthorisation) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFAuthorisation + Return CType(SerializerXml.Deserialize(s), DEXPDFAuthorisation) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFAuthorisation object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFAuthorisation object + ''' + ''' File to load and deserialize + ''' Output DEXPDFAuthorisation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFAuthorisation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFAuthorisation) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFAuthorisation) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFAuthorisation + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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 DEXPDFAuthorisationType + + C019 + + C512 + + C513 + + C514 + + C517 + + C518 + + C519 + End Enum + + + Partial Public Class DEXPDFCustomsOfficeOfPresentation + +#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(DEXPDFCustomsOfficeOfPresentation)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFCustomsOfficeOfPresentation object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFCustomsOfficeOfPresentation object + ''' + ''' string to deserialize + ''' Output DEXPDFCustomsOfficeOfPresentation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFCustomsOfficeOfPresentation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFCustomsOfficeOfPresentation) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFCustomsOfficeOfPresentation) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFCustomsOfficeOfPresentation + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFCustomsOfficeOfPresentation) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFCustomsOfficeOfPresentation + Return CType(SerializerXml.Deserialize(s), DEXPDFCustomsOfficeOfPresentation) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFCustomsOfficeOfPresentation object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFCustomsOfficeOfPresentation object + ''' + ''' File to load and deserialize + ''' Output DEXPDFCustomsOfficeOfPresentation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFCustomsOfficeOfPresentation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFCustomsOfficeOfPresentation) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFCustomsOfficeOfPresentation) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFCustomsOfficeOfPresentation + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFCustomsOfficeOfExport + +#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(DEXPDFCustomsOfficeOfExport)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFCustomsOfficeOfExport object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFCustomsOfficeOfExport object + ''' + ''' string to deserialize + ''' Output DEXPDFCustomsOfficeOfExport object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFCustomsOfficeOfExport, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFCustomsOfficeOfExport) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFCustomsOfficeOfExport) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFCustomsOfficeOfExport + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFCustomsOfficeOfExport) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFCustomsOfficeOfExport + Return CType(SerializerXml.Deserialize(s), DEXPDFCustomsOfficeOfExport) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFCustomsOfficeOfExport object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFCustomsOfficeOfExport object + ''' + ''' File to load and deserialize + ''' Output DEXPDFCustomsOfficeOfExport object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFCustomsOfficeOfExport, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFCustomsOfficeOfExport) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFCustomsOfficeOfExport) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFCustomsOfficeOfExport + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFCustomsOfficeOfSupplement + +#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(DEXPDFCustomsOfficeOfSupplement)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFCustomsOfficeOfSupplement object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFCustomsOfficeOfSupplement object + ''' + ''' string to deserialize + ''' Output DEXPDFCustomsOfficeOfSupplement object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFCustomsOfficeOfSupplement, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFCustomsOfficeOfSupplement) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFCustomsOfficeOfSupplement) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFCustomsOfficeOfSupplement + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFCustomsOfficeOfSupplement) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFCustomsOfficeOfSupplement + Return CType(SerializerXml.Deserialize(s), DEXPDFCustomsOfficeOfSupplement) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFCustomsOfficeOfSupplement object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFCustomsOfficeOfSupplement object + ''' + ''' File to load and deserialize + ''' Output DEXPDFCustomsOfficeOfSupplement object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFCustomsOfficeOfSupplement, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFCustomsOfficeOfSupplement) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFCustomsOfficeOfSupplement) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFCustomsOfficeOfSupplement + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFCustomsOfficeOfExitDeclared + +#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(DEXPDFCustomsOfficeOfExitDeclared)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFCustomsOfficeOfExitDeclared object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFCustomsOfficeOfExitDeclared object + ''' + ''' string to deserialize + ''' Output DEXPDFCustomsOfficeOfExitDeclared object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFCustomsOfficeOfExitDeclared, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFCustomsOfficeOfExitDeclared) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFCustomsOfficeOfExitDeclared) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFCustomsOfficeOfExitDeclared + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFCustomsOfficeOfExitDeclared) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFCustomsOfficeOfExitDeclared + Return CType(SerializerXml.Deserialize(s), DEXPDFCustomsOfficeOfExitDeclared) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFCustomsOfficeOfExitDeclared object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFCustomsOfficeOfExitDeclared object + ''' + ''' File to load and deserialize + ''' Output DEXPDFCustomsOfficeOfExitDeclared object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFCustomsOfficeOfExitDeclared, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFCustomsOfficeOfExitDeclared) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFCustomsOfficeOfExitDeclared) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFCustomsOfficeOfExitDeclared + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFCustomsOfficeOfExitActual + +#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(DEXPDFCustomsOfficeOfExitActual)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFCustomsOfficeOfExitActual object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFCustomsOfficeOfExitActual object + ''' + ''' string to deserialize + ''' Output DEXPDFCustomsOfficeOfExitActual object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFCustomsOfficeOfExitActual, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFCustomsOfficeOfExitActual) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFCustomsOfficeOfExitActual) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFCustomsOfficeOfExitActual + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFCustomsOfficeOfExitActual) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFCustomsOfficeOfExitActual + Return CType(SerializerXml.Deserialize(s), DEXPDFCustomsOfficeOfExitActual) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFCustomsOfficeOfExitActual object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFCustomsOfficeOfExitActual object + ''' + ''' File to load and deserialize + ''' Output DEXPDFCustomsOfficeOfExitActual object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFCustomsOfficeOfExitActual, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFCustomsOfficeOfExitActual) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFCustomsOfficeOfExitActual) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFCustomsOfficeOfExitActual + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFContractualPartner + +#Region "Private fields" + Private _identificationNumber As String + + Private _subsidiaryNumber As String + + Private _name As String + + Private _address As DEXPDFContractualPartnerAddress + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._address = New DEXPDFContractualPartnerAddress() + 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 DEXPDFContractualPartnerAddress + Get + Return Me._address + End Get + Set + Me._address = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFContractualPartner)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFContractualPartner object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFContractualPartner object + ''' + ''' string to deserialize + ''' Output DEXPDFContractualPartner object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFContractualPartner, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFContractualPartner) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFContractualPartner) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFContractualPartner + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFContractualPartner) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFContractualPartner + Return CType(SerializerXml.Deserialize(s), DEXPDFContractualPartner) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFContractualPartner object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFContractualPartner object + ''' + ''' File to load and deserialize + ''' Output DEXPDFContractualPartner object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFContractualPartner, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFContractualPartner) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFContractualPartner) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFContractualPartner + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFContractualPartnerAddress + +#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(DEXPDFContractualPartnerAddress)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFContractualPartnerAddress object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFContractualPartnerAddress object + ''' + ''' string to deserialize + ''' Output DEXPDFContractualPartnerAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFContractualPartnerAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFContractualPartnerAddress) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFContractualPartnerAddress) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFContractualPartnerAddress + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFContractualPartnerAddress) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFContractualPartnerAddress + Return CType(SerializerXml.Deserialize(s), DEXPDFContractualPartnerAddress) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFContractualPartnerAddress object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFContractualPartnerAddress object + ''' + ''' File to load and deserialize + ''' Output DEXPDFContractualPartnerAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFContractualPartnerAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFContractualPartnerAddress) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFContractualPartnerAddress) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFContractualPartnerAddress + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFExporter + +#Region "Private fields" + Private _identificationNumber As String + + Private _subsidiaryNumber As String + + Private _name As String + + Private _address As DEXPDFExporterAddress + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._address = New DEXPDFExporterAddress() + 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 DEXPDFExporterAddress + Get + Return Me._address + End Get + Set + Me._address = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFExporter)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFExporter object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFExporter object + ''' + ''' string to deserialize + ''' Output DEXPDFExporter object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFExporter, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFExporter) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFExporter) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFExporter + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFExporter) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFExporter + Return CType(SerializerXml.Deserialize(s), DEXPDFExporter) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFExporter object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFExporter object + ''' + ''' File to load and deserialize + ''' Output DEXPDFExporter object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFExporter, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFExporter) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFExporter) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFExporter + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFExporterAddress + +#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(DEXPDFExporterAddress)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFExporterAddress object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFExporterAddress object + ''' + ''' string to deserialize + ''' Output DEXPDFExporterAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFExporterAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFExporterAddress) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFExporterAddress) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFExporterAddress + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFExporterAddress) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFExporterAddress + Return CType(SerializerXml.Deserialize(s), DEXPDFExporterAddress) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFExporterAddress object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFExporterAddress object + ''' + ''' File to load and deserialize + ''' Output DEXPDFExporterAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFExporterAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFExporterAddress) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFExporterAddress) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFExporterAddress + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFDeclarant + +#Region "Private fields" + Private _identificationNumber As String + + Private _subsidiaryNumber As String + + Private _name As String + + Private _address As DEXPDFDeclarantAddress + + Private _contactPerson As DEXPDFDeclarantContactPerson + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contactPerson = New DEXPDFDeclarantContactPerson() + Me._address = New DEXPDFDeclarantAddress() + 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 DEXPDFDeclarantAddress + Get + Return Me._address + End Get + Set + Me._address = Value + End Set + End Property + + Public Property ContactPerson() As DEXPDFDeclarantContactPerson + 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(DEXPDFDeclarant)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFDeclarant object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFDeclarant object + ''' + ''' string to deserialize + ''' Output DEXPDFDeclarant object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFDeclarant, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFDeclarant) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFDeclarant) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFDeclarant + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFDeclarant) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFDeclarant + Return CType(SerializerXml.Deserialize(s), DEXPDFDeclarant) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFDeclarant object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFDeclarant object + ''' + ''' File to load and deserialize + ''' Output DEXPDFDeclarant object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFDeclarant, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFDeclarant) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFDeclarant) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFDeclarant + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFDeclarantAddress + +#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(DEXPDFDeclarantAddress)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFDeclarantAddress object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFDeclarantAddress object + ''' + ''' string to deserialize + ''' Output DEXPDFDeclarantAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFDeclarantAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFDeclarantAddress) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFDeclarantAddress) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFDeclarantAddress + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFDeclarantAddress) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFDeclarantAddress + Return CType(SerializerXml.Deserialize(s), DEXPDFDeclarantAddress) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFDeclarantAddress object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFDeclarantAddress object + ''' + ''' File to load and deserialize + ''' Output DEXPDFDeclarantAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFDeclarantAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFDeclarantAddress) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFDeclarantAddress) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFDeclarantAddress + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFDeclarantContactPerson + +#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(DEXPDFDeclarantContactPerson)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFDeclarantContactPerson object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFDeclarantContactPerson object + ''' + ''' string to deserialize + ''' Output DEXPDFDeclarantContactPerson object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFDeclarantContactPerson, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFDeclarantContactPerson) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFDeclarantContactPerson) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFDeclarantContactPerson + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFDeclarantContactPerson) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFDeclarantContactPerson + Return CType(SerializerXml.Deserialize(s), DEXPDFDeclarantContactPerson) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFDeclarantContactPerson object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFDeclarantContactPerson object + ''' + ''' File to load and deserialize + ''' Output DEXPDFDeclarantContactPerson object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFDeclarantContactPerson, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFDeclarantContactPerson) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFDeclarantContactPerson) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFDeclarantContactPerson + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFRepresentative + +#Region "Private fields" + Private _identificationNumber As String + + Private _subsidiaryNumber As String + + Private _contactPerson As DEXPDFRepresentativeContactPerson + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contactPerson = New DEXPDFRepresentativeContactPerson() + 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 DEXPDFRepresentativeContactPerson + 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(DEXPDFRepresentative)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFRepresentative object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFRepresentative object + ''' + ''' string to deserialize + ''' Output DEXPDFRepresentative object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFRepresentative, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFRepresentative) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFRepresentative) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFRepresentative + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFRepresentative) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFRepresentative + Return CType(SerializerXml.Deserialize(s), DEXPDFRepresentative) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFRepresentative object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFRepresentative object + ''' + ''' File to load and deserialize + ''' Output DEXPDFRepresentative object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFRepresentative, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFRepresentative) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFRepresentative) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFRepresentative + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFRepresentativeContactPerson + +#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(DEXPDFRepresentativeContactPerson)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFRepresentativeContactPerson object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFRepresentativeContactPerson object + ''' + ''' string to deserialize + ''' Output DEXPDFRepresentativeContactPerson object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFRepresentativeContactPerson, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFRepresentativeContactPerson) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFRepresentativeContactPerson) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFRepresentativeContactPerson + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFRepresentativeContactPerson) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFRepresentativeContactPerson + Return CType(SerializerXml.Deserialize(s), DEXPDFRepresentativeContactPerson) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFRepresentativeContactPerson object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFRepresentativeContactPerson object + ''' + ''' File to load and deserialize + ''' Output DEXPDFRepresentativeContactPerson object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFRepresentativeContactPerson, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFRepresentativeContactPerson) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFRepresentativeContactPerson) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFRepresentativeContactPerson + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFSubContractor + +#Region "Private fields" + Private _identificationNumber As String + + Private _subsidiaryNumber As String + + Private _name As String + + Private _address As DEXPDFSubContractorAddress + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._address = New DEXPDFSubContractorAddress() + 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 DEXPDFSubContractorAddress + Get + Return Me._address + End Get + Set + Me._address = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFSubContractor)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFSubContractor object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFSubContractor object + ''' + ''' string to deserialize + ''' Output DEXPDFSubContractor object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFSubContractor, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFSubContractor) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFSubContractor) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFSubContractor + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFSubContractor) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFSubContractor + Return CType(SerializerXml.Deserialize(s), DEXPDFSubContractor) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFSubContractor object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFSubContractor object + ''' + ''' File to load and deserialize + ''' Output DEXPDFSubContractor object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFSubContractor, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFSubContractor) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFSubContractor) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFSubContractor + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFSubContractorAddress + +#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(DEXPDFSubContractorAddress)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFSubContractorAddress object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFSubContractorAddress object + ''' + ''' string to deserialize + ''' Output DEXPDFSubContractorAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFSubContractorAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFSubContractorAddress) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFSubContractorAddress) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFSubContractorAddress + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFSubContractorAddress) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFSubContractorAddress + Return CType(SerializerXml.Deserialize(s), DEXPDFSubContractorAddress) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFSubContractorAddress object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFSubContractorAddress object + ''' + ''' File to load and deserialize + ''' Output DEXPDFSubContractorAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFSubContractorAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFSubContractorAddress) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFSubContractorAddress) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFSubContractorAddress + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipment + +#Region "Private fields" + Private _natureOfTransaction As String + + Private _countryOfExport As String + + Private _countryOfDestination As String + + Private _additionalSupplyChainActor As List(Of DEXPDFGoodsShipmentAdditionalSupplyChainActor) + + Private _deliveryTerms As DEXPDFGoodsShipmentDeliveryTerms + + Private _outwardProcessing As DEXPDFGoodsShipmentOutwardProcessing + + Private _previousDocument As List(Of DEXPDFGoodsShipmentPreviousDocument) + + Private _supportingDocument As List(Of DEXPDFGoodsShipmentSupportingDocument) + + Private _additionalReference As List(Of DEXPDFGoodsShipmentAdditionalReference) + + Private _additionalInformation As List(Of DEXPDFGoodsShipmentAdditionalInformation) + + Private _consignment As DEXPDFGoodsShipmentConsignment + + Private _goodsItem As List(Of DEXPDFGoodsShipmentGoodsItem) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsItem = New List(Of DEXPDFGoodsShipmentGoodsItem)() + Me._consignment = New DEXPDFGoodsShipmentConsignment() + Me._additionalInformation = New List(Of DEXPDFGoodsShipmentAdditionalInformation)() + Me._additionalReference = New List(Of DEXPDFGoodsShipmentAdditionalReference)() + Me._supportingDocument = New List(Of DEXPDFGoodsShipmentSupportingDocument)() + Me._previousDocument = New List(Of DEXPDFGoodsShipmentPreviousDocument)() + Me._outwardProcessing = New DEXPDFGoodsShipmentOutwardProcessing() + Me._deliveryTerms = New DEXPDFGoodsShipmentDeliveryTerms() + Me._additionalSupplyChainActor = New List(Of DEXPDFGoodsShipmentAdditionalSupplyChainActor)() + End Sub + + Public Property natureOfTransaction() As String + Get + Return Me._natureOfTransaction + End Get + Set + Me._natureOfTransaction = Value + End Set + End Property + + Public Property countryOfExport() As String + Get + Return Me._countryOfExport + End Get + Set + Me._countryOfExport = Value + End Set + End Property + + Public Property countryOfDestination() As String + Get + Return Me._countryOfDestination + End Get + Set + Me._countryOfDestination = Value + End Set + End Property + + + Public Property AdditionalSupplyChainActor() As List(Of DEXPDFGoodsShipmentAdditionalSupplyChainActor) + Get + Return Me._additionalSupplyChainActor + End Get + Set + Me._additionalSupplyChainActor = Value + End Set + End Property + + Public Property DeliveryTerms() As DEXPDFGoodsShipmentDeliveryTerms + Get + Return Me._deliveryTerms + End Get + Set + Me._deliveryTerms = Value + End Set + End Property + + Public Property OutwardProcessing() As DEXPDFGoodsShipmentOutwardProcessing + Get + Return Me._outwardProcessing + End Get + Set + Me._outwardProcessing = Value + End Set + End Property + + + Public Property PreviousDocument() As List(Of DEXPDFGoodsShipmentPreviousDocument) + Get + Return Me._previousDocument + End Get + Set + Me._previousDocument = Value + End Set + End Property + + + Public Property SupportingDocument() As List(Of DEXPDFGoodsShipmentSupportingDocument) + Get + Return Me._supportingDocument + End Get + Set + Me._supportingDocument = Value + End Set + End Property + + + Public Property AdditionalReference() As List(Of DEXPDFGoodsShipmentAdditionalReference) + Get + Return Me._additionalReference + End Get + Set + Me._additionalReference = Value + End Set + End Property + + + Public Property AdditionalInformation() As List(Of DEXPDFGoodsShipmentAdditionalInformation) + Get + Return Me._additionalInformation + End Get + Set + Me._additionalInformation = Value + End Set + End Property + + Public Property Consignment() As DEXPDFGoodsShipmentConsignment + Get + Return Me._consignment + End Get + Set + Me._consignment = Value + End Set + End Property + + + Public Property GoodsItem() As List(Of DEXPDFGoodsShipmentGoodsItem) + Get + Return Me._goodsItem + End Get + Set + Me._goodsItem = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipment)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipment object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipment object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipment object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipment, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipment) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipment) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipment + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipment) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipment + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipment) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipment object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipment object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipment object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipment, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipment) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipment) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipment + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentAdditionalSupplyChainActor + +#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(DEXPDFGoodsShipmentAdditionalSupplyChainActor)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentAdditionalSupplyChainActor object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentAdditionalSupplyChainActor object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentAdditionalSupplyChainActor object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentAdditionalSupplyChainActor, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentAdditionalSupplyChainActor) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentAdditionalSupplyChainActor) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentAdditionalSupplyChainActor + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentAdditionalSupplyChainActor) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentAdditionalSupplyChainActor + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentAdditionalSupplyChainActor) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentAdditionalSupplyChainActor object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentAdditionalSupplyChainActor object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentAdditionalSupplyChainActor object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentAdditionalSupplyChainActor, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentAdditionalSupplyChainActor) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentAdditionalSupplyChainActor) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentAdditionalSupplyChainActor + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentDeliveryTerms + +#Region "Private fields" + Private _incotermCode As String + + Private _uNLocode As String + + Private _location As String + + Private _country As String + + Private _text As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Property incotermCode() As String + Get + Return Me._incotermCode + End Get + Set + Me._incotermCode = Value + End Set + End Property + + Public Property UNLocode() As String + Get + Return Me._uNLocode + End Get + Set + Me._uNLocode = Value + End Set + End Property + + Public Property 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 + + 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(DEXPDFGoodsShipmentDeliveryTerms)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentDeliveryTerms object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentDeliveryTerms object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentDeliveryTerms object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentDeliveryTerms, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentDeliveryTerms) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentDeliveryTerms) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentDeliveryTerms + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentDeliveryTerms) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentDeliveryTerms + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentDeliveryTerms) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentDeliveryTerms object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentDeliveryTerms object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentDeliveryTerms object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentDeliveryTerms, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentDeliveryTerms) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentDeliveryTerms) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentDeliveryTerms + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentOutwardProcessing + +#Region "Private fields" + Private _reimport As List(Of DEXPDFGoodsShipmentOutwardProcessingReimport) + + Private _identificationMeans As List(Of DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans) + + Private _product As List(Of DEXPDFGoodsShipmentOutwardProcessingProduct) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._product = New List(Of DEXPDFGoodsShipmentOutwardProcessingProduct)() + Me._identificationMeans = New List(Of DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans)() + Me._reimport = New List(Of DEXPDFGoodsShipmentOutwardProcessingReimport)() + End Sub + + + Public Property Reimport() As List(Of DEXPDFGoodsShipmentOutwardProcessingReimport) + Get + Return Me._reimport + End Get + Set + Me._reimport = Value + End Set + End Property + + + Public Property IdentificationMeans() As List(Of DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans) + Get + Return Me._identificationMeans + End Get + Set + Me._identificationMeans = Value + End Set + End Property + + + Public Property Product() As List(Of DEXPDFGoodsShipmentOutwardProcessingProduct) + Get + Return Me._product + End Get + Set + Me._product = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentOutwardProcessing)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentOutwardProcessing object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentOutwardProcessing object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentOutwardProcessing object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessing, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentOutwardProcessing) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessing) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentOutwardProcessing + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentOutwardProcessing) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentOutwardProcessing + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentOutwardProcessing) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentOutwardProcessing object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentOutwardProcessing object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentOutwardProcessing object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessing, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentOutwardProcessing) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessing) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentOutwardProcessing + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentOutwardProcessingReimport + +#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(DEXPDFGoodsShipmentOutwardProcessingReimport)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentOutwardProcessingReimport object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentOutwardProcessingReimport object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentOutwardProcessingReimport object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingReimport, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentOutwardProcessingReimport) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingReimport) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentOutwardProcessingReimport + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentOutwardProcessingReimport) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentOutwardProcessingReimport + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentOutwardProcessingReimport) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentOutwardProcessingReimport object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentOutwardProcessingReimport object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentOutwardProcessingReimport object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingReimport, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentOutwardProcessingReimport) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingReimport) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentOutwardProcessingReimport + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans + +#Region "Private fields" + Private _sequenceNumber As String + + Private _type As DEXPDFGoodsShipmentOutwardProcessingIdentificationMeansType + + Private _description 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 DEXPDFGoodsShipmentOutwardProcessingIdentificationMeansType + Get + Return Me._type + End Get + Set + Me._type = Value + End Set + End Property + + Public Property description() As String + Get + Return Me._description + End Get + Set + Me._description = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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 DEXPDFGoodsShipmentOutwardProcessingIdentificationMeansType + + A + + B + + N + + O + + P + + S + + T + + Z + End Enum + + + Partial Public Class DEXPDFGoodsShipmentOutwardProcessingProduct + +#Region "Private fields" + Private _sequenceNumber As String + + Private _commodity As DEXPDFGoodsShipmentOutwardProcessingProductCommodity + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._commodity = New DEXPDFGoodsShipmentOutwardProcessingProductCommodity() + End Sub + + + Public Property sequenceNumber() As String + Get + Return Me._sequenceNumber + End Get + Set + Me._sequenceNumber = Value + End Set + End Property + + Public Property Commodity() As DEXPDFGoodsShipmentOutwardProcessingProductCommodity + 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(DEXPDFGoodsShipmentOutwardProcessingProduct)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentOutwardProcessingProduct object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentOutwardProcessingProduct object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentOutwardProcessingProduct object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingProduct, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentOutwardProcessingProduct) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingProduct) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentOutwardProcessingProduct + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentOutwardProcessingProduct) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentOutwardProcessingProduct + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentOutwardProcessingProduct) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentOutwardProcessingProduct object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentOutwardProcessingProduct object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentOutwardProcessingProduct object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingProduct, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentOutwardProcessingProduct) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingProduct) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentOutwardProcessingProduct + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentOutwardProcessingProductCommodity + +#Region "Private fields" + Private _descriptionOfGoods As String + + Private _commodityCode As DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._commodityCode = New DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode() + End Sub + + Public Property descriptionOfGoods() As String + Get + Return Me._descriptionOfGoods + End Get + Set + Me._descriptionOfGoods = Value + End Set + End Property + + Public Property CommodityCode() As DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode + Get + Return Me._commodityCode + End Get + Set + Me._commodityCode = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentOutwardProcessingProductCommodity)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentOutwardProcessingProductCommodity object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentOutwardProcessingProductCommodity object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentOutwardProcessingProductCommodity object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingProductCommodity, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentOutwardProcessingProductCommodity) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingProductCommodity) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentOutwardProcessingProductCommodity + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentOutwardProcessingProductCommodity) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentOutwardProcessingProductCommodity + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentOutwardProcessingProductCommodity) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentOutwardProcessingProductCommodity object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentOutwardProcessingProductCommodity object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentOutwardProcessingProductCommodity object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingProductCommodity, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentOutwardProcessingProductCommodity) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingProductCommodity) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentOutwardProcessingProductCommodity + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode + +#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(DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentPreviousDocument + +#Region "Private fields" + Private _sequenceNumber As String + + Private _type As String + + Private _qualifier 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 qualifier() As String + Get + Return Me._qualifier + End Get + Set + Me._qualifier = Value + End Set + End Property + + Public Property referenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentPreviousDocument)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentPreviousDocument object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentPreviousDocument object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentPreviousDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentPreviousDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentPreviousDocument) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentPreviousDocument) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentPreviousDocument + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentPreviousDocument) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentPreviousDocument + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentPreviousDocument) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentPreviousDocument object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentPreviousDocument object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentPreviousDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentPreviousDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentPreviousDocument) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentPreviousDocument) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentPreviousDocument + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentSupportingDocument + +#Region "Private fields" + Private _sequenceNumber As String + + Private _type As String + + Private _qualifier As String + + Private _referenceNumber As String + + Private _documentLineItemNumber As String + + Private _issuingAuthorityName As String + + Private _issuingDate As Date + + Private _validityDate As Date + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property 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 qualifier() As String + Get + Return Me._qualifier + End Get + Set + Me._qualifier = Value + End Set + End Property + + Public Property referenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + + Public Property documentLineItemNumber() As String + Get + Return Me._documentLineItemNumber + End Get + Set + Me._documentLineItemNumber = Value + End Set + End Property + + Public Property issuingAuthorityName() As String + Get + Return Me._issuingAuthorityName + End Get + Set + Me._issuingAuthorityName = Value + End Set + End Property + + + Public Property issuingDate() As Date + Get + Return Me._issuingDate + End Get + Set + Me._issuingDate = Value + End Set + End Property + + + Public Property validityDate() As Date + Get + Return Me._validityDate + End Get + Set + Me._validityDate = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentSupportingDocument)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentSupportingDocument object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentSupportingDocument object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentSupportingDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentSupportingDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentSupportingDocument) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentSupportingDocument) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentSupportingDocument + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentSupportingDocument) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentSupportingDocument + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentSupportingDocument) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentSupportingDocument object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentSupportingDocument object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentSupportingDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentSupportingDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentSupportingDocument) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentSupportingDocument) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentSupportingDocument + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentAdditionalReference + +#Region "Private fields" + Private _sequenceNumber As String + + Private _type As String + + Private _qualifier 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 qualifier() As String + Get + Return Me._qualifier + End Get + Set + Me._qualifier = Value + End Set + End Property + + Public Property referenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentAdditionalReference)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentAdditionalReference object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentAdditionalReference object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentAdditionalReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentAdditionalReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentAdditionalReference) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentAdditionalReference) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentAdditionalReference + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentAdditionalReference) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentAdditionalReference + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentAdditionalReference) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentAdditionalReference object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentAdditionalReference object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentAdditionalReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentAdditionalReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentAdditionalReference) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentAdditionalReference) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentAdditionalReference + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentAdditionalInformation + +#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(DEXPDFGoodsShipmentAdditionalInformation)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentAdditionalInformation object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentAdditionalInformation object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentAdditionalInformation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentAdditionalInformation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentAdditionalInformation) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentAdditionalInformation) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentAdditionalInformation + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentAdditionalInformation) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentAdditionalInformation + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentAdditionalInformation) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentAdditionalInformation object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentAdditionalInformation object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentAdditionalInformation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentAdditionalInformation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentAdditionalInformation) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentAdditionalInformation) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentAdditionalInformation + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentConsignment + +#Region "Private fields" + Private _containerIndicator As DEXPDFGoodsShipmentConsignmentContainerIndicator + + Private _inlandModeOfTransport As String + + Private _modeOfTransportAtTheBorder As String + + Private _grossMass As Decimal + + Private _referenceNumberUCR As String + + Private _registrationNumberExternal As String + + Private _carrier As DEXPDFGoodsShipmentConsignmentCarrier + + Private _consignor As DEXPDFGoodsShipmentConsignmentConsignor + + Private _consignee As DEXPDFGoodsShipmentConsignmentConsignee + + Private _transportEquipment As List(Of DEXPDFGoodsShipmentConsignmentTransportEquipment) + + Private _locationOfGoods As DEXPDFGoodsShipmentConsignmentLocationOfGoods + + Private _departureTransportMeans As List(Of DEXPDFGoodsShipmentConsignmentDepartureTransportMeans) + + Private _countryOfRoutingOfConsignment As List(Of DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment) + + Private _activeBorderTransportMeans As DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans + + Private _transportDocument As List(Of DEXPDFGoodsShipmentConsignmentTransportDocument) + + Private _transportCharges As DEXPDFGoodsShipmentConsignmentTransportCharges + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._transportCharges = New DEXPDFGoodsShipmentConsignmentTransportCharges() + Me._transportDocument = New List(Of DEXPDFGoodsShipmentConsignmentTransportDocument)() + Me._activeBorderTransportMeans = New DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans() + Me._countryOfRoutingOfConsignment = New List(Of DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment)() + Me._departureTransportMeans = New List(Of DEXPDFGoodsShipmentConsignmentDepartureTransportMeans)() + Me._locationOfGoods = New DEXPDFGoodsShipmentConsignmentLocationOfGoods() + Me._transportEquipment = New List(Of DEXPDFGoodsShipmentConsignmentTransportEquipment)() + Me._consignee = New DEXPDFGoodsShipmentConsignmentConsignee() + Me._consignor = New DEXPDFGoodsShipmentConsignmentConsignor() + Me._carrier = New DEXPDFGoodsShipmentConsignmentCarrier() + End Sub + + Public Property containerIndicator() As DEXPDFGoodsShipmentConsignmentContainerIndicator + 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 registrationNumberExternal() As String + Get + Return Me._registrationNumberExternal + End Get + Set + Me._registrationNumberExternal = Value + End Set + End Property + + Public Property Carrier() As DEXPDFGoodsShipmentConsignmentCarrier + Get + Return Me._carrier + End Get + Set + Me._carrier = Value + End Set + End Property + + Public Property Consignor() As DEXPDFGoodsShipmentConsignmentConsignor + Get + Return Me._consignor + End Get + Set + Me._consignor = Value + End Set + End Property + + Public Property Consignee() As DEXPDFGoodsShipmentConsignmentConsignee + Get + Return Me._consignee + End Get + Set + Me._consignee = Value + End Set + End Property + + + Public Property TransportEquipment() As List(Of DEXPDFGoodsShipmentConsignmentTransportEquipment) + Get + Return Me._transportEquipment + End Get + Set + Me._transportEquipment = Value + End Set + End Property + + Public Property LocationOfGoods() As DEXPDFGoodsShipmentConsignmentLocationOfGoods + Get + Return Me._locationOfGoods + End Get + Set + Me._locationOfGoods = Value + End Set + End Property + + + Public Property DepartureTransportMeans() As List(Of DEXPDFGoodsShipmentConsignmentDepartureTransportMeans) + Get + Return Me._departureTransportMeans + End Get + Set + Me._departureTransportMeans = Value + End Set + End Property + + + Public Property CountryOfRoutingOfConsignment() As List(Of DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment) + Get + Return Me._countryOfRoutingOfConsignment + End Get + Set + Me._countryOfRoutingOfConsignment = Value + End Set + End Property + + Public Property ActiveBorderTransportMeans() As DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans + Get + Return Me._activeBorderTransportMeans + End Get + Set + Me._activeBorderTransportMeans = Value + End Set + End Property + + + Public Property TransportDocument() As List(Of DEXPDFGoodsShipmentConsignmentTransportDocument) + Get + Return Me._transportDocument + End Get + Set + Me._transportDocument = Value + End Set + End Property + + Public Property TransportCharges() As DEXPDFGoodsShipmentConsignmentTransportCharges + Get + Return Me._transportCharges + End Get + Set + Me._transportCharges = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentConsignment)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentConsignment object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentConsignment object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentConsignment object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignment, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignment) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignment) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignment + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignment) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignment + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignment) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentConsignment object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignment object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentConsignment object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignment, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignment) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignment) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignment + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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 DEXPDFGoodsShipmentConsignmentContainerIndicator + + + Item0 + + + Item1 + End Enum + + + Partial Public Class DEXPDFGoodsShipmentConsignmentCarrier + +#Region "Private fields" + Private _identificationNumber As String + + Private _subsidiaryNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Property identificationNumber() As String + Get + Return Me._identificationNumber + End Get + Set + Me._identificationNumber = Value + End Set + End Property + + Public Property subsidiaryNumber() As String + Get + Return Me._subsidiaryNumber + End Get + Set + Me._subsidiaryNumber = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentConsignmentCarrier)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentConsignmentCarrier object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentConsignmentCarrier object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentConsignmentCarrier object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentCarrier, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentCarrier) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentCarrier) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentCarrier + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentCarrier) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentCarrier + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentCarrier) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentConsignmentCarrier object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentCarrier object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentConsignmentCarrier object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentCarrier, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentCarrier) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentCarrier) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentCarrier + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentConsignmentConsignor + +#Region "Private fields" + Private _identificationNumber As String + + Private _subsidiaryNumber As String + + Private _name As String + + Private _address As DEXPDFGoodsShipmentConsignmentConsignorAddress + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._address = New DEXPDFGoodsShipmentConsignmentConsignorAddress() + 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 DEXPDFGoodsShipmentConsignmentConsignorAddress + Get + Return Me._address + End Get + Set + Me._address = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentConsignmentConsignor)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentConsignmentConsignor object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentConsignmentConsignor object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentConsignmentConsignor object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsignor, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentConsignor) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsignor) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentConsignor + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentConsignor) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentConsignor + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentConsignor) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentConsignmentConsignor object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentConsignor object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentConsignmentConsignor object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsignor, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentConsignor) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsignor) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentConsignor + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentConsignmentConsignorAddress + +#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(DEXPDFGoodsShipmentConsignmentConsignorAddress)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentConsignmentConsignorAddress object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentConsignmentConsignorAddress object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentConsignmentConsignorAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsignorAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentConsignorAddress) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsignorAddress) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentConsignorAddress + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentConsignorAddress) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentConsignorAddress + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentConsignorAddress) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentConsignmentConsignorAddress object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentConsignorAddress object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentConsignmentConsignorAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsignorAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentConsignorAddress) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsignorAddress) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentConsignorAddress + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentConsignmentConsignee + +#Region "Private fields" + Private _identificationNumber As String + + Private _subsidiaryNumber As String + + Private _name As String + + Private _address As DEXPDFGoodsShipmentConsignmentConsigneeAddress + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._address = New DEXPDFGoodsShipmentConsignmentConsigneeAddress() + 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 DEXPDFGoodsShipmentConsignmentConsigneeAddress + Get + Return Me._address + End Get + Set + Me._address = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentConsignmentConsignee)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentConsignmentConsignee object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentConsignmentConsignee object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentConsignmentConsignee object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsignee, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentConsignee) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsignee) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentConsignee + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentConsignee) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentConsignee + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentConsignee) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentConsignmentConsignee object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentConsignee object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentConsignmentConsignee object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsignee, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentConsignee) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsignee) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentConsignee + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentConsignmentConsigneeAddress + +#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(DEXPDFGoodsShipmentConsignmentConsigneeAddress)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentConsignmentConsigneeAddress object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentConsignmentConsigneeAddress object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentConsignmentConsigneeAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsigneeAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentConsigneeAddress) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsigneeAddress) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentConsigneeAddress + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentConsigneeAddress) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentConsigneeAddress + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentConsigneeAddress) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentConsignmentConsigneeAddress object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentConsigneeAddress object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentConsignmentConsigneeAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsigneeAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentConsigneeAddress) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentConsigneeAddress) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentConsigneeAddress + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentConsignmentTransportEquipment + +#Region "Private fields" + Private _sequenceNumber As String + + Private _containerIdentificationNumber As String + + Private _numberOfSeals As DEXPDFGoodsShipmentConsignmentTransportEquipmentNumberOfSeals + + Private _seal As List(Of DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal) + + Private _goodsReference As List(Of DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsReference = New List(Of DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference)() + Me._seal = New List(Of DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal)() + 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 DEXPDFGoodsShipmentConsignmentTransportEquipmentNumberOfSeals + Get + Return Me._numberOfSeals + End Get + Set + Me._numberOfSeals = Value + End Set + End Property + + + Public Property Seal() As List(Of DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal) + Get + Return Me._seal + End Get + Set + Me._seal = Value + End Set + End Property + + + Public Property GoodsReference() As List(Of DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference) + 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(DEXPDFGoodsShipmentConsignmentTransportEquipment)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentConsignmentTransportEquipment object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentConsignmentTransportEquipment object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentConsignmentTransportEquipment object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportEquipment, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentTransportEquipment) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportEquipment) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentTransportEquipment + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentTransportEquipment) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentTransportEquipment + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentTransportEquipment) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentConsignmentTransportEquipment object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentTransportEquipment object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentConsignmentTransportEquipment object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportEquipment, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentTransportEquipment) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportEquipment) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentTransportEquipment + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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 DEXPDFGoodsShipmentConsignmentTransportEquipmentNumberOfSeals + + + Item0 + End Enum + + + Partial Public Class DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal + +#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(DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference + +#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(DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentConsignmentLocationOfGoods + +#Region "Private fields" + Private _typeOfLocation As DEXPDFGoodsShipmentConsignmentLocationOfGoodsTypeOfLocation + + Private _qualifierOfIdentification As DEXPDFGoodsShipmentConsignmentLocationOfGoodsQualifierOfIdentification + + Private _authorisationNumber As String + + Private _additionalIdentifier As String + + Private _uNLocode As String + + Private _gNSS As DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS + + Private _address As DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress + + Private _contactPerson As DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contactPerson = New DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson() + Me._address = New DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress() + Me._gNSS = New DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS() + End Sub + + Public Property typeOfLocation() As DEXPDFGoodsShipmentConsignmentLocationOfGoodsTypeOfLocation + Get + Return Me._typeOfLocation + End Get + Set + Me._typeOfLocation = Value + End Set + End Property + + Public Property qualifierOfIdentification() As DEXPDFGoodsShipmentConsignmentLocationOfGoodsQualifierOfIdentification + Get + Return Me._qualifierOfIdentification + End Get + Set + Me._qualifierOfIdentification = Value + End Set + End Property + + Public Property authorisationNumber() As String + Get + Return Me._authorisationNumber + End Get + Set + Me._authorisationNumber = Value + End Set + End Property + + Public Property additionalIdentifier() As String + Get + Return Me._additionalIdentifier + End Get + Set + Me._additionalIdentifier = Value + End Set + End Property + + Public Property UNLocode() As String + Get + Return Me._uNLocode + End Get + Set + Me._uNLocode = Value + End Set + End Property + + Public Property GNSS() As DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS + Get + Return Me._gNSS + End Get + Set + Me._gNSS = Value + End Set + End Property + + Public Property Address() As DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress + Get + Return Me._address + End Get + Set + Me._address = Value + End Set + End Property + + Public Property ContactPerson() As DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson + 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(DEXPDFGoodsShipmentConsignmentLocationOfGoods)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentConsignmentLocationOfGoods object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentConsignmentLocationOfGoods object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentConsignmentLocationOfGoods object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoods, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentLocationOfGoods) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoods) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentLocationOfGoods + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentLocationOfGoods) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentLocationOfGoods + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentLocationOfGoods) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentConsignmentLocationOfGoods object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentLocationOfGoods object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentConsignmentLocationOfGoods object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoods, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentLocationOfGoods) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoods) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentLocationOfGoods + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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 DEXPDFGoodsShipmentConsignmentLocationOfGoodsTypeOfLocation + + A + + B + + D + End Enum + + + Public Enum DEXPDFGoodsShipmentConsignmentLocationOfGoodsQualifierOfIdentification + + U + + V + + W + + Y + + Z + End Enum + + + Partial Public Class DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS + +#Region "Private fields" + Private _latitude As String + + Private _longitude As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + 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 + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress + +#Region "Private fields" + Private _complementOfInformation As String + + 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 complementOfInformation() As String + Get + Return Me._complementOfInformation + End Get + Set + Me._complementOfInformation = Value + End Set + End Property + + Public Property streetAndNumber() As String + Get + Return Me._streetAndNumber + End Get + Set + Me._streetAndNumber = Value + End Set + End Property + + Public Property 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(DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson + +#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(DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentConsignmentDepartureTransportMeans + +#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(DEXPDFGoodsShipmentConsignmentDepartureTransportMeans)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentConsignmentDepartureTransportMeans object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentConsignmentDepartureTransportMeans object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentConsignmentDepartureTransportMeans object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentDepartureTransportMeans, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentDepartureTransportMeans) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentDepartureTransportMeans) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentDepartureTransportMeans + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentDepartureTransportMeans) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentDepartureTransportMeans + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentDepartureTransportMeans) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentConsignmentDepartureTransportMeans object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentDepartureTransportMeans object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentConsignmentDepartureTransportMeans object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentDepartureTransportMeans, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentDepartureTransportMeans) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentDepartureTransportMeans) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentDepartureTransportMeans + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment + +#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(DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans + +#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(DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentConsignmentTransportDocument + +#Region "Private fields" + Private _sequenceNumber As String + + Private _type As String + + Private _qualifier 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 qualifier() As String + Get + Return Me._qualifier + End Get + Set + Me._qualifier = Value + End Set + End Property + + Public Property referenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentConsignmentTransportDocument)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentConsignmentTransportDocument object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentConsignmentTransportDocument object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentConsignmentTransportDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentTransportDocument) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportDocument) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentTransportDocument + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentTransportDocument) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentTransportDocument + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentTransportDocument) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentConsignmentTransportDocument object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentTransportDocument object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentConsignmentTransportDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentTransportDocument) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportDocument) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentTransportDocument + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentConsignmentTransportCharges + +#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(DEXPDFGoodsShipmentConsignmentTransportCharges)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentConsignmentTransportCharges object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentConsignmentTransportCharges object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentConsignmentTransportCharges object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportCharges, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentTransportCharges) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportCharges) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentConsignmentTransportCharges + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentConsignmentTransportCharges) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentConsignmentTransportCharges + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentConsignmentTransportCharges) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentConsignmentTransportCharges object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentTransportCharges object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentConsignmentTransportCharges object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportCharges, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentConsignmentTransportCharges) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentConsignmentTransportCharges) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentConsignmentTransportCharges + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentGoodsItem + +#Region "Private fields" + Private _sequenceNumber As String + + Private _declarationGoodsItemNumber As String + + Private _statisticalValue As Decimal + + Private _natureOfTransaction As String + + Private _countryOfExport As String + + Private _referenceNumberUCR As String + + Private _registrationNumberExternal As String + + Private _authorisation As List(Of DEXPDFGoodsShipmentGoodsItemAuthorisation) + + Private _procedure As DEXPDFGoodsShipmentGoodsItemProcedure + + Private _consignor As DEXPDFGoodsShipmentGoodsItemConsignor + + Private _consignee As DEXPDFGoodsShipmentGoodsItemConsignee + + Private _additionalSupplyChainActor As List(Of DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor) + + Private _origin As DEXPDFGoodsShipmentGoodsItemOrigin + + Private _commodity As DEXPDFGoodsShipmentGoodsItemCommodity + + Private _packaging As List(Of DEXPDFGoodsShipmentGoodsItemPackaging) + + Private _previousDocument As List(Of DEXPDFGoodsShipmentGoodsItemPreviousDocument) + + Private _supportingDocument As List(Of DEXPDFGoodsShipmentGoodsItemSupportingDocument) + + Private _additionalReference As List(Of DEXPDFGoodsShipmentGoodsItemAdditionalReference) + + Private _additionalInformation As List(Of DEXPDFGoodsShipmentGoodsItemAdditionalInformation) + + Private _transportCharges As DEXPDFGoodsShipmentGoodsItemTransportCharges + + Private _outwardProcessing As DEXPDFGoodsShipmentGoodsItemOutwardProcessing + + Private _procedureTransference As DEXPDFGoodsShipmentGoodsItemProcedureTransference + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._procedureTransference = New DEXPDFGoodsShipmentGoodsItemProcedureTransference() + Me._outwardProcessing = New DEXPDFGoodsShipmentGoodsItemOutwardProcessing() + Me._transportCharges = New DEXPDFGoodsShipmentGoodsItemTransportCharges() + Me._additionalInformation = New List(Of DEXPDFGoodsShipmentGoodsItemAdditionalInformation)() + Me._additionalReference = New List(Of DEXPDFGoodsShipmentGoodsItemAdditionalReference)() + Me._supportingDocument = New List(Of DEXPDFGoodsShipmentGoodsItemSupportingDocument)() + Me._previousDocument = New List(Of DEXPDFGoodsShipmentGoodsItemPreviousDocument)() + Me._packaging = New List(Of DEXPDFGoodsShipmentGoodsItemPackaging)() + Me._commodity = New DEXPDFGoodsShipmentGoodsItemCommodity() + Me._origin = New DEXPDFGoodsShipmentGoodsItemOrigin() + Me._additionalSupplyChainActor = New List(Of DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor)() + Me._consignee = New DEXPDFGoodsShipmentGoodsItemConsignee() + Me._consignor = New DEXPDFGoodsShipmentGoodsItemConsignor() + Me._procedure = New DEXPDFGoodsShipmentGoodsItemProcedure() + Me._authorisation = New List(Of DEXPDFGoodsShipmentGoodsItemAuthorisation)() + End Sub + + + 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 + + Public Property statisticalValue() As Decimal + Get + Return Me._statisticalValue + End Get + Set + Me._statisticalValue = Value + End Set + End Property + + Public Property natureOfTransaction() As String + Get + Return Me._natureOfTransaction + End Get + Set + Me._natureOfTransaction = Value + End Set + End Property + + Public Property countryOfExport() As String + Get + Return Me._countryOfExport + End Get + Set + Me._countryOfExport = 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 registrationNumberExternal() As String + Get + Return Me._registrationNumberExternal + End Get + Set + Me._registrationNumberExternal = Value + End Set + End Property + + + Public Property Authorisation() As List(Of DEXPDFGoodsShipmentGoodsItemAuthorisation) + Get + Return Me._authorisation + End Get + Set + Me._authorisation = Value + End Set + End Property + + Public Property Procedure() As DEXPDFGoodsShipmentGoodsItemProcedure + Get + Return Me._procedure + End Get + Set + Me._procedure = Value + End Set + End Property + + Public Property Consignor() As DEXPDFGoodsShipmentGoodsItemConsignor + Get + Return Me._consignor + End Get + Set + Me._consignor = Value + End Set + End Property + + Public Property Consignee() As DEXPDFGoodsShipmentGoodsItemConsignee + Get + Return Me._consignee + End Get + Set + Me._consignee = Value + End Set + End Property + + + Public Property AdditionalSupplyChainActor() As List(Of DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor) + Get + Return Me._additionalSupplyChainActor + End Get + Set + Me._additionalSupplyChainActor = Value + End Set + End Property + + Public Property Origin() As DEXPDFGoodsShipmentGoodsItemOrigin + Get + Return Me._origin + End Get + Set + Me._origin = Value + End Set + End Property + + Public Property Commodity() As DEXPDFGoodsShipmentGoodsItemCommodity + Get + Return Me._commodity + End Get + Set + Me._commodity = Value + End Set + End Property + + + Public Property Packaging() As List(Of DEXPDFGoodsShipmentGoodsItemPackaging) + Get + Return Me._packaging + End Get + Set + Me._packaging = Value + End Set + End Property + + + Public Property PreviousDocument() As List(Of DEXPDFGoodsShipmentGoodsItemPreviousDocument) + Get + Return Me._previousDocument + End Get + Set + Me._previousDocument = Value + End Set + End Property + + + Public Property SupportingDocument() As List(Of DEXPDFGoodsShipmentGoodsItemSupportingDocument) + Get + Return Me._supportingDocument + End Get + Set + Me._supportingDocument = Value + End Set + End Property + + + Public Property AdditionalReference() As List(Of DEXPDFGoodsShipmentGoodsItemAdditionalReference) + Get + Return Me._additionalReference + End Get + Set + Me._additionalReference = Value + End Set + End Property + + + Public Property AdditionalInformation() As List(Of DEXPDFGoodsShipmentGoodsItemAdditionalInformation) + Get + Return Me._additionalInformation + End Get + Set + Me._additionalInformation = Value + End Set + End Property + + Public Property TransportCharges() As DEXPDFGoodsShipmentGoodsItemTransportCharges + Get + Return Me._transportCharges + End Get + Set + Me._transportCharges = Value + End Set + End Property + + Public Property OutwardProcessing() As DEXPDFGoodsShipmentGoodsItemOutwardProcessing + Get + Return Me._outwardProcessing + End Get + Set + Me._outwardProcessing = Value + End Set + End Property + + Public Property ProcedureTransference() As DEXPDFGoodsShipmentGoodsItemProcedureTransference + 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(DEXPDFGoodsShipmentGoodsItem)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItem object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItem object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItem object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItem, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItem) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItem) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItem + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItem) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItem + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItem) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItem object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItem object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItem object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItem, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItem) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItem) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItem + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemAuthorisation + +#Region "Private fields" + Private _sequenceNumber As String + + Private _type As DEXPDFGoodsShipmentGoodsItemAuthorisationType + + Private _referenceNumber As String + + Private _holderOfAuthorisation 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 DEXPDFGoodsShipmentGoodsItemAuthorisationType + Get + Return Me._type + End Get + Set + Me._type = Value + End Set + End Property + + Public Property referenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + Public Property holderOfAuthorisation() As String + Get + Return Me._holderOfAuthorisation + End Get + Set + Me._holderOfAuthorisation = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemAuthorisation)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemAuthorisation object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemAuthorisation object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemAuthorisation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAuthorisation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemAuthorisation) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAuthorisation) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemAuthorisation + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemAuthorisation) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemAuthorisation + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemAuthorisation) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemAuthorisation object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemAuthorisation object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemAuthorisation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAuthorisation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemAuthorisation) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAuthorisation) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemAuthorisation + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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 DEXPDFGoodsShipmentGoodsItemAuthorisationType + + C019 + + C516 + + C601 + + C626 + + C627 + End Enum + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedure + +#Region "Private fields" + Private _requestedProcedure As String + + Private _previousProcedure As String + + Private _additionalProcedure As DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._additionalProcedure = New DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure() + End Sub + + Public Property requestedProcedure() As String + Get + Return Me._requestedProcedure + End Get + Set + Me._requestedProcedure = Value + End Set + End Property + + Public Property previousProcedure() As String + Get + Return Me._previousProcedure + End Get + Set + Me._previousProcedure = Value + End Set + End Property + + Public Property AdditionalProcedure() As DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure + Get + Return Me._additionalProcedure + End Get + Set + Me._additionalProcedure = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemProcedure)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedure object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedure object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedure object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedure, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedure) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedure) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedure + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedure) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedure + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedure) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedure object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedure object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedure object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedure, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedure) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedure) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedure + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure + +#Region "Private fields" + Private _sequenceNumber As DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedureSequenceNumber + + Private _additionalProcedure As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Property sequenceNumber() As DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedureSequenceNumber + Get + Return Me._sequenceNumber + End Get + Set + Me._sequenceNumber = Value + End Set + End Property + + Public Property additionalProcedure() As String + Get + Return Me._additionalProcedure + End Get + Set + Me._additionalProcedure = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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 DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedureSequenceNumber + + + Item1 + End Enum + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemConsignor + +#Region "Private fields" + Private _identificationNumber As String + + Private _subsidiaryNumber As String + + Private _name As String + + Private _address As DEXPDFGoodsShipmentGoodsItemConsignorAddress + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._address = New DEXPDFGoodsShipmentGoodsItemConsignorAddress() + 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 DEXPDFGoodsShipmentGoodsItemConsignorAddress + Get + Return Me._address + End Get + Set + Me._address = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemConsignor)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemConsignor object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemConsignor object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemConsignor object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsignor, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemConsignor) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsignor) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemConsignor + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemConsignor) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemConsignor + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemConsignor) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemConsignor object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemConsignor object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemConsignor object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsignor, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemConsignor) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsignor) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemConsignor + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemConsignorAddress + +#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(DEXPDFGoodsShipmentGoodsItemConsignorAddress)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemConsignorAddress object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemConsignorAddress object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemConsignorAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsignorAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemConsignorAddress) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsignorAddress) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemConsignorAddress + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemConsignorAddress) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemConsignorAddress + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemConsignorAddress) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemConsignorAddress object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemConsignorAddress object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemConsignorAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsignorAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemConsignorAddress) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsignorAddress) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemConsignorAddress + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemConsignee + +#Region "Private fields" + Private _identificationNumber As String + + Private _subsidiaryNumber As String + + Private _name As String + + Private _address As DEXPDFGoodsShipmentGoodsItemConsigneeAddress + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._address = New DEXPDFGoodsShipmentGoodsItemConsigneeAddress() + 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 DEXPDFGoodsShipmentGoodsItemConsigneeAddress + Get + Return Me._address + End Get + Set + Me._address = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemConsignee)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemConsignee object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemConsignee object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemConsignee object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsignee, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemConsignee) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsignee) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemConsignee + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemConsignee) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemConsignee + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemConsignee) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemConsignee object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemConsignee object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemConsignee object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsignee, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemConsignee) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsignee) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemConsignee + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemConsigneeAddress + +#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(DEXPDFGoodsShipmentGoodsItemConsigneeAddress)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemConsigneeAddress object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemConsigneeAddress object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemConsigneeAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsigneeAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemConsigneeAddress) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsigneeAddress) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemConsigneeAddress + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemConsigneeAddress) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemConsigneeAddress + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemConsigneeAddress) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemConsigneeAddress object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemConsigneeAddress object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemConsigneeAddress object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsigneeAddress, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemConsigneeAddress) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemConsigneeAddress) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemConsigneeAddress + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor + +#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(DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemOrigin + +#Region "Private fields" + Private _countryOfOrigin As String + + Private _regionOfDispatch As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Property countryOfOrigin() As String + Get + Return Me._countryOfOrigin + End Get + Set + Me._countryOfOrigin = Value + End Set + End Property + + Public Property regionOfDispatch() As String + Get + Return Me._regionOfDispatch + End Get + Set + Me._regionOfDispatch = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemOrigin)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemOrigin object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemOrigin object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemOrigin object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemOrigin, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemOrigin) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemOrigin) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemOrigin + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemOrigin) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemOrigin + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemOrigin) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemOrigin object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemOrigin object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemOrigin object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemOrigin, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemOrigin) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemOrigin) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemOrigin + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemCommodity + +#Region "Private fields" + Private _descriptionOfGoods As String + + Private _cusCode As String + + Private _commodityCode As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode + + Private _dangerousGoods As List(Of DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods) + + Private _goodsMeasure As DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsMeasure = New DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure() + Me._dangerousGoods = New List(Of DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods)() + Me._commodityCode = New DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode() + 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 DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode + Get + Return Me._commodityCode + End Get + Set + Me._commodityCode = Value + End Set + End Property + + + Public Property DangerousGoods() As List(Of DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods) + Get + Return Me._dangerousGoods + End Get + Set + Me._dangerousGoods = Value + End Set + End Property + + Public Property GoodsMeasure() As DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure + 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(DEXPDFGoodsShipmentGoodsItemCommodity)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemCommodity object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemCommodity object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemCommodity object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodity, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemCommodity) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodity) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemCommodity + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemCommodity) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemCommodity + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemCommodity) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemCommodity object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemCommodity object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemCommodity object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodity, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemCommodity) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodity) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemCommodity + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode + +#Region "Private fields" + Private _harmonizedSystemSubHeadingCode As String + + Private _combinedNomenclatureCode As String + + Private _tARICAdditionalCode As List(Of DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._tARICAdditionalCode = New List(Of DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode)() + 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 TARICAdditionalCode() As List(Of DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode) + Get + Return Me._tARICAdditionalCode + End Get + Set + Me._tARICAdditionalCode = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode + +#Region "Private fields" + Private _sequenceNumber As String + + Private _taricAdditionalCode 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 taricAdditionalCode() As String + Get + Return Me._taricAdditionalCode + End Get + Set + Me._taricAdditionalCode = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods + +#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(DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure + +#Region "Private fields" + Private _grossMass As Decimal + + Private _netMass As Decimal + + Private _supplementaryUnits 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 + + Public Property supplementaryUnits() As Decimal + Get + Return Me._supplementaryUnits + End Get + Set + Me._supplementaryUnits = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemPackaging + +#Region "Private fields" + Private _sequenceNumber As String + + Private _typeOfPackages As String + + Private _numberOfPackages As String + + Private _shippingMarks As String + + Private _packageReference As DEXPDFGoodsShipmentGoodsItemPackagingPackageReference + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._packageReference = New DEXPDFGoodsShipmentGoodsItemPackagingPackageReference() + 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 DEXPDFGoodsShipmentGoodsItemPackagingPackageReference + 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(DEXPDFGoodsShipmentGoodsItemPackaging)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemPackaging object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemPackaging object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemPackaging object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemPackaging, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemPackaging) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemPackaging) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemPackaging + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemPackaging) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemPackaging + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemPackaging) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemPackaging object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemPackaging object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemPackaging object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemPackaging, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemPackaging) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemPackaging) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemPackaging + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemPackagingPackageReference + +#Region "Private fields" + Private _declarationGoodsItemNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + 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(DEXPDFGoodsShipmentGoodsItemPackagingPackageReference)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemPackagingPackageReference object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemPackagingPackageReference object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemPackagingPackageReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemPackagingPackageReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemPackagingPackageReference) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemPackagingPackageReference) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemPackagingPackageReference + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemPackagingPackageReference) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemPackagingPackageReference + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemPackagingPackageReference) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemPackagingPackageReference object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemPackagingPackageReference object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemPackagingPackageReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemPackagingPackageReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemPackagingPackageReference) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemPackagingPackageReference) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemPackagingPackageReference + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemPreviousDocument + +#Region "Private fields" + Private _sequenceNumber As String + + Private _type As String + + Private _qualifier As String + + Private _referenceNumber As String + + Private _goodsItemNumber As String + + Private _measurementUnitAndQualifier As String + + Private _quantity As Decimal + + Private _complementOfInformation As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property 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 qualifier() As String + Get + Return Me._qualifier + End Get + Set + Me._qualifier = Value + End Set + End Property + + Public Property referenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + + Public Property goodsItemNumber() As String + Get + Return Me._goodsItemNumber + End Get + Set + Me._goodsItemNumber = Value + End Set + End Property + + Public Property measurementUnitAndQualifier() As String + Get + Return Me._measurementUnitAndQualifier + End Get + Set + Me._measurementUnitAndQualifier = Value + End Set + End Property + + Public Property quantity() As Decimal + Get + Return Me._quantity + End Get + Set + Me._quantity = Value + End Set + End Property + + Public Property complementOfInformation() As String + Get + Return Me._complementOfInformation + End Get + Set + Me._complementOfInformation = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemPreviousDocument)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemPreviousDocument object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemPreviousDocument object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemPreviousDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemPreviousDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemPreviousDocument) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemPreviousDocument) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemPreviousDocument + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemPreviousDocument) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemPreviousDocument + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemPreviousDocument) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemPreviousDocument object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemPreviousDocument object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemPreviousDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemPreviousDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemPreviousDocument) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemPreviousDocument) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemPreviousDocument + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemSupportingDocument + +#Region "Private fields" + Private _sequenceNumber As String + + Private _type As String + + Private _qualifier As String + + Private _referenceNumber As String + + Private _documentLineItemNumber As String + + Private _complementOfInformation As String + + Private _detail As String + + Private _issuingAuthorityName As String + + Private _issuingDate As Date + + Private _validityDate As Date + + Private _measurementUnitAndQualifier As String + + Private _complementaryUnit As DEXPDFGoodsShipmentGoodsItemSupportingDocumentComplementaryUnit + + Private _quantity As Decimal + + Private _currency As String + + Private _amount As Decimal + + 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 qualifier() As String + Get + Return Me._qualifier + End Get + Set + Me._qualifier = Value + End Set + End Property + + Public Property referenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + + Public Property documentLineItemNumber() As String + Get + Return Me._documentLineItemNumber + End Get + Set + Me._documentLineItemNumber = Value + End Set + End Property + + Public Property complementOfInformation() As String + Get + Return Me._complementOfInformation + End Get + Set + Me._complementOfInformation = Value + End Set + End Property + + Public Property detail() As String + Get + Return Me._detail + End Get + Set + Me._detail = Value + End Set + End Property + + Public Property issuingAuthorityName() As String + Get + Return Me._issuingAuthorityName + End Get + Set + Me._issuingAuthorityName = Value + End Set + End Property + + + Public Property issuingDate() As Date + Get + Return Me._issuingDate + End Get + Set + Me._issuingDate = Value + End Set + End Property + + + Public Property validityDate() As Date + Get + Return Me._validityDate + End Get + Set + Me._validityDate = Value + End Set + End Property + + Public Property measurementUnitAndQualifier() As String + Get + Return Me._measurementUnitAndQualifier + End Get + Set + Me._measurementUnitAndQualifier = Value + End Set + End Property + + Public Property complementaryUnit() As DEXPDFGoodsShipmentGoodsItemSupportingDocumentComplementaryUnit + Get + Return Me._complementaryUnit + End Get + Set + Me._complementaryUnit = Value + End Set + End Property + + Public Property quantity() As Decimal + Get + Return Me._quantity + End Get + Set + Me._quantity = Value + End Set + End Property + + Public Property currency() As String + Get + Return Me._currency + End Get + Set + Me._currency = Value + End Set + End Property + + Public Property amount() As Decimal + Get + Return Me._amount + End Get + Set + Me._amount = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemSupportingDocument)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemSupportingDocument object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemSupportingDocument object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemSupportingDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemSupportingDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemSupportingDocument) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemSupportingDocument) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemSupportingDocument + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemSupportingDocument) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemSupportingDocument + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemSupportingDocument) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemSupportingDocument object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemSupportingDocument object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemSupportingDocument object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemSupportingDocument, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemSupportingDocument) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemSupportingDocument) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemSupportingDocument + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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 DEXPDFGoodsShipmentGoodsItemSupportingDocumentComplementaryUnit + + Los + + Mio + + Paar + + Satz + + St + + Syst + + cbm + + cm + + div + + g + + gPu + + gTh + + gU + + kg + + kgPu + + kgTh + + kgU + + km + + l + + lfm + + ltAnlage + + m + + mg + + ml + + mm + + qcm + + qm + + t + + tU + + µg + + µl + + µm + End Enum + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemAdditionalReference + +#Region "Private fields" + Private _sequenceNumber As String + + Private _type As String + + Private _qualifier As String + + Private _referenceNumber As String + + Private _detail As String + + Private _currency As String + + Private _amount As Decimal + + 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 qualifier() As String + Get + Return Me._qualifier + End Get + Set + Me._qualifier = Value + End Set + End Property + + Public Property referenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + Public Property detail() As String + Get + Return Me._detail + End Get + Set + Me._detail = Value + End Set + End Property + + Public Property currency() As String + Get + Return Me._currency + End Get + Set + Me._currency = Value + End Set + End Property + + Public Property amount() As Decimal + Get + Return Me._amount + End Get + Set + Me._amount = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemAdditionalReference)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemAdditionalReference object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemAdditionalReference object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemAdditionalReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAdditionalReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemAdditionalReference) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAdditionalReference) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemAdditionalReference + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemAdditionalReference) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemAdditionalReference + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemAdditionalReference) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemAdditionalReference object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemAdditionalReference object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemAdditionalReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAdditionalReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemAdditionalReference) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAdditionalReference) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemAdditionalReference + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemAdditionalInformation + +#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(DEXPDFGoodsShipmentGoodsItemAdditionalInformation)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemAdditionalInformation object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemAdditionalInformation object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemAdditionalInformation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAdditionalInformation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemAdditionalInformation) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAdditionalInformation) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemAdditionalInformation + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemAdditionalInformation) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemAdditionalInformation + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemAdditionalInformation) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemAdditionalInformation object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemAdditionalInformation object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemAdditionalInformation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAdditionalInformation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemAdditionalInformation) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemAdditionalInformation) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemAdditionalInformation + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemTransportCharges + +#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(DEXPDFGoodsShipmentGoodsItemTransportCharges)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemTransportCharges object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemTransportCharges object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemTransportCharges object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemTransportCharges, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemTransportCharges) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemTransportCharges) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemTransportCharges + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemTransportCharges) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemTransportCharges + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemTransportCharges) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemTransportCharges object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemTransportCharges object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemTransportCharges object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemTransportCharges, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemTransportCharges) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemTransportCharges) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemTransportCharges + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemOutwardProcessing + +#Region "Private fields" + Private _replacement As DEXPDFGoodsShipmentGoodsItemOutwardProcessingReplacement + + Private _reimportDate As Date + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Property replacement() As DEXPDFGoodsShipmentGoodsItemOutwardProcessingReplacement + Get + Return Me._replacement + End Get + Set + Me._replacement = Value + End Set + End Property + + + Public Property reimportDate() As Date + Get + Return Me._reimportDate + End Get + Set + Me._reimportDate = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DEXPDFGoodsShipmentGoodsItemOutwardProcessing)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemOutwardProcessing object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemOutwardProcessing object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemOutwardProcessing object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemOutwardProcessing, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemOutwardProcessing) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemOutwardProcessing) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemOutwardProcessing + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemOutwardProcessing) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemOutwardProcessing + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemOutwardProcessing) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemOutwardProcessing object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemOutwardProcessing object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemOutwardProcessing object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemOutwardProcessing, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemOutwardProcessing) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemOutwardProcessing) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemOutwardProcessing + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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 DEXPDFGoodsShipmentGoodsItemOutwardProcessingReplacement + + + Item0 + + + Item1 + End Enum + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureTransference + +#Region "Private fields" + Private _customsWarehousing As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing + + Private _inwardProcessing As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._inwardProcessing = New DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing() + Me._customsWarehousing = New DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing() + End Sub + + Public Property CustomsWarehousing() As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing + Get + Return Me._customsWarehousing + End Get + Set + Me._customsWarehousing = Value + End Set + End Property + + Public Property InwardProcessing() As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing + 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(DEXPDFGoodsShipmentGoodsItemProcedureTransference)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransference object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransference object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransference) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransference) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransference + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureTransference) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureTransference + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureTransference) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransference object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransference object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransference) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransference) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransference + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing + +#Region "Private fields" + Private _lRN As String + + Private _authorisation As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation + + Private _goodsReference As List(Of DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsReference = New List(Of DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference)() + Me._authorisation = New DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation() + 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 DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation + Get + Return Me._authorisation + End Get + Set + Me._authorisation = Value + End Set + End Property + + + Public Property GoodsReference() As List(Of DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference) + 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(DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation + +#Region "Private fields" + Private _type As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisationType + + Private _referenceNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Property type() As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisationType + 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(DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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 DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisationType + + C517 + + C518 + + C519 + End Enum + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference + +#Region "Private fields" + Private _sequenceNumber As String + + Private _accessViaATLAS As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceAccessViaATLAS + + Private _mRN As String + + Private _registrationNumber As String + + Private _goodsItemNumber As String + + Private _usualTreatment As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceUsualTreatment + + Private _complementOfInformation As String + + Private _commodity As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._commodity = New DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity() + 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 DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceAccessViaATLAS + 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 DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceUsualTreatment + Get + Return Me._usualTreatment + End Get + Set + Me._usualTreatment = 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 Commodity() As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity + 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(DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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 DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceAccessViaATLAS + + + Item0 + + + Item1 + End Enum + + + Public Enum DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceUsualTreatment + + + Item0 + + + Item1 + End Enum + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity + +#Region "Private fields" + Private _commodityCode As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode + + Private _goodsReduction As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction + + Private _goodsReductionAfterTreatment As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsReductionAfterTreatment = New DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment() + Me._goodsReduction = New DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction() + Me._commodityCode = New DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode() + End Sub + + Public Property CommodityCode() As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode + Get + Return Me._commodityCode + End Get + Set + Me._commodityCode = Value + End Set + End Property + + Public Property GoodsReduction() As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction + Get + Return Me._goodsReduction + End Get + Set + Me._goodsReduction = Value + End Set + End Property + + Public Property GoodsReductionAfterTreatment() As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment + 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(DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode + +#Region "Private fields" + Private _harmonizedSystemSubHeadingCode As String + + Private _combinedNomenclatureCode As String + + Private _taricCode As String + + Private _nationalAdditionalCode As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._nationalAdditionalCode = New DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode() + 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 DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode + 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(DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode + +#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(DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction + +#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(DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment + +#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(DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing + +#Region "Private fields" + Private _simplyGrantedAuthorisation As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingSimplyGrantedAuthorisation + + Private _authorisation As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation + + Private _customsOfficeOfSupervision As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision + + Private _goodsReference As List(Of DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsReference = New List(Of DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference)() + Me._customsOfficeOfSupervision = New DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision() + Me._authorisation = New DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation() + End Sub + + Public Property simplyGrantedAuthorisation() As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingSimplyGrantedAuthorisation + Get + Return Me._simplyGrantedAuthorisation + End Get + Set + Me._simplyGrantedAuthorisation = Value + End Set + End Property + + Public Property Authorisation() As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation + Get + Return Me._authorisation + End Get + Set + Me._authorisation = Value + End Set + End Property + + Public Property CustomsOfficeOfSupervision() As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision + Get + Return Me._customsOfficeOfSupervision + End Get + Set + Me._customsOfficeOfSupervision = Value + End Set + End Property + + + Public Property GoodsReference() As List(Of DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference) + 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(DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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 DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingSimplyGrantedAuthorisation + + + Item0 + + + Item1 + End Enum + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation + +#Region "Private fields" + Private _type As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisationType + + Private _referenceNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Property type() As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisationType + 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(DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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 DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisationType + + C601 + End Enum + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision + +#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(DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference + +#Region "Private fields" + Private _sequenceNumber As String + + Private _accessViaATLAS As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceAccessViaATLAS + + Private _mRN As String + + Private _registrationNumber As String + + Private _goodsItemNumber As String + + Private _commodity As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._commodity = New DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity() + 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 DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceAccessViaATLAS + 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 DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity + 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(DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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 DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceAccessViaATLAS + + + Item0 + + + Item1 + End Enum + + + Partial Public Class DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity + +#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(DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object + ''' + ''' string to deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity + Return CType(SerializerXml.Deserialize(s), DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity) + End Function +#End Region + + ''' + ''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object + ''' + ''' File to load and deserialize + ''' Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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/AES/DEXPDF_2023.xsd b/DAKOSY_Worker/DAKOSY/ATLAS/AES/DEXPDF_2023.xsd new file mode 100644 index 0000000..ab8058e --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/AES/DEXPDF_2023.xsd @@ -0,0 +1,6705 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/AES/UeberlassungAusfuhr/UeberlassungAusfuhr_007.Designer.vb b/DAKOSY_Worker/DAKOSY/ATLAS/AES/UeberlassungAusfuhr/UeberlassungAusfuhr_007.Designer.vb new file mode 100644 index 0000000..3449b81 --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/AES/UeberlassungAusfuhr/UeberlassungAusfuhr_007.Designer.vb @@ -0,0 +1,18095 @@ +'' ------------------------------------------------------------------------------ +'' +'' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com +'' {"TargetFramework":"Net47","NameSpace":"UeberlassungAusfuhr_007","Language":"VisualBasic","Properties":{},"XmlAttribute":{"Enabled":true},"ClassParams":{},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{},"JsonOutput":{},"Enabled":true},"Miscellaneous":{}} +'' +'' ------------------------------------------------------------------------------ +#Disable Warning +Imports System +Imports System.Diagnostics +Imports System.Xml.Serialization +Imports System.Runtime.Serialization +Imports System.Collections +Imports System.Xml.Schema +Imports System.ComponentModel +Imports System.Xml +Imports System.IO +Imports System.Text +Imports System.Collections.Generic + +Namespace UeberlassungAusfuhr_007 + + + Partial Public Class UeberlassungAusfuhrERTyp + Inherits DatenaustauschExportTyp + +#Region "Private fields" + Private _einzelUeberlassung As List(Of EinzelUeberlassungTyp) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._einzelUeberlassung = New List(Of EinzelUeberlassungTyp)() + End Sub + + + Public Property EinzelUeberlassung() As List(Of EinzelUeberlassungTyp) + Get + Return Me._einzelUeberlassung + End Get + Set + Me._einzelUeberlassung = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(UeberlassungAusfuhrERTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize UeberlassungAusfuhrERTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes UeberlassungAusfuhrERTyp object + ''' + ''' string to deserialize + ''' Output UeberlassungAusfuhrERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As UeberlassungAusfuhrERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, UeberlassungAusfuhrERTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As UeberlassungAusfuhrERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As UeberlassungAusfuhrERTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), UeberlassungAusfuhrERTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As UeberlassungAusfuhrERTyp + Return CType(SerializerXml.Deserialize(s), UeberlassungAusfuhrERTyp) + End Function +#End Region + + ''' + ''' Serializes current UeberlassungAusfuhrERTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an UeberlassungAusfuhrERTyp object + ''' + ''' File to load and deserialize + ''' Output UeberlassungAusfuhrERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As UeberlassungAusfuhrERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, UeberlassungAusfuhrERTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As UeberlassungAusfuhrERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As UeberlassungAusfuhrERTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class EinzelUeberlassungTyp + +#Region "Private fields" + Private _objektIdentifizierung As ObjektIdentifizierungERTyp + + Private _kopfDaten As KopfDatenUeberlassungTyp + + Private _warenPosition As List(Of PositionUeberlassungTyp) + + Private _exportOperation As ExportOperationERType + + Private _goodsItem As List(Of GoodsItemERType) + + Private _attachments As List(Of AttachmentERType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._attachments = New List(Of AttachmentERType)() + Me._goodsItem = New List(Of GoodsItemERType)() + Me._exportOperation = New ExportOperationERType() + Me._warenPosition = New List(Of PositionUeberlassungTyp)() + Me._kopfDaten = New KopfDatenUeberlassungTyp() + Me._objektIdentifizierung = New ObjektIdentifizierungERTyp() + End Sub + + + Public Property ObjektIdentifizierung() As ObjektIdentifizierungERTyp + Get + Return Me._objektIdentifizierung + End Get + Set + Me._objektIdentifizierung = Value + End Set + End Property + + + Public Property KopfDaten() As KopfDatenUeberlassungTyp + Get + Return Me._kopfDaten + End Get + Set + Me._kopfDaten = Value + End Set + End Property + + + Public Property WarenPosition() As List(Of PositionUeberlassungTyp) + Get + Return Me._warenPosition + End Get + Set + Me._warenPosition = Value + End Set + End Property + + + Public Property ExportOperation() As ExportOperationERType + Get + Return Me._exportOperation + End Get + Set + Me._exportOperation = Value + End Set + End Property + + + Public Property GoodsItem() As List(Of GoodsItemERType) + Get + Return Me._goodsItem + End Get + Set + Me._goodsItem = Value + End Set + End Property + + + Public Property Attachments() As List(Of AttachmentERType) + Get + Return Me._attachments + End Get + Set + Me._attachments = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(EinzelUeberlassungTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize EinzelUeberlassungTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes EinzelUeberlassungTyp object + ''' + ''' string to deserialize + ''' Output EinzelUeberlassungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelUeberlassungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EinzelUeberlassungTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelUeberlassungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As EinzelUeberlassungTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), EinzelUeberlassungTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As EinzelUeberlassungTyp + Return CType(SerializerXml.Deserialize(s), EinzelUeberlassungTyp) + End Function +#End Region + + ''' + ''' Serializes current EinzelUeberlassungTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an EinzelUeberlassungTyp object + ''' + ''' File to load and deserialize + ''' Output EinzelUeberlassungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelUeberlassungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EinzelUeberlassungTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelUeberlassungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As EinzelUeberlassungTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ObjektIdentifizierungERTyp + +#Region "Private fields" + Private _objektName As String + + Private _eDIFACTNachrichtenNr As String + + Private _zeitpunktEingang As Date + + Private _shipmentReferenz As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property ObjektName() As String + Get + Return Me._objektName + End Get + Set + Me._objektName = Value + End Set + End Property + + + Public Property EDIFACTNachrichtenNr() As String + Get + Return Me._eDIFACTNachrichtenNr + End Get + Set + Me._eDIFACTNachrichtenNr = Value + End Set + End Property + + + Public Property ZeitpunktEingang() As Date + Get + Return Me._zeitpunktEingang + End Get + Set + Me._zeitpunktEingang = Value + End Set + End Property + + + Public Property ShipmentReferenz() As String + Get + Return Me._shipmentReferenz + End Get + Set + Me._shipmentReferenz = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ObjektIdentifizierungERTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ObjektIdentifizierungERTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ObjektIdentifizierungERTyp object + ''' + ''' string to deserialize + ''' Output ObjektIdentifizierungERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ObjektIdentifizierungERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ObjektIdentifizierungERTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ObjektIdentifizierungERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ObjektIdentifizierungERTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ObjektIdentifizierungERTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ObjektIdentifizierungERTyp + Return CType(SerializerXml.Deserialize(s), ObjektIdentifizierungERTyp) + End Function +#End Region + + ''' + ''' Serializes current ObjektIdentifizierungERTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ObjektIdentifizierungERTyp object + ''' + ''' File to load and deserialize + ''' Output ObjektIdentifizierungERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ObjektIdentifizierungERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ObjektIdentifizierungERTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ObjektIdentifizierungERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ObjektIdentifizierungERTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AttachmentERType + +#Region "Private fields" + Private _technicalContent As String + + Private _originalFilename As String + + Private _fileFormat As String + + Private _dataEncoding As String + + Private _data As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property TechnicalContent() As String + Get + Return Me._technicalContent + End Get + Set + Me._technicalContent = Value + End Set + End Property + + + Public Property OriginalFilename() As String + Get + Return Me._originalFilename + End Get + Set + Me._originalFilename = Value + End Set + End Property + + + Public Property FileFormat() As String + Get + Return Me._fileFormat + End Get + Set + Me._fileFormat = Value + End Set + End Property + + + Public Property DataEncoding() As String + Get + Return Me._dataEncoding + End Get + Set + Me._dataEncoding = Value + End Set + End Property + + + Public Property Data() As String + Get + Return Me._data + End Get + Set + Me._data = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AttachmentERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AttachmentERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AttachmentERType object + ''' + ''' string to deserialize + ''' Output AttachmentERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AttachmentERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AttachmentERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AttachmentERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AttachmentERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AttachmentERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AttachmentERType + Return CType(SerializerXml.Deserialize(s), AttachmentERType) + End Function +#End Region + + ''' + ''' Serializes current AttachmentERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AttachmentERType object + ''' + ''' File to load and deserialize + ''' Output AttachmentERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AttachmentERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AttachmentERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AttachmentERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AttachmentERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class OutwardProcessingGoodsItemERType + +#Region "Private fields" + Private _reimportDate As Date + + Private _replacement As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property ReimportDate() As Date + Get + Return Me._reimportDate + End Get + Set + Me._reimportDate = Value + End Set + End Property + + + Public Property Replacement() As String + Get + Return Me._replacement + End Get + Set + Me._replacement = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(OutwardProcessingGoodsItemERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize OutwardProcessingGoodsItemERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes OutwardProcessingGoodsItemERType object + ''' + ''' string to deserialize + ''' Output OutwardProcessingGoodsItemERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As OutwardProcessingGoodsItemERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, OutwardProcessingGoodsItemERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As OutwardProcessingGoodsItemERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As OutwardProcessingGoodsItemERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), OutwardProcessingGoodsItemERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As OutwardProcessingGoodsItemERType + Return CType(SerializerXml.Deserialize(s), OutwardProcessingGoodsItemERType) + End Function +#End Region + + ''' + ''' Serializes current OutwardProcessingGoodsItemERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an OutwardProcessingGoodsItemERType object + ''' + ''' File to load and deserialize + ''' Output OutwardProcessingGoodsItemERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As OutwardProcessingGoodsItemERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, OutwardProcessingGoodsItemERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As OutwardProcessingGoodsItemERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As OutwardProcessingGoodsItemERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AuthorisationGoodsItemERType + +#Region "Private fields" + Private _type As String + + Private _referenceNumber As String + + Private _holderOfAuthorisation As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Type() As String + Get + Return Me._type + End Get + Set + Me._type = Value + End Set + End Property + + + Public Property ReferenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + + Public Property HolderOfAuthorisation() As String + Get + Return Me._holderOfAuthorisation + End Get + Set + Me._holderOfAuthorisation = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AuthorisationGoodsItemERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AuthorisationGoodsItemERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AuthorisationGoodsItemERType object + ''' + ''' string to deserialize + ''' Output AuthorisationGoodsItemERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AuthorisationGoodsItemERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AuthorisationGoodsItemERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AuthorisationGoodsItemERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AuthorisationGoodsItemERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AuthorisationGoodsItemERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AuthorisationGoodsItemERType + Return CType(SerializerXml.Deserialize(s), AuthorisationGoodsItemERType) + End Function +#End Region + + ''' + ''' Serializes current AuthorisationGoodsItemERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AuthorisationGoodsItemERType object + ''' + ''' File to load and deserialize + ''' Output AuthorisationGoodsItemERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AuthorisationGoodsItemERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AuthorisationGoodsItemERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AuthorisationGoodsItemERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AuthorisationGoodsItemERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class InwardProcessingGoodsReferenceERType + +#Region "Private fields" + Private _goodsItemNumber As String + + Private _mRN As String + + Private _registrationNumber As String + + Private _accessViaATLAS As String + + Private _goodsRelatedData As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property GoodsItemNumber() As String + Get + Return Me._goodsItemNumber + End Get + Set + Me._goodsItemNumber = Value + End Set + End Property + + + Public Property MRN() As String + Get + Return Me._mRN + End Get + Set + Me._mRN = Value + End Set + End Property + + + Public Property RegistrationNumber() As String + Get + Return Me._registrationNumber + End Get + Set + Me._registrationNumber = Value + End Set + End Property + + + Public Property AccessViaATLAS() As String + Get + Return Me._accessViaATLAS + End Get + Set + Me._accessViaATLAS = Value + End Set + End Property + + + Public Property GoodsRelatedData() As String + Get + Return Me._goodsRelatedData + End Get + Set + Me._goodsRelatedData = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(InwardProcessingGoodsReferenceERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize InwardProcessingGoodsReferenceERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes InwardProcessingGoodsReferenceERType object + ''' + ''' string to deserialize + ''' Output InwardProcessingGoodsReferenceERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As InwardProcessingGoodsReferenceERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, InwardProcessingGoodsReferenceERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As InwardProcessingGoodsReferenceERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As InwardProcessingGoodsReferenceERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), InwardProcessingGoodsReferenceERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As InwardProcessingGoodsReferenceERType + Return CType(SerializerXml.Deserialize(s), InwardProcessingGoodsReferenceERType) + End Function +#End Region + + ''' + ''' Serializes current InwardProcessingGoodsReferenceERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an InwardProcessingGoodsReferenceERType object + ''' + ''' File to load and deserialize + ''' Output InwardProcessingGoodsReferenceERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As InwardProcessingGoodsReferenceERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, InwardProcessingGoodsReferenceERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As InwardProcessingGoodsReferenceERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As InwardProcessingGoodsReferenceERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class InwardProcessingERType + +#Region "Private fields" + Private _alignment As String + + Private _simplyGrantedAuthorisation As String + + Private _typeOfAuthorisation As String + + Private _referenceNumber As String + + Private _customsOfficeOfSupervision As String + + Private _goodsReference As List(Of InwardProcessingGoodsReferenceERType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsReference = New List(Of InwardProcessingGoodsReferenceERType)() + End Sub + + + Public Property Alignment() As String + Get + Return Me._alignment + End Get + Set + Me._alignment = Value + End Set + End Property + + + Public Property SimplyGrantedAuthorisation() As String + Get + Return Me._simplyGrantedAuthorisation + End Get + Set + Me._simplyGrantedAuthorisation = Value + End Set + End Property + + + Public Property TypeOfAuthorisation() As String + Get + Return Me._typeOfAuthorisation + End Get + Set + Me._typeOfAuthorisation = Value + End Set + End Property + + + Public Property ReferenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + + Public Property CustomsOfficeOfSupervision() As String + Get + Return Me._customsOfficeOfSupervision + End Get + Set + Me._customsOfficeOfSupervision = Value + End Set + End Property + + + Public Property GoodsReference() As List(Of InwardProcessingGoodsReferenceERType) + Get + Return Me._goodsReference + End Get + Set + Me._goodsReference = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(InwardProcessingERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize InwardProcessingERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes InwardProcessingERType object + ''' + ''' string to deserialize + ''' Output InwardProcessingERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As InwardProcessingERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, InwardProcessingERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As InwardProcessingERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As InwardProcessingERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), InwardProcessingERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As InwardProcessingERType + Return CType(SerializerXml.Deserialize(s), InwardProcessingERType) + End Function +#End Region + + ''' + ''' Serializes current InwardProcessingERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an InwardProcessingERType object + ''' + ''' File to load and deserialize + ''' Output InwardProcessingERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As InwardProcessingERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, InwardProcessingERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As InwardProcessingERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As InwardProcessingERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class GoodsReductionAfterTreatmentERType + +#Region "Private fields" + Private _quantity As Decimal + + Private _measurementUnit As String + + Private _qualifier As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Quantity() As Decimal + Get + Return Me._quantity + End Get + Set + Me._quantity = Value + End Set + End Property + + + Public Property MeasurementUnit() As String + Get + Return Me._measurementUnit + End Get + Set + Me._measurementUnit = Value + End Set + End Property + + + Public Property Qualifier() As String + Get + Return Me._qualifier + End Get + Set + Me._qualifier = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(GoodsReductionAfterTreatmentERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize GoodsReductionAfterTreatmentERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes GoodsReductionAfterTreatmentERType object + ''' + ''' string to deserialize + ''' Output GoodsReductionAfterTreatmentERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GoodsReductionAfterTreatmentERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, GoodsReductionAfterTreatmentERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GoodsReductionAfterTreatmentERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As GoodsReductionAfterTreatmentERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), GoodsReductionAfterTreatmentERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As GoodsReductionAfterTreatmentERType + Return CType(SerializerXml.Deserialize(s), GoodsReductionAfterTreatmentERType) + End Function +#End Region + + ''' + ''' Serializes current GoodsReductionAfterTreatmentERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an GoodsReductionAfterTreatmentERType object + ''' + ''' File to load and deserialize + ''' Output GoodsReductionAfterTreatmentERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GoodsReductionAfterTreatmentERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, GoodsReductionAfterTreatmentERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GoodsReductionAfterTreatmentERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As GoodsReductionAfterTreatmentERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class GoodsReductionERType + +#Region "Private fields" + Private _quantity As Decimal + + Private _measurementUnit As String + + Private _qualifier As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Quantity() As Decimal + Get + Return Me._quantity + End Get + Set + Me._quantity = Value + End Set + End Property + + + Public Property MeasurementUnit() As String + Get + Return Me._measurementUnit + End Get + Set + Me._measurementUnit = Value + End Set + End Property + + + Public Property Qualifier() As String + Get + Return Me._qualifier + End Get + Set + Me._qualifier = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(GoodsReductionERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize GoodsReductionERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes GoodsReductionERType object + ''' + ''' string to deserialize + ''' Output GoodsReductionERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GoodsReductionERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, GoodsReductionERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GoodsReductionERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As GoodsReductionERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), GoodsReductionERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As GoodsReductionERType + Return CType(SerializerXml.Deserialize(s), GoodsReductionERType) + End Function +#End Region + + ''' + ''' Serializes current GoodsReductionERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an GoodsReductionERType object + ''' + ''' File to load and deserialize + ''' Output GoodsReductionERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GoodsReductionERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, GoodsReductionERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GoodsReductionERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As GoodsReductionERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class CustomsWarehousingGoodsReferenceERType + +#Region "Private fields" + Private _goodsItemNumber As String + + Private _mRN As String + + Private _registrationNumber As String + + Private _commodityCode As String + + Private _usualTreatment As String + + Private _accessViaATLAS As String + + Private _complementOfInformation As String + + Private _goodsReduction As GoodsReductionERType + + Private _goodsReductionAfterTreatment As GoodsReductionAfterTreatmentERType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsReductionAfterTreatment = New GoodsReductionAfterTreatmentERType() + Me._goodsReduction = New GoodsReductionERType() + End Sub + + + Public Property GoodsItemNumber() As String + Get + Return Me._goodsItemNumber + End Get + Set + Me._goodsItemNumber = Value + End Set + End Property + + + Public Property MRN() As String + Get + Return Me._mRN + End Get + Set + Me._mRN = Value + End Set + End Property + + + Public Property RegistrationNumber() As String + Get + Return Me._registrationNumber + End Get + Set + Me._registrationNumber = Value + End Set + End Property + + + Public Property CommodityCode() As String + Get + Return Me._commodityCode + End Get + Set + Me._commodityCode = Value + End Set + End Property + + + Public Property UsualTreatment() As String + Get + Return Me._usualTreatment + End Get + Set + Me._usualTreatment = Value + End Set + End Property + + + Public Property AccessViaATLAS() As String + Get + Return Me._accessViaATLAS + End Get + Set + Me._accessViaATLAS = Value + End Set + End Property + + + Public Property ComplementOfInformation() As String + Get + Return Me._complementOfInformation + End Get + Set + Me._complementOfInformation = Value + End Set + End Property + + + Public Property GoodsReduction() As GoodsReductionERType + Get + Return Me._goodsReduction + End Get + Set + Me._goodsReduction = Value + End Set + End Property + + + Public Property GoodsReductionAfterTreatment() As GoodsReductionAfterTreatmentERType + Get + Return Me._goodsReductionAfterTreatment + End Get + Set + Me._goodsReductionAfterTreatment = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(CustomsWarehousingGoodsReferenceERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize CustomsWarehousingGoodsReferenceERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes CustomsWarehousingGoodsReferenceERType object + ''' + ''' string to deserialize + ''' Output CustomsWarehousingGoodsReferenceERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CustomsWarehousingGoodsReferenceERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, CustomsWarehousingGoodsReferenceERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CustomsWarehousingGoodsReferenceERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As CustomsWarehousingGoodsReferenceERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CustomsWarehousingGoodsReferenceERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As CustomsWarehousingGoodsReferenceERType + Return CType(SerializerXml.Deserialize(s), CustomsWarehousingGoodsReferenceERType) + End Function +#End Region + + ''' + ''' Serializes current CustomsWarehousingGoodsReferenceERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an CustomsWarehousingGoodsReferenceERType object + ''' + ''' File to load and deserialize + ''' Output CustomsWarehousingGoodsReferenceERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CustomsWarehousingGoodsReferenceERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, CustomsWarehousingGoodsReferenceERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CustomsWarehousingGoodsReferenceERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As CustomsWarehousingGoodsReferenceERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class CustomsWarehousingERType + +#Region "Private fields" + Private _alignment As String + + Private _typeOfAuthorisation As String + + Private _referenceNumber As String + + Private _lRN As String + + Private _goodsReference As List(Of CustomsWarehousingGoodsReferenceERType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsReference = New List(Of CustomsWarehousingGoodsReferenceERType)() + End Sub + + + Public Property Alignment() As String + Get + Return Me._alignment + End Get + Set + Me._alignment = Value + End Set + End Property + + + Public Property TypeOfAuthorisation() As String + Get + Return Me._typeOfAuthorisation + End Get + Set + Me._typeOfAuthorisation = Value + End Set + End Property + + + Public Property ReferenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + + Public Property LRN() As String + Get + Return Me._lRN + End Get + Set + Me._lRN = Value + End Set + End Property + + + Public Property GoodsReference() As List(Of CustomsWarehousingGoodsReferenceERType) + Get + Return Me._goodsReference + End Get + Set + Me._goodsReference = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(CustomsWarehousingERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize CustomsWarehousingERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes CustomsWarehousingERType object + ''' + ''' string to deserialize + ''' Output CustomsWarehousingERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CustomsWarehousingERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, CustomsWarehousingERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CustomsWarehousingERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As CustomsWarehousingERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CustomsWarehousingERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As CustomsWarehousingERType + Return CType(SerializerXml.Deserialize(s), CustomsWarehousingERType) + End Function +#End Region + + ''' + ''' Serializes current CustomsWarehousingERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an CustomsWarehousingERType object + ''' + ''' File to load and deserialize + ''' Output CustomsWarehousingERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CustomsWarehousingERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, CustomsWarehousingERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CustomsWarehousingERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As CustomsWarehousingERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ProcedureTransferenceERType + +#Region "Private fields" + Private _customsWarehousing As CustomsWarehousingERType + + Private _inwardProcessing As InwardProcessingERType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._inwardProcessing = New InwardProcessingERType() + Me._customsWarehousing = New CustomsWarehousingERType() + End Sub + + + Public Property CustomsWarehousing() As CustomsWarehousingERType + Get + Return Me._customsWarehousing + End Get + Set + Me._customsWarehousing = Value + End Set + End Property + + + Public Property InwardProcessing() As InwardProcessingERType + Get + Return Me._inwardProcessing + End Get + Set + Me._inwardProcessing = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ProcedureTransferenceERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ProcedureTransferenceERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ProcedureTransferenceERType object + ''' + ''' string to deserialize + ''' Output ProcedureTransferenceERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ProcedureTransferenceERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ProcedureTransferenceERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ProcedureTransferenceERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ProcedureTransferenceERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ProcedureTransferenceERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ProcedureTransferenceERType + Return CType(SerializerXml.Deserialize(s), ProcedureTransferenceERType) + End Function +#End Region + + ''' + ''' Serializes current ProcedureTransferenceERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ProcedureTransferenceERType object + ''' + ''' File to load and deserialize + ''' Output ProcedureTransferenceERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ProcedureTransferenceERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ProcedureTransferenceERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ProcedureTransferenceERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ProcedureTransferenceERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AdditionalReferenceEGType + +#Region "Private fields" + Private _type As String + + Private _qualifier As String + + Private _referenceNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Type() As String + Get + Return Me._type + End Get + Set + Me._type = Value + End Set + End Property + + + Public Property Qualifier() As String + Get + Return Me._qualifier + End Get + Set + Me._qualifier = Value + End Set + End Property + + + Public Property ReferenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdditionalReferenceEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AdditionalReferenceEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AdditionalReferenceEGType object + ''' + ''' string to deserialize + ''' Output AdditionalReferenceEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalReferenceEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalReferenceEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalReferenceEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AdditionalReferenceEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalReferenceEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdditionalReferenceEGType + Return CType(SerializerXml.Deserialize(s), AdditionalReferenceEGType) + End Function +#End Region + + ''' + ''' Serializes current AdditionalReferenceEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AdditionalReferenceEGType object + ''' + ''' File to load and deserialize + ''' Output AdditionalReferenceEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalReferenceEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalReferenceEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalReferenceEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdditionalReferenceEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AdditionalReferenceGoodsItemERType + Inherits AdditionalReferenceEGType + +#Region "Private fields" + Private _detail As String + + Private _currency As String + + Private _amount As Decimal + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Detail() As String + Get + Return Me._detail + End Get + Set + Me._detail = Value + End Set + End Property + + + Public Property Currency() As String + Get + Return Me._currency + End Get + Set + Me._currency = Value + End Set + End Property + + + Public Property Amount() As Decimal + Get + Return Me._amount + End Get + Set + Me._amount = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdditionalReferenceGoodsItemERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AdditionalReferenceGoodsItemERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AdditionalReferenceGoodsItemERType object + ''' + ''' string to deserialize + ''' Output AdditionalReferenceGoodsItemERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalReferenceGoodsItemERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalReferenceGoodsItemERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalReferenceGoodsItemERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AdditionalReferenceGoodsItemERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalReferenceGoodsItemERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdditionalReferenceGoodsItemERType + Return CType(SerializerXml.Deserialize(s), AdditionalReferenceGoodsItemERType) + End Function +#End Region + + ''' + ''' Serializes current AdditionalReferenceGoodsItemERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AdditionalReferenceGoodsItemERType object + ''' + ''' File to load and deserialize + ''' Output AdditionalReferenceGoodsItemERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalReferenceGoodsItemERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalReferenceGoodsItemERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalReferenceGoodsItemERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdditionalReferenceGoodsItemERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class SupportingDocumentEGType + +#Region "Private fields" + Private _type As String + + Private _qualifier As String + + Private _referenceNumber As String + + Private _documentLineItemNumber As String + + Private _issuingAuthorityName As String + + Private _issuingDate As Date + + Private _validityDate As Date + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Type() As String + Get + Return Me._type + End Get + Set + Me._type = Value + End Set + End Property + + + Public Property Qualifier() As String + Get + Return Me._qualifier + End Get + Set + Me._qualifier = Value + End Set + End Property + + + Public Property ReferenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + + Public Property DocumentLineItemNumber() As String + Get + Return Me._documentLineItemNumber + End Get + Set + Me._documentLineItemNumber = Value + End Set + End Property + + + Public Property IssuingAuthorityName() As String + Get + Return Me._issuingAuthorityName + End Get + Set + Me._issuingAuthorityName = Value + End Set + End Property + + + Public Property IssuingDate() As Date + Get + Return Me._issuingDate + End Get + Set + Me._issuingDate = Value + End Set + End Property + + + Public Property ValidityDate() As Date + Get + Return Me._validityDate + End Get + Set + Me._validityDate = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(SupportingDocumentEGType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize SupportingDocumentEGType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes SupportingDocumentEGType object + ''' + ''' string to deserialize + ''' Output SupportingDocumentEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SupportingDocumentEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SupportingDocumentEGType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SupportingDocumentEGType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As SupportingDocumentEGType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), SupportingDocumentEGType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As SupportingDocumentEGType + Return CType(SerializerXml.Deserialize(s), SupportingDocumentEGType) + End Function +#End Region + + ''' + ''' Serializes current SupportingDocumentEGType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an SupportingDocumentEGType object + ''' + ''' File to load and deserialize + ''' Output SupportingDocumentEGType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SupportingDocumentEGType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SupportingDocumentEGType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SupportingDocumentEGType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As SupportingDocumentEGType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class SupportingDocumentGoodsItemERType + Inherits SupportingDocumentEGType + +#Region "Private fields" + Private _complementOfInformation As String + + Private _detail As String + + Private _amount As Decimal + + Private _currency As String + + Private _measurementUnitAndQualifier As String + + Private _complementaryUnit As String + + Private _quantity As Decimal + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property ComplementOfInformation() As String + Get + Return Me._complementOfInformation + End Get + Set + Me._complementOfInformation = Value + End Set + End Property + + + Public Property Detail() As String + Get + Return Me._detail + End Get + Set + Me._detail = Value + End Set + End Property + + + Public Property Amount() As Decimal + Get + Return Me._amount + End Get + Set + Me._amount = Value + End Set + End Property + + + Public Property Currency() As String + Get + Return Me._currency + End Get + Set + Me._currency = Value + End Set + End Property + + + Public Property MeasurementUnitAndQualifier() As String + Get + Return Me._measurementUnitAndQualifier + End Get + Set + Me._measurementUnitAndQualifier = Value + End Set + End Property + + + Public Property ComplementaryUnit() As String + Get + Return Me._complementaryUnit + End Get + Set + Me._complementaryUnit = Value + End Set + End Property + + + Public Property Quantity() As Decimal + Get + Return Me._quantity + End Get + Set + Me._quantity = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(SupportingDocumentGoodsItemERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize SupportingDocumentGoodsItemERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes SupportingDocumentGoodsItemERType object + ''' + ''' string to deserialize + ''' Output SupportingDocumentGoodsItemERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SupportingDocumentGoodsItemERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SupportingDocumentGoodsItemERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SupportingDocumentGoodsItemERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As SupportingDocumentGoodsItemERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), SupportingDocumentGoodsItemERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As SupportingDocumentGoodsItemERType + Return CType(SerializerXml.Deserialize(s), SupportingDocumentGoodsItemERType) + End Function +#End Region + + ''' + ''' Serializes current SupportingDocumentGoodsItemERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an SupportingDocumentGoodsItemERType object + ''' + ''' File to load and deserialize + ''' Output SupportingDocumentGoodsItemERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SupportingDocumentGoodsItemERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SupportingDocumentGoodsItemERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SupportingDocumentGoodsItemERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As SupportingDocumentGoodsItemERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class PackagingERType + +#Region "Private fields" + Private _numberOfPackages As String + + Private _sequenceNumber As String + + Private _typeOfPackages As String + + Private _shippingMarks As String + + Private _packageReference As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property NumberOfPackages() As String + Get + Return Me._numberOfPackages + End Get + Set + Me._numberOfPackages = Value + End Set + End Property + + + Public Property SequenceNumber() As String + Get + Return Me._sequenceNumber + End Get + Set + Me._sequenceNumber = Value + End Set + End Property + + + Public Property TypeOfPackages() As String + Get + Return Me._typeOfPackages + End Get + Set + Me._typeOfPackages = Value + End Set + End Property + + + Public Property ShippingMarks() As String + Get + Return Me._shippingMarks + End Get + Set + Me._shippingMarks = Value + End Set + End Property + + + Public Property PackageReference() As String + Get + Return Me._packageReference + End Get + Set + Me._packageReference = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PackagingERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize PackagingERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes PackagingERType object + ''' + ''' string to deserialize + ''' Output PackagingERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PackagingERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PackagingERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PackagingERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As PackagingERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PackagingERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As PackagingERType + Return CType(SerializerXml.Deserialize(s), PackagingERType) + End Function +#End Region + + ''' + ''' Serializes current PackagingERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an PackagingERType object + ''' + ''' File to load and deserialize + ''' Output PackagingERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PackagingERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PackagingERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PackagingERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PackagingERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class PreviousDocumentGoodsItemERType + +#Region "Private fields" + Private _type As String + + Private _qualifier As String + + Private _referenceNumber As String + + Private _goodsItemNumber As String + + Private _measurementUnitAndQualifier As String + + Private _quantity As Decimal + + Private _complementOfInformation As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Type() As String + Get + Return Me._type + End Get + Set + Me._type = Value + End Set + End Property + + + Public Property Qualifier() As String + Get + Return Me._qualifier + End Get + Set + Me._qualifier = Value + End Set + End Property + + + Public Property ReferenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + + Public Property GoodsItemNumber() As String + Get + Return Me._goodsItemNumber + End Get + Set + Me._goodsItemNumber = Value + End Set + End Property + + + Public Property MeasurementUnitAndQualifier() As String + Get + Return Me._measurementUnitAndQualifier + End Get + Set + Me._measurementUnitAndQualifier = Value + End Set + End Property + + + Public Property Quantity() As Decimal + Get + Return Me._quantity + End Get + Set + Me._quantity = Value + End Set + End Property + + + Public Property ComplementOfInformation() As String + Get + Return Me._complementOfInformation + End Get + Set + Me._complementOfInformation = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PreviousDocumentGoodsItemERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize PreviousDocumentGoodsItemERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes PreviousDocumentGoodsItemERType object + ''' + ''' string to deserialize + ''' Output PreviousDocumentGoodsItemERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PreviousDocumentGoodsItemERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PreviousDocumentGoodsItemERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PreviousDocumentGoodsItemERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As PreviousDocumentGoodsItemERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PreviousDocumentGoodsItemERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As PreviousDocumentGoodsItemERType + Return CType(SerializerXml.Deserialize(s), PreviousDocumentGoodsItemERType) + End Function +#End Region + + ''' + ''' Serializes current PreviousDocumentGoodsItemERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an PreviousDocumentGoodsItemERType object + ''' + ''' File to load and deserialize + ''' Output PreviousDocumentGoodsItemERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PreviousDocumentGoodsItemERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PreviousDocumentGoodsItemERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PreviousDocumentGoodsItemERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PreviousDocumentGoodsItemERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ProcedureERType + +#Region "Private fields" + Private _requestedProcedure As String + + Private _previousProcedure As String + + Private _additionalProcedure As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property RequestedProcedure() As String + Get + Return Me._requestedProcedure + End Get + Set + Me._requestedProcedure = Value + End Set + End Property + + + Public Property PreviousProcedure() As String + Get + Return Me._previousProcedure + End Get + Set + Me._previousProcedure = Value + End Set + End Property + + + Public Property AdditionalProcedure() As String + Get + Return Me._additionalProcedure + End Get + Set + Me._additionalProcedure = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ProcedureERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ProcedureERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ProcedureERType object + ''' + ''' string to deserialize + ''' Output ProcedureERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ProcedureERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ProcedureERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ProcedureERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ProcedureERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ProcedureERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ProcedureERType + Return CType(SerializerXml.Deserialize(s), ProcedureERType) + End Function +#End Region + + ''' + ''' Serializes current ProcedureERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ProcedureERType object + ''' + ''' File to load and deserialize + ''' Output ProcedureERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ProcedureERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ProcedureERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ProcedureERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ProcedureERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class GoodsItemERType + +#Region "Private fields" + Private _declarationGoodsItemNumber As String + + Private _harmonizedSystemSubHeadingCode As String + + Private _combinedNomenclatureCode As String + + Private _taricAdditionalCode As List(Of String) + + Private _cusCode As String + + Private _descriptionOfGoods As String + + Private _registrationNumberExternal As String + + Private _referenceNumberUCR As String + + Private _countryOfOrigin As String + + Private _countryOfExport As String + + Private _regionOfDispatch As String + + Private _netMass As Decimal + + Private _grossMass As Decimal + + Private _originalGoodsItemNumber As String + + Private _uNNumber As List(Of String) + + Private _transportCharges As String + + Private _procedure As ProcedureERType + + Private _supplementaryUnits As Decimal + + Private _statisticalValue As Decimal + + Private _previousDocument As List(Of PreviousDocumentGoodsItemERType) + + Private _packaging As List(Of PackagingERType) + + Private _supportingDocument As List(Of SupportingDocumentGoodsItemERType) + + Private _transportDocument As List(Of TransportDocumentERType) + + Private _additionalReference As List(Of AdditionalReferenceGoodsItemERType) + + Private _additionalInformation As List(Of AdditionalInformationERType) + + Private _consignee As AddressERType + + Private _consignor As AddressERType + + Private _additionalSupplyChainActor As List(Of AdditionalSupplyChainActorERType) + + Private _procedureTransference As ProcedureTransferenceERType + + Private _natureOfTransaction As String + + Private _authorisation As List(Of AuthorisationGoodsItemERType) + + Private _outwardProcessing As OutwardProcessingGoodsItemERType + + Private _applicationInternalData As ApplicationInternalDataType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._applicationInternalData = New ApplicationInternalDataType() + Me._outwardProcessing = New OutwardProcessingGoodsItemERType() + Me._authorisation = New List(Of AuthorisationGoodsItemERType)() + Me._procedureTransference = New ProcedureTransferenceERType() + Me._additionalSupplyChainActor = New List(Of AdditionalSupplyChainActorERType)() + Me._consignor = New AddressERType() + Me._consignee = New AddressERType() + Me._additionalInformation = New List(Of AdditionalInformationERType)() + Me._additionalReference = New List(Of AdditionalReferenceGoodsItemERType)() + Me._transportDocument = New List(Of TransportDocumentERType)() + Me._supportingDocument = New List(Of SupportingDocumentGoodsItemERType)() + Me._packaging = New List(Of PackagingERType)() + Me._previousDocument = New List(Of PreviousDocumentGoodsItemERType)() + Me._procedure = New ProcedureERType() + Me._uNNumber = New List(Of String)() + Me._taricAdditionalCode = New List(Of String)() + End Sub + + + Public Property DeclarationGoodsItemNumber() As String + Get + Return Me._declarationGoodsItemNumber + End Get + Set + Me._declarationGoodsItemNumber = Value + End Set + End Property + + + Public Property HarmonizedSystemSubHeadingCode() As String + Get + Return Me._harmonizedSystemSubHeadingCode + End Get + Set + Me._harmonizedSystemSubHeadingCode = Value + End Set + End Property + + + Public Property CombinedNomenclatureCode() As String + Get + Return Me._combinedNomenclatureCode + End Get + Set + Me._combinedNomenclatureCode = Value + End Set + End Property + + + Public Property TaricAdditionalCode() As List(Of String) + Get + Return Me._taricAdditionalCode + End Get + Set + Me._taricAdditionalCode = Value + End Set + End Property + + + Public Property CusCode() As String + Get + Return Me._cusCode + End Get + Set + Me._cusCode = Value + End Set + End Property + + + Public Property DescriptionOfGoods() As String + Get + Return Me._descriptionOfGoods + End Get + Set + Me._descriptionOfGoods = Value + End Set + End Property + + + Public Property RegistrationNumberExternal() As String + Get + Return Me._registrationNumberExternal + End Get + Set + Me._registrationNumberExternal = Value + End Set + End Property + + + Public Property ReferenceNumberUCR() As String + Get + Return Me._referenceNumberUCR + End Get + Set + Me._referenceNumberUCR = Value + End Set + End Property + + + Public Property CountryOfOrigin() As String + Get + Return Me._countryOfOrigin + End Get + Set + Me._countryOfOrigin = Value + End Set + End Property + + + Public Property CountryOfExport() As String + Get + Return Me._countryOfExport + End Get + Set + Me._countryOfExport = Value + End Set + End Property + + + Public Property RegionOfDispatch() As String + Get + Return Me._regionOfDispatch + End Get + Set + Me._regionOfDispatch = Value + End Set + End Property + + + Public Property NetMass() As Decimal + Get + Return Me._netMass + End Get + Set + Me._netMass = Value + End Set + End Property + + + Public Property GrossMass() As Decimal + Get + Return Me._grossMass + End Get + Set + Me._grossMass = Value + End Set + End Property + + + Public Property OriginalGoodsItemNumber() As String + Get + Return Me._originalGoodsItemNumber + End Get + Set + Me._originalGoodsItemNumber = Value + End Set + End Property + + + Public Property UNNumber() As List(Of String) + Get + Return Me._uNNumber + End Get + Set + Me._uNNumber = Value + End Set + End Property + + + Public Property TransportCharges() As String + Get + Return Me._transportCharges + End Get + Set + Me._transportCharges = Value + End Set + End Property + + + Public Property Procedure() As ProcedureERType + Get + Return Me._procedure + End Get + Set + Me._procedure = Value + End Set + End Property + + + Public Property SupplementaryUnits() As Decimal + Get + Return Me._supplementaryUnits + End Get + Set + Me._supplementaryUnits = Value + End Set + End Property + + + Public Property StatisticalValue() As Decimal + Get + Return Me._statisticalValue + End Get + Set + Me._statisticalValue = Value + End Set + End Property + + + Public Property PreviousDocument() As List(Of PreviousDocumentGoodsItemERType) + Get + Return Me._previousDocument + End Get + Set + Me._previousDocument = Value + End Set + End Property + + + Public Property Packaging() As List(Of PackagingERType) + Get + Return Me._packaging + End Get + Set + Me._packaging = Value + End Set + End Property + + + Public Property SupportingDocument() As List(Of SupportingDocumentGoodsItemERType) + Get + Return Me._supportingDocument + End Get + Set + Me._supportingDocument = Value + End Set + End Property + + + Public Property TransportDocument() As List(Of TransportDocumentERType) + Get + Return Me._transportDocument + End Get + Set + Me._transportDocument = Value + End Set + End Property + + + Public Property AdditionalReference() As List(Of AdditionalReferenceGoodsItemERType) + Get + Return Me._additionalReference + End Get + Set + Me._additionalReference = Value + End Set + End Property + + + Public Property AdditionalInformation() As List(Of AdditionalInformationERType) + Get + Return Me._additionalInformation + End Get + Set + Me._additionalInformation = Value + End Set + End Property + + + Public Property Consignee() As AddressERType + Get + Return Me._consignee + End Get + Set + Me._consignee = Value + End Set + End Property + + + Public Property Consignor() As AddressERType + Get + Return Me._consignor + End Get + Set + Me._consignor = Value + End Set + End Property + + + Public Property AdditionalSupplyChainActor() As List(Of AdditionalSupplyChainActorERType) + Get + Return Me._additionalSupplyChainActor + End Get + Set + Me._additionalSupplyChainActor = Value + End Set + End Property + + + Public Property ProcedureTransference() As ProcedureTransferenceERType + Get + Return Me._procedureTransference + End Get + Set + Me._procedureTransference = Value + End Set + End Property + + + Public Property NatureOfTransaction() As String + Get + Return Me._natureOfTransaction + End Get + Set + Me._natureOfTransaction = Value + End Set + End Property + + + Public Property Authorisation() As List(Of AuthorisationGoodsItemERType) + Get + Return Me._authorisation + End Get + Set + Me._authorisation = Value + End Set + End Property + + + Public Property OutwardProcessing() As OutwardProcessingGoodsItemERType + Get + Return Me._outwardProcessing + End Get + Set + Me._outwardProcessing = Value + End Set + End Property + + + Public Property ApplicationInternalData() As ApplicationInternalDataType + Get + Return Me._applicationInternalData + End Get + Set + Me._applicationInternalData = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(GoodsItemERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize GoodsItemERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes GoodsItemERType object + ''' + ''' string to deserialize + ''' Output GoodsItemERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GoodsItemERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, GoodsItemERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GoodsItemERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As GoodsItemERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), GoodsItemERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As GoodsItemERType + Return CType(SerializerXml.Deserialize(s), GoodsItemERType) + End Function +#End Region + + ''' + ''' Serializes current GoodsItemERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an GoodsItemERType object + ''' + ''' File to load and deserialize + ''' Output GoodsItemERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GoodsItemERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, GoodsItemERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GoodsItemERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As GoodsItemERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransportDocumentERType + +#Region "Private fields" + Private _type As String + + Private _qualifier As String + + Private _referenceNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Type() As String + Get + Return Me._type + End Get + Set + Me._type = Value + End Set + End Property + + + Public Property Qualifier() As String + Get + Return Me._qualifier + End Get + Set + Me._qualifier = Value + End Set + End Property + + + Public Property ReferenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransportDocumentERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransportDocumentERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransportDocumentERType object + ''' + ''' string to deserialize + ''' Output TransportDocumentERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransportDocumentERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransportDocumentERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransportDocumentERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransportDocumentERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransportDocumentERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransportDocumentERType + Return CType(SerializerXml.Deserialize(s), TransportDocumentERType) + End Function +#End Region + + ''' + ''' Serializes current TransportDocumentERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransportDocumentERType object + ''' + ''' File to load and deserialize + ''' Output TransportDocumentERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransportDocumentERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransportDocumentERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransportDocumentERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransportDocumentERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AdditionalInformationERType + +#Region "Private fields" + Private _code As String + + Private _text As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Code() As String + Get + Return Me._code + End Get + Set + Me._code = Value + End Set + End Property + + + Public Property Text() As String + Get + Return Me._text + End Get + Set + Me._text = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdditionalInformationERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AdditionalInformationERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AdditionalInformationERType object + ''' + ''' string to deserialize + ''' Output AdditionalInformationERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalInformationERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalInformationERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalInformationERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AdditionalInformationERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalInformationERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdditionalInformationERType + Return CType(SerializerXml.Deserialize(s), AdditionalInformationERType) + End Function +#End Region + + ''' + ''' Serializes current AdditionalInformationERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AdditionalInformationERType object + ''' + ''' File to load and deserialize + ''' Output AdditionalInformationERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalInformationERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalInformationERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalInformationERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdditionalInformationERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AddressERType + +#Region "Private fields" + Private _identificationNumber As String + + Private _subsidiaryNumber As String + + Private _name As String + + Private _streetAndNumber As String + + Private _city As String + + Private _postcode As String + + Private _country As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property IdentificationNumber() As String + Get + Return Me._identificationNumber + End Get + Set + Me._identificationNumber = Value + End Set + End Property + + + Public Property SubsidiaryNumber() As String + Get + Return Me._subsidiaryNumber + End Get + Set + Me._subsidiaryNumber = Value + End Set + End Property + + + Public Property Name() As String + Get + Return Me._name + End Get + Set + Me._name = Value + End Set + End Property + + + Public Property StreetAndNumber() As String + Get + Return Me._streetAndNumber + End Get + Set + Me._streetAndNumber = Value + End Set + End Property + + + Public Property City() As String + Get + Return Me._city + End Get + Set + Me._city = Value + End Set + End Property + + + Public Property Postcode() As String + Get + Return Me._postcode + End Get + Set + Me._postcode = Value + End Set + End Property + + + Public Property Country() As String + Get + Return Me._country + End Get + Set + Me._country = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AddressERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AddressERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AddressERType object + ''' + ''' string to deserialize + ''' Output AddressERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AddressERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AddressERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AddressERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AddressERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AddressERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AddressERType + Return CType(SerializerXml.Deserialize(s), AddressERType) + End Function +#End Region + + ''' + ''' Serializes current AddressERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AddressERType object + ''' + ''' File to load and deserialize + ''' Output AddressERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AddressERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AddressERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AddressERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AddressERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AddressWithContactERType + Inherits AddressERType + +#Region "Private fields" + Private _contactPerson As ContactPersonERType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contactPerson = New ContactPersonERType() + End Sub + + + Public Property ContactPerson() As ContactPersonERType + Get + Return Me._contactPerson + End Get + Set + Me._contactPerson = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AddressWithContactERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AddressWithContactERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AddressWithContactERType object + ''' + ''' string to deserialize + ''' Output AddressWithContactERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AddressWithContactERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AddressWithContactERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AddressWithContactERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AddressWithContactERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AddressWithContactERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AddressWithContactERType + Return CType(SerializerXml.Deserialize(s), AddressWithContactERType) + End Function +#End Region + + ''' + ''' Serializes current AddressWithContactERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AddressWithContactERType object + ''' + ''' File to load and deserialize + ''' Output AddressWithContactERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AddressWithContactERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AddressWithContactERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AddressWithContactERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AddressWithContactERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ContactPersonERType + +#Region "Private fields" + Private _name As String + + Private _phoneNumber As String + + Private _eMailAddress As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Name() As String + Get + Return Me._name + End Get + Set + Me._name = Value + End Set + End Property + + + Public Property PhoneNumber() As String + Get + Return Me._phoneNumber + End Get + Set + Me._phoneNumber = Value + End Set + End Property + + + Public Property EMailAddress() As String + Get + Return Me._eMailAddress + End Get + Set + Me._eMailAddress = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ContactPersonERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ContactPersonERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ContactPersonERType object + ''' + ''' string to deserialize + ''' Output ContactPersonERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ContactPersonERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ContactPersonERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ContactPersonERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ContactPersonERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ContactPersonERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ContactPersonERType + Return CType(SerializerXml.Deserialize(s), ContactPersonERType) + End Function +#End Region + + ''' + ''' Serializes current ContactPersonERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ContactPersonERType object + ''' + ''' File to load and deserialize + ''' Output ContactPersonERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ContactPersonERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ContactPersonERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ContactPersonERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ContactPersonERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AdditionalSupplyChainActorERType + +#Region "Private fields" + Private _role As String + + Private _identificationNumber As String + + Private _name As String + + Private _streetAndNumber As String + + Private _city As String + + Private _postcode As String + + Private _country As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Role() As String + Get + Return Me._role + End Get + Set + Me._role = Value + End Set + End Property + + + Public Property IdentificationNumber() As String + Get + Return Me._identificationNumber + End Get + Set + Me._identificationNumber = Value + End Set + End Property + + + Public Property Name() As String + Get + Return Me._name + End Get + Set + Me._name = Value + End Set + End Property + + + Public Property StreetAndNumber() As String + Get + Return Me._streetAndNumber + End Get + Set + Me._streetAndNumber = Value + End Set + End Property + + + Public Property City() As String + Get + Return Me._city + End Get + Set + Me._city = Value + End Set + End Property + + + Public Property Postcode() As String + Get + Return Me._postcode + End Get + Set + Me._postcode = Value + End Set + End Property + + + Public Property Country() As String + Get + Return Me._country + End Get + Set + Me._country = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdditionalSupplyChainActorERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AdditionalSupplyChainActorERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AdditionalSupplyChainActorERType object + ''' + ''' string to deserialize + ''' Output AdditionalSupplyChainActorERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalSupplyChainActorERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalSupplyChainActorERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalSupplyChainActorERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AdditionalSupplyChainActorERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalSupplyChainActorERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdditionalSupplyChainActorERType + Return CType(SerializerXml.Deserialize(s), AdditionalSupplyChainActorERType) + End Function +#End Region + + ''' + ''' Serializes current AdditionalSupplyChainActorERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AdditionalSupplyChainActorERType object + ''' + ''' File to load and deserialize + ''' Output AdditionalSupplyChainActorERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalSupplyChainActorERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalSupplyChainActorERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalSupplyChainActorERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdditionalSupplyChainActorERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ApplicationInternalDataType + +#Region "Private fields" + Private _additionalDetails As List(Of ApplicationInternalDataAdditionalDetailsDataType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._additionalDetails = New List(Of ApplicationInternalDataAdditionalDetailsDataType)() + End Sub + + + Public Property AdditionalDetails() As List(Of ApplicationInternalDataAdditionalDetailsDataType) + Get + Return Me._additionalDetails + End Get + Set + Me._additionalDetails = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ApplicationInternalDataType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ApplicationInternalDataType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ApplicationInternalDataType object + ''' + ''' string to deserialize + ''' Output ApplicationInternalDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ApplicationInternalDataType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ApplicationInternalDataType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ApplicationInternalDataType + Return CType(SerializerXml.Deserialize(s), ApplicationInternalDataType) + End Function +#End Region + + ''' + ''' Serializes current ApplicationInternalDataType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ApplicationInternalDataType object + ''' + ''' File to load and deserialize + ''' Output ApplicationInternalDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ApplicationInternalDataType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ApplicationInternalDataAdditionalDetailsDataType + +#Region "Private fields" + Private _key As String + + Private _value As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Key() As String + Get + Return Me._key + End Get + Set + Me._key = Value + End Set + End Property + + + Public Property Value() As String + Get + Return Me._value + End Get + Set + Me._value = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ApplicationInternalDataAdditionalDetailsDataType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' string to deserialize + ''' Output ApplicationInternalDataAdditionalDetailsDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsDataType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ApplicationInternalDataAdditionalDetailsDataType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ApplicationInternalDataAdditionalDetailsDataType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ApplicationInternalDataAdditionalDetailsDataType + Return CType(SerializerXml.Deserialize(s), ApplicationInternalDataAdditionalDetailsDataType) + End Function +#End Region + + ''' + ''' Serializes current ApplicationInternalDataAdditionalDetailsDataType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ApplicationInternalDataAdditionalDetailsDataType object + ''' + ''' File to load and deserialize + ''' Output ApplicationInternalDataAdditionalDetailsDataType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsDataType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ApplicationInternalDataAdditionalDetailsDataType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class LocationOfGoodsAddressERType + +#Region "Private fields" + Private _complementOfInformation As String + + Private _streetAndNumber As String + + Private _city As String + + Private _postcode As String + + Private _country As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property ComplementOfInformation() As String + Get + Return Me._complementOfInformation + End Get + Set + Me._complementOfInformation = Value + End Set + End Property + + + Public Property StreetAndNumber() As String + Get + Return Me._streetAndNumber + End Get + Set + Me._streetAndNumber = Value + End Set + End Property + + + Public Property City() As String + Get + Return Me._city + End Get + Set + Me._city = Value + End Set + End Property + + + Public Property Postcode() As String + Get + Return Me._postcode + End Get + Set + Me._postcode = Value + End Set + End Property + + + Public Property Country() As String + Get + Return Me._country + End Get + Set + Me._country = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(LocationOfGoodsAddressERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize LocationOfGoodsAddressERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes LocationOfGoodsAddressERType object + ''' + ''' string to deserialize + ''' Output LocationOfGoodsAddressERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As LocationOfGoodsAddressERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, LocationOfGoodsAddressERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As LocationOfGoodsAddressERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As LocationOfGoodsAddressERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), LocationOfGoodsAddressERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As LocationOfGoodsAddressERType + Return CType(SerializerXml.Deserialize(s), LocationOfGoodsAddressERType) + End Function +#End Region + + ''' + ''' Serializes current LocationOfGoodsAddressERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an LocationOfGoodsAddressERType object + ''' + ''' File to load and deserialize + ''' Output LocationOfGoodsAddressERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As LocationOfGoodsAddressERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, LocationOfGoodsAddressERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As LocationOfGoodsAddressERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As LocationOfGoodsAddressERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class LocationOfGoodsERType + +#Region "Private fields" + Private _typeOfLocation As String + + Private _qualifierOfIdentification As String + + Private _authorisationNumber As String + + Private _additionalIdentifier As String + + Private _uNLocode As String + + Private _latitude As String + + Private _longitude As String + + Private _address As LocationOfGoodsAddressERType + + Private _contactPerson As ContactPersonERType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._contactPerson = New ContactPersonERType() + Me._address = New LocationOfGoodsAddressERType() + End Sub + + + Public Property TypeOfLocation() As String + Get + Return Me._typeOfLocation + End Get + Set + Me._typeOfLocation = Value + End Set + End Property + + + Public Property QualifierOfIdentification() As String + Get + Return Me._qualifierOfIdentification + End Get + Set + Me._qualifierOfIdentification = Value + End Set + End Property + + + Public Property AuthorisationNumber() As String + Get + Return Me._authorisationNumber + End Get + Set + Me._authorisationNumber = Value + End Set + End Property + + + Public Property AdditionalIdentifier() As String + Get + Return Me._additionalIdentifier + End Get + Set + Me._additionalIdentifier = Value + End Set + End Property + + + Public Property UNLocode() As String + Get + Return Me._uNLocode + End Get + Set + Me._uNLocode = Value + End Set + End Property + + + Public Property Latitude() As String + Get + Return Me._latitude + End Get + Set + Me._latitude = Value + End Set + End Property + + + Public Property Longitude() As String + Get + Return Me._longitude + End Get + Set + Me._longitude = Value + End Set + End Property + + + Public Property Address() As LocationOfGoodsAddressERType + Get + Return Me._address + End Get + Set + Me._address = Value + End Set + End Property + + + Public Property ContactPerson() As ContactPersonERType + Get + Return Me._contactPerson + End Get + Set + Me._contactPerson = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(LocationOfGoodsERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize LocationOfGoodsERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes LocationOfGoodsERType object + ''' + ''' string to deserialize + ''' Output LocationOfGoodsERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As LocationOfGoodsERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, LocationOfGoodsERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As LocationOfGoodsERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As LocationOfGoodsERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), LocationOfGoodsERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As LocationOfGoodsERType + Return CType(SerializerXml.Deserialize(s), LocationOfGoodsERType) + End Function +#End Region + + ''' + ''' Serializes current LocationOfGoodsERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an LocationOfGoodsERType object + ''' + ''' File to load and deserialize + ''' Output LocationOfGoodsERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As LocationOfGoodsERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, LocationOfGoodsERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As LocationOfGoodsERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As LocationOfGoodsERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransportEquipmentERType + +#Region "Private fields" + Private _numberOfSeals As String + + Private _seal As List(Of String) + + Private _containerIdentificationNumber As String + + Private _goodsReference As List(Of String) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._goodsReference = New List(Of String)() + Me._seal = New List(Of String)() + End Sub + + + Public Property NumberOfSeals() As String + Get + Return Me._numberOfSeals + End Get + Set + Me._numberOfSeals = Value + End Set + End Property + + + Public Property Seal() As List(Of String) + Get + Return Me._seal + End Get + Set + Me._seal = Value + End Set + End Property + + + Public Property ContainerIdentificationNumber() As String + Get + Return Me._containerIdentificationNumber + End Get + Set + Me._containerIdentificationNumber = Value + End Set + End Property + + + Public Property GoodsReference() As List(Of String) + Get + Return Me._goodsReference + End Get + Set + Me._goodsReference = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransportEquipmentERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransportEquipmentERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransportEquipmentERType object + ''' + ''' string to deserialize + ''' Output TransportEquipmentERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransportEquipmentERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransportEquipmentERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransportEquipmentERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransportEquipmentERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransportEquipmentERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransportEquipmentERType + Return CType(SerializerXml.Deserialize(s), TransportEquipmentERType) + End Function +#End Region + + ''' + ''' Serializes current TransportEquipmentERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransportEquipmentERType object + ''' + ''' File to load and deserialize + ''' Output TransportEquipmentERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransportEquipmentERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransportEquipmentERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransportEquipmentERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransportEquipmentERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AdditionalReferenceERType + +#Region "Private fields" + Private _type As String + + Private _qualifier As String + + Private _referenceNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Type() As String + Get + Return Me._type + End Get + Set + Me._type = Value + End Set + End Property + + + Public Property Qualifier() As String + Get + Return Me._qualifier + End Get + Set + Me._qualifier = Value + End Set + End Property + + + Public Property ReferenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdditionalReferenceERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AdditionalReferenceERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AdditionalReferenceERType object + ''' + ''' string to deserialize + ''' Output AdditionalReferenceERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalReferenceERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalReferenceERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalReferenceERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AdditionalReferenceERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalReferenceERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdditionalReferenceERType + Return CType(SerializerXml.Deserialize(s), AdditionalReferenceERType) + End Function +#End Region + + ''' + ''' Serializes current AdditionalReferenceERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AdditionalReferenceERType object + ''' + ''' File to load and deserialize + ''' Output AdditionalReferenceERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalReferenceERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdditionalReferenceERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalReferenceERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdditionalReferenceERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class SupportingDocumentERType + +#Region "Private fields" + Private _type As String + + Private _qualifier As String + + Private _referenceNumber As String + + Private _documentLineItemNumber As String + + Private _issuingAuthorityName As String + + Private _issuingDate As Date + + Private _validityDate As Date + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Type() As String + Get + Return Me._type + End Get + Set + Me._type = Value + End Set + End Property + + + Public Property Qualifier() As String + Get + Return Me._qualifier + End Get + Set + Me._qualifier = Value + End Set + End Property + + + Public Property ReferenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + + Public Property DocumentLineItemNumber() As String + Get + Return Me._documentLineItemNumber + End Get + Set + Me._documentLineItemNumber = Value + End Set + End Property + + + Public Property IssuingAuthorityName() As String + Get + Return Me._issuingAuthorityName + End Get + Set + Me._issuingAuthorityName = Value + End Set + End Property + + + Public Property IssuingDate() As Date + Get + Return Me._issuingDate + End Get + Set + Me._issuingDate = Value + End Set + End Property + + + Public Property ValidityDate() As Date + Get + Return Me._validityDate + End Get + Set + Me._validityDate = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(SupportingDocumentERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize SupportingDocumentERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes SupportingDocumentERType object + ''' + ''' string to deserialize + ''' Output SupportingDocumentERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SupportingDocumentERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SupportingDocumentERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SupportingDocumentERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As SupportingDocumentERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), SupportingDocumentERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As SupportingDocumentERType + Return CType(SerializerXml.Deserialize(s), SupportingDocumentERType) + End Function +#End Region + + ''' + ''' Serializes current SupportingDocumentERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an SupportingDocumentERType object + ''' + ''' File to load and deserialize + ''' Output SupportingDocumentERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SupportingDocumentERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SupportingDocumentERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SupportingDocumentERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As SupportingDocumentERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class PreviousDocumentERType + +#Region "Private fields" + Private _type As String + + Private _qualifier As String + + Private _referenceNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Type() As String + Get + Return Me._type + End Get + Set + Me._type = Value + End Set + End Property + + + Public Property Qualifier() As String + Get + Return Me._qualifier + End Get + Set + Me._qualifier = Value + End Set + End Property + + + Public Property ReferenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PreviousDocumentERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize PreviousDocumentERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes PreviousDocumentERType object + ''' + ''' string to deserialize + ''' Output PreviousDocumentERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PreviousDocumentERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PreviousDocumentERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PreviousDocumentERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As PreviousDocumentERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PreviousDocumentERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As PreviousDocumentERType + Return CType(SerializerXml.Deserialize(s), PreviousDocumentERType) + End Function +#End Region + + ''' + ''' Serializes current PreviousDocumentERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an PreviousDocumentERType object + ''' + ''' File to load and deserialize + ''' Output PreviousDocumentERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PreviousDocumentERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PreviousDocumentERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PreviousDocumentERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PreviousDocumentERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ProductERType + +#Region "Private fields" + Private _commodityCode As String + + Private _descriptionOfGoods As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property CommodityCode() As String + Get + Return Me._commodityCode + End Get + Set + Me._commodityCode = Value + End Set + End Property + + + Public Property DescriptionOfGoods() As String + Get + Return Me._descriptionOfGoods + End Get + Set + Me._descriptionOfGoods = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ProductERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ProductERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ProductERType object + ''' + ''' string to deserialize + ''' Output ProductERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ProductERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ProductERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ProductERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ProductERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ProductERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ProductERType + Return CType(SerializerXml.Deserialize(s), ProductERType) + End Function +#End Region + + ''' + ''' Serializes current ProductERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ProductERType object + ''' + ''' File to load and deserialize + ''' Output ProductERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ProductERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ProductERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ProductERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ProductERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class IdentificationMeansERType + +#Region "Private fields" + Private _type As String + + Private _description As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Type() As String + Get + Return Me._type + End Get + Set + Me._type = Value + End Set + End Property + + + Public Property Description() As String + Get + Return Me._description + End Get + Set + Me._description = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(IdentificationMeansERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize IdentificationMeansERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes IdentificationMeansERType object + ''' + ''' string to deserialize + ''' Output IdentificationMeansERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As IdentificationMeansERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, IdentificationMeansERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As IdentificationMeansERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As IdentificationMeansERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), IdentificationMeansERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As IdentificationMeansERType + Return CType(SerializerXml.Deserialize(s), IdentificationMeansERType) + End Function +#End Region + + ''' + ''' Serializes current IdentificationMeansERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an IdentificationMeansERType object + ''' + ''' File to load and deserialize + ''' Output IdentificationMeansERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As IdentificationMeansERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, IdentificationMeansERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As IdentificationMeansERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As IdentificationMeansERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class OutwardProcessingERType + +#Region "Private fields" + Private _countryOfReimport As List(Of String) + + Private _identificationMeans As List(Of IdentificationMeansERType) + + Private _product As List(Of ProductERType) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._product = New List(Of ProductERType)() + Me._identificationMeans = New List(Of IdentificationMeansERType)() + Me._countryOfReimport = New List(Of String)() + End Sub + + + Public Property CountryOfReimport() As List(Of String) + Get + Return Me._countryOfReimport + End Get + Set + Me._countryOfReimport = Value + End Set + End Property + + + Public Property IdentificationMeans() As List(Of IdentificationMeansERType) + Get + Return Me._identificationMeans + End Get + Set + Me._identificationMeans = Value + End Set + End Property + + + Public Property Product() As List(Of ProductERType) + Get + Return Me._product + End Get + Set + Me._product = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(OutwardProcessingERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize OutwardProcessingERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes OutwardProcessingERType object + ''' + ''' string to deserialize + ''' Output OutwardProcessingERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As OutwardProcessingERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, OutwardProcessingERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As OutwardProcessingERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As OutwardProcessingERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), OutwardProcessingERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As OutwardProcessingERType + Return CType(SerializerXml.Deserialize(s), OutwardProcessingERType) + End Function +#End Region + + ''' + ''' Serializes current OutwardProcessingERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an OutwardProcessingERType object + ''' + ''' File to load and deserialize + ''' Output OutwardProcessingERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As OutwardProcessingERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, OutwardProcessingERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As OutwardProcessingERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As OutwardProcessingERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DeliveryTermsERType + +#Region "Private fields" + Private _incotermCode As String + + Private _uNLocode As String + + Private _text As String + + Private _location As String + + Private _country As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property IncotermCode() As String + Get + Return Me._incotermCode + End Get + Set + Me._incotermCode = Value + End Set + End Property + + + Public Property UNLocode() As String + Get + Return Me._uNLocode + End Get + Set + Me._uNLocode = Value + End Set + End Property + + + Public Property Text() As String + Get + Return Me._text + End Get + Set + Me._text = Value + End Set + End Property + + + Public Property Location() As String + Get + Return Me._location + End Get + Set + Me._location = Value + End Set + End Property + + + Public Property Country() As String + Get + Return Me._country + End Get + Set + Me._country = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DeliveryTermsERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DeliveryTermsERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DeliveryTermsERType object + ''' + ''' string to deserialize + ''' Output DeliveryTermsERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DeliveryTermsERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DeliveryTermsERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DeliveryTermsERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DeliveryTermsERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DeliveryTermsERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DeliveryTermsERType + Return CType(SerializerXml.Deserialize(s), DeliveryTermsERType) + End Function +#End Region + + ''' + ''' Serializes current DeliveryTermsERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DeliveryTermsERType object + ''' + ''' File to load and deserialize + ''' Output DeliveryTermsERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DeliveryTermsERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DeliveryTermsERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DeliveryTermsERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DeliveryTermsERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AuthorisationERType + +#Region "Private fields" + Private _type As String + + Private _referenceNumber As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Type() As String + Get + Return Me._type + End Get + Set + Me._type = Value + End Set + End Property + + + Public Property ReferenceNumber() As String + Get + Return Me._referenceNumber + End Get + Set + Me._referenceNumber = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AuthorisationERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AuthorisationERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AuthorisationERType object + ''' + ''' string to deserialize + ''' Output AuthorisationERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AuthorisationERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AuthorisationERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AuthorisationERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AuthorisationERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AuthorisationERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AuthorisationERType + Return CType(SerializerXml.Deserialize(s), AuthorisationERType) + End Function +#End Region + + ''' + ''' Serializes current AuthorisationERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AuthorisationERType object + ''' + ''' File to load and deserialize + ''' Output AuthorisationERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AuthorisationERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AuthorisationERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AuthorisationERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AuthorisationERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ActiveBorderTransportMeansERType + +#Region "Private fields" + Private _typeOfIdentification As String + + Private _identificationNumber As String + + Private _nationality As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property TypeOfIdentification() As String + Get + Return Me._typeOfIdentification + End Get + Set + Me._typeOfIdentification = Value + End Set + End Property + + + Public Property IdentificationNumber() As String + Get + Return Me._identificationNumber + End Get + Set + Me._identificationNumber = Value + End Set + End Property + + + Public Property Nationality() As String + Get + Return Me._nationality + End Get + Set + Me._nationality = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ActiveBorderTransportMeansERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ActiveBorderTransportMeansERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ActiveBorderTransportMeansERType object + ''' + ''' string to deserialize + ''' Output ActiveBorderTransportMeansERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ActiveBorderTransportMeansERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ActiveBorderTransportMeansERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ActiveBorderTransportMeansERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ActiveBorderTransportMeansERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ActiveBorderTransportMeansERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ActiveBorderTransportMeansERType + Return CType(SerializerXml.Deserialize(s), ActiveBorderTransportMeansERType) + End Function +#End Region + + ''' + ''' Serializes current ActiveBorderTransportMeansERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ActiveBorderTransportMeansERType object + ''' + ''' File to load and deserialize + ''' Output ActiveBorderTransportMeansERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ActiveBorderTransportMeansERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ActiveBorderTransportMeansERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ActiveBorderTransportMeansERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ActiveBorderTransportMeansERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DepartureTransportMeansERType + +#Region "Private fields" + Private _typeOfIdentification As String + + Private _identificationNumber As String + + Private _nationality As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property TypeOfIdentification() As String + Get + Return Me._typeOfIdentification + End Get + Set + Me._typeOfIdentification = Value + End Set + End Property + + + Public Property IdentificationNumber() As String + Get + Return Me._identificationNumber + End Get + Set + Me._identificationNumber = Value + End Set + End Property + + + Public Property Nationality() As String + Get + Return Me._nationality + End Get + Set + Me._nationality = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DepartureTransportMeansERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DepartureTransportMeansERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DepartureTransportMeansERType object + ''' + ''' string to deserialize + ''' Output DepartureTransportMeansERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DepartureTransportMeansERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DepartureTransportMeansERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DepartureTransportMeansERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DepartureTransportMeansERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DepartureTransportMeansERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DepartureTransportMeansERType + Return CType(SerializerXml.Deserialize(s), DepartureTransportMeansERType) + End Function +#End Region + + ''' + ''' Serializes current DepartureTransportMeansERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DepartureTransportMeansERType object + ''' + ''' File to load and deserialize + ''' Output DepartureTransportMeansERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DepartureTransportMeansERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DepartureTransportMeansERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DepartureTransportMeansERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DepartureTransportMeansERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ExportOperationERType + +#Region "Private fields" + Private _declarationType As String + + Private _additionalDeclarationType As String + + Private _exportDeclarationType As String + + Private _mRN As String + + Private _countryOfDestination As String + + Private _countryOfExport As String + + Private _declarationRecordationDateAndTime As Date + + Private _declarationAcceptanceDateAndTime As Date + + Private _exitDate As Date + + Private _releaseDateAndTime As Date + + Private _decisiveDate As Date + + Private _containerIndicator As String + + Private _partyConstellation As String + + Private _security As String + + Private _grossMass As Decimal + + Private _registrationNumberExternal As String + + Private _inlandModeOfTransport As String + + Private _departureTransportMeans As List(Of DepartureTransportMeansERType) + + Private _modeOfTransportAtTheBorder As String + + Private _activeBorderTransportMeans As ActiveBorderTransportMeansERType + + Private _customsOfficeOfExport As String + + Private _customsOfficeOfSupplement As String + + Private _customsOfficeOfExitDeclared As String + + Private _customsOfficeOfExitActual As String + + Private _customsOfficeOfPresentation As String + + Private _authorisation As List(Of AuthorisationERType) + + Private _contractualPartner As AddressERType + + Private _additionalSupplyChainActor As List(Of AdditionalSupplyChainActorERType) + + Private _carrier As AddressERType + + Private _natureOfTransaction As String + + Private _totalAmountInvoiced As Decimal + + Private _invoiceCurrency As String + + Private _specificCircumstanceIndicator As String + + Private _transportCharges As String + + Private _referenceNumberUCR As String + + Private _exporter As AddressERType + + Private _consignee As AddressERType + + Private _declarant As AddressWithContactERType + + Private _representative As AddressWithContactERType + + Private _subContractor As AddressERType + + Private _consignor As AddressERType + + Private _deliveryTerms As DeliveryTermsERType + + Private _fileNameOfExportAccompanyingDocument As String + + Private _countryOfRoutingOfConsignment As List(Of String) + + Private _outwardProcessing As OutwardProcessingERType + + Private _previousDocument As List(Of PreviousDocumentERType) + + Private _supportingDocument As List(Of SupportingDocumentERType) + + Private _additionalReference As List(Of AdditionalReferenceERType) + + Private _additionalInformation As List(Of AdditionalInformationERType) + + Private _transportEquipment As List(Of TransportEquipmentERType) + + Private _transportDocument As List(Of TransportDocumentERType) + + Private _locationOfGoods As LocationOfGoodsERType + + Private _applicationInternalData As ApplicationInternalDataType + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._applicationInternalData = New ApplicationInternalDataType() + Me._locationOfGoods = New LocationOfGoodsERType() + Me._transportDocument = New List(Of TransportDocumentERType)() + Me._transportEquipment = New List(Of TransportEquipmentERType)() + Me._additionalInformation = New List(Of AdditionalInformationERType)() + Me._additionalReference = New List(Of AdditionalReferenceERType)() + Me._supportingDocument = New List(Of SupportingDocumentERType)() + Me._previousDocument = New List(Of PreviousDocumentERType)() + Me._outwardProcessing = New OutwardProcessingERType() + Me._countryOfRoutingOfConsignment = New List(Of String)() + Me._deliveryTerms = New DeliveryTermsERType() + Me._consignor = New AddressERType() + Me._subContractor = New AddressERType() + Me._representative = New AddressWithContactERType() + Me._declarant = New AddressWithContactERType() + Me._consignee = New AddressERType() + Me._exporter = New AddressERType() + Me._carrier = New AddressERType() + Me._additionalSupplyChainActor = New List(Of AdditionalSupplyChainActorERType)() + Me._contractualPartner = New AddressERType() + Me._authorisation = New List(Of AuthorisationERType)() + Me._activeBorderTransportMeans = New ActiveBorderTransportMeansERType() + Me._departureTransportMeans = New List(Of DepartureTransportMeansERType)() + End Sub + + + Public Property DeclarationType() As String + Get + Return Me._declarationType + End Get + Set + Me._declarationType = Value + End Set + End Property + + + Public Property AdditionalDeclarationType() As String + Get + Return Me._additionalDeclarationType + End Get + Set + Me._additionalDeclarationType = Value + End Set + End Property + + + Public Property ExportDeclarationType() As String + Get + Return Me._exportDeclarationType + End Get + Set + Me._exportDeclarationType = Value + End Set + End Property + + + Public Property MRN() As String + Get + Return Me._mRN + End Get + Set + Me._mRN = Value + End Set + End Property + + + Public Property CountryOfDestination() As String + Get + Return Me._countryOfDestination + End Get + Set + Me._countryOfDestination = Value + End Set + End Property + + + Public Property CountryOfExport() As String + Get + Return Me._countryOfExport + End Get + Set + Me._countryOfExport = Value + End Set + End Property + + + Public Property DeclarationRecordationDateAndTime() As Date + Get + Return Me._declarationRecordationDateAndTime + End Get + Set + Me._declarationRecordationDateAndTime = Value + End Set + End Property + + + Public Property DeclarationAcceptanceDateAndTime() As Date + Get + Return Me._declarationAcceptanceDateAndTime + End Get + Set + Me._declarationAcceptanceDateAndTime = Value + End Set + End Property + + + Public Property ExitDate() As Date + Get + Return Me._exitDate + End Get + Set + Me._exitDate = Value + End Set + End Property + + + Public Property ReleaseDateAndTime() As Date + Get + Return Me._releaseDateAndTime + End Get + Set + Me._releaseDateAndTime = Value + End Set + End Property + + + Public Property DecisiveDate() As Date + Get + Return Me._decisiveDate + End Get + Set + Me._decisiveDate = Value + End Set + End Property + + + Public Property ContainerIndicator() As String + Get + Return Me._containerIndicator + End Get + Set + Me._containerIndicator = Value + End Set + End Property + + + Public Property PartyConstellation() As String + Get + Return Me._partyConstellation + End Get + Set + Me._partyConstellation = 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 GrossMass() As Decimal + Get + Return Me._grossMass + End Get + Set + Me._grossMass = Value + End Set + End Property + + + Public Property RegistrationNumberExternal() As String + Get + Return Me._registrationNumberExternal + End Get + Set + Me._registrationNumberExternal = Value + End Set + End Property + + + Public Property InlandModeOfTransport() As String + Get + Return Me._inlandModeOfTransport + End Get + Set + Me._inlandModeOfTransport = Value + End Set + End Property + + + Public Property DepartureTransportMeans() As List(Of DepartureTransportMeansERType) + 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 ActiveBorderTransportMeansERType + Get + Return Me._activeBorderTransportMeans + End Get + Set + Me._activeBorderTransportMeans = Value + End Set + End Property + + + Public Property CustomsOfficeOfExport() As String + Get + Return Me._customsOfficeOfExport + End Get + Set + Me._customsOfficeOfExport = Value + End Set + End Property + + + Public Property CustomsOfficeOfSupplement() As String + Get + Return Me._customsOfficeOfSupplement + End Get + Set + Me._customsOfficeOfSupplement = Value + End Set + End Property + + + Public Property CustomsOfficeOfExitDeclared() As String + Get + Return Me._customsOfficeOfExitDeclared + End Get + Set + Me._customsOfficeOfExitDeclared = Value + End Set + End Property + + + Public Property CustomsOfficeOfExitActual() As String + Get + Return Me._customsOfficeOfExitActual + End Get + Set + Me._customsOfficeOfExitActual = Value + End Set + End Property + + + Public Property CustomsOfficeOfPresentation() As String + Get + Return Me._customsOfficeOfPresentation + End Get + Set + Me._customsOfficeOfPresentation = Value + End Set + End Property + + + Public Property Authorisation() As List(Of AuthorisationERType) + Get + Return Me._authorisation + End Get + Set + Me._authorisation = Value + End Set + End Property + + + Public Property ContractualPartner() As AddressERType + Get + Return Me._contractualPartner + End Get + Set + Me._contractualPartner = Value + End Set + End Property + + + Public Property AdditionalSupplyChainActor() As List(Of AdditionalSupplyChainActorERType) + Get + Return Me._additionalSupplyChainActor + End Get + Set + Me._additionalSupplyChainActor = Value + End Set + End Property + + + Public Property Carrier() As AddressERType + Get + Return Me._carrier + End Get + Set + Me._carrier = Value + End Set + End Property + + + Public Property NatureOfTransaction() As String + Get + Return Me._natureOfTransaction + End Get + Set + Me._natureOfTransaction = Value + End Set + End Property + + + Public Property TotalAmountInvoiced() As Decimal + Get + Return Me._totalAmountInvoiced + End Get + Set + Me._totalAmountInvoiced = Value + End Set + End Property + + + Public Property InvoiceCurrency() As String + Get + Return Me._invoiceCurrency + End Get + Set + Me._invoiceCurrency = Value + End Set + End Property + + + Public Property SpecificCircumstanceIndicator() As String + Get + Return Me._specificCircumstanceIndicator + End Get + Set + Me._specificCircumstanceIndicator = Value + End Set + End Property + + + Public Property TransportCharges() As String + Get + Return Me._transportCharges + End Get + Set + Me._transportCharges = Value + End Set + End Property + + + Public Property ReferenceNumberUCR() As String + Get + Return Me._referenceNumberUCR + End Get + Set + Me._referenceNumberUCR = Value + End Set + End Property + + + Public Property Exporter() As AddressERType + Get + Return Me._exporter + End Get + Set + Me._exporter = Value + End Set + End Property + + + Public Property Consignee() As AddressERType + Get + Return Me._consignee + End Get + Set + Me._consignee = Value + End Set + End Property + + + Public Property Declarant() As AddressWithContactERType + Get + Return Me._declarant + End Get + Set + Me._declarant = Value + End Set + End Property + + + Public Property Representative() As AddressWithContactERType + Get + Return Me._representative + End Get + Set + Me._representative = Value + End Set + End Property + + + Public Property SubContractor() As AddressERType + Get + Return Me._subContractor + End Get + Set + Me._subContractor = Value + End Set + End Property + + + Public Property Consignor() As AddressERType + Get + Return Me._consignor + End Get + Set + Me._consignor = Value + End Set + End Property + + + Public Property DeliveryTerms() As DeliveryTermsERType + Get + Return Me._deliveryTerms + End Get + Set + Me._deliveryTerms = Value + End Set + End Property + + + Public Property FileNameOfExportAccompanyingDocument() As String + Get + Return Me._fileNameOfExportAccompanyingDocument + End Get + Set + Me._fileNameOfExportAccompanyingDocument = 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 OutwardProcessing() As OutwardProcessingERType + Get + Return Me._outwardProcessing + End Get + Set + Me._outwardProcessing = Value + End Set + End Property + + + Public Property PreviousDocument() As List(Of PreviousDocumentERType) + Get + Return Me._previousDocument + End Get + Set + Me._previousDocument = Value + End Set + End Property + + + Public Property SupportingDocument() As List(Of SupportingDocumentERType) + Get + Return Me._supportingDocument + End Get + Set + Me._supportingDocument = Value + End Set + End Property + + + Public Property AdditionalReference() As List(Of AdditionalReferenceERType) + Get + Return Me._additionalReference + End Get + Set + Me._additionalReference = Value + End Set + End Property + + + Public Property AdditionalInformation() As List(Of AdditionalInformationERType) + Get + Return Me._additionalInformation + End Get + Set + Me._additionalInformation = Value + End Set + End Property + + + Public Property TransportEquipment() As List(Of TransportEquipmentERType) + Get + Return Me._transportEquipment + End Get + Set + Me._transportEquipment = Value + End Set + End Property + + + Public Property TransportDocument() As List(Of TransportDocumentERType) + Get + Return Me._transportDocument + End Get + Set + Me._transportDocument = Value + End Set + End Property + + + Public Property LocationOfGoods() As LocationOfGoodsERType + Get + Return Me._locationOfGoods + End Get + Set + Me._locationOfGoods = 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(ExportOperationERType)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ExportOperationERType object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ExportOperationERType object + ''' + ''' string to deserialize + ''' Output ExportOperationERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ExportOperationERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ExportOperationERType) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ExportOperationERType) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ExportOperationERType + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ExportOperationERType) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ExportOperationERType + Return CType(SerializerXml.Deserialize(s), ExportOperationERType) + End Function +#End Region + + ''' + ''' Serializes current ExportOperationERType object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ExportOperationERType object + ''' + ''' File to load and deserialize + ''' Output ExportOperationERType object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ExportOperationERType, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ExportOperationERType) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ExportOperationERType) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ExportOperationERType + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class BeendigungPositionAVUVERTyp + +#Region "Private fields" + Private _positionsnummer As String + + Private _registriernummer As String + + Private _kzZugangATLAS As String + + Private _warenbezogeneAngaben As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Positionsnummer() As String + Get + Return Me._positionsnummer + End Get + Set + Me._positionsnummer = 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 KzZugangATLAS() As String + Get + Return Me._kzZugangATLAS + End Get + Set + Me._kzZugangATLAS = 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(BeendigungPositionAVUVERTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize BeendigungPositionAVUVERTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes BeendigungPositionAVUVERTyp object + ''' + ''' string to deserialize + ''' Output BeendigungPositionAVUVERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BeendigungPositionAVUVERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BeendigungPositionAVUVERTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BeendigungPositionAVUVERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As BeendigungPositionAVUVERTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), BeendigungPositionAVUVERTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As BeendigungPositionAVUVERTyp + Return CType(SerializerXml.Deserialize(s), BeendigungPositionAVUVERTyp) + End Function +#End Region + + ''' + ''' Serializes current BeendigungPositionAVUVERTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an BeendigungPositionAVUVERTyp object + ''' + ''' File to load and deserialize + ''' Output BeendigungPositionAVUVERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BeendigungPositionAVUVERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BeendigungPositionAVUVERTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BeendigungPositionAVUVERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As BeendigungPositionAVUVERTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class BeendigungAVUVERTyp + +#Region "Private fields" + Private _abgleichErfolgt As String + + Private _anzahlPositionen As String + + Private _bewilligungsnummer As String + + Private _positionAVUV As List(Of BeendigungPositionAVUVERTyp) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._positionAVUV = New List(Of BeendigungPositionAVUVERTyp)() + End Sub + + + Public Property AbgleichErfolgt() As String + Get + Return Me._abgleichErfolgt + End Get + Set + Me._abgleichErfolgt = 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 Bewilligungsnummer() As String + Get + Return Me._bewilligungsnummer + End Get + Set + Me._bewilligungsnummer = Value + End Set + End Property + + + Public Property PositionAVUV() As List(Of BeendigungPositionAVUVERTyp) + 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(BeendigungAVUVERTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize BeendigungAVUVERTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes BeendigungAVUVERTyp object + ''' + ''' string to deserialize + ''' Output BeendigungAVUVERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BeendigungAVUVERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BeendigungAVUVERTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BeendigungAVUVERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As BeendigungAVUVERTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), BeendigungAVUVERTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As BeendigungAVUVERTyp + Return CType(SerializerXml.Deserialize(s), BeendigungAVUVERTyp) + End Function +#End Region + + ''' + ''' Serializes current BeendigungAVUVERTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an BeendigungAVUVERTyp object + ''' + ''' File to load and deserialize + ''' Output BeendigungAVUVERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BeendigungAVUVERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BeendigungAVUVERTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BeendigungAVUVERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As BeendigungAVUVERTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AbgangsHandelsmengeERTyp + +#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(AbgangsHandelsmengeERTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AbgangsHandelsmengeERTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AbgangsHandelsmengeERTyp object + ''' + ''' string to deserialize + ''' Output AbgangsHandelsmengeERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AbgangsHandelsmengeERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AbgangsHandelsmengeERTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AbgangsHandelsmengeERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AbgangsHandelsmengeERTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AbgangsHandelsmengeERTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AbgangsHandelsmengeERTyp + Return CType(SerializerXml.Deserialize(s), AbgangsHandelsmengeERTyp) + End Function +#End Region + + ''' + ''' Serializes current AbgangsHandelsmengeERTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AbgangsHandelsmengeERTyp object + ''' + ''' File to load and deserialize + ''' Output AbgangsHandelsmengeERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AbgangsHandelsmengeERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AbgangsHandelsmengeERTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AbgangsHandelsmengeERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AbgangsHandelsmengeERTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class BeendigungPositionZLERTyp + +#Region "Private fields" + Private _positionsnummer As String + + Private _registriernummer As String + + Private _warennummer As String + + Private _kzUeblicheBehandlung As String + + Private _kzZugangATLAS As String + + Private _zusatz As String + + Private _abgangsmenge As AbgangsHandelsmengeERTyp + + Private _handelsmenge As AbgangsHandelsmengeERTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._handelsmenge = New AbgangsHandelsmengeERTyp() + Me._abgangsmenge = New AbgangsHandelsmengeERTyp() + End Sub + + + Public Property Positionsnummer() As String + Get + Return Me._positionsnummer + End Get + Set + Me._positionsnummer = 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 Warennummer() As String + Get + Return Me._warennummer + End Get + Set + Me._warennummer = 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 KzZugangATLAS() As String + Get + Return Me._kzZugangATLAS + End Get + Set + Me._kzZugangATLAS = 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 AbgangsHandelsmengeERTyp + Get + Return Me._abgangsmenge + End Get + Set + Me._abgangsmenge = Value + End Set + End Property + + + Public Property Handelsmenge() As AbgangsHandelsmengeERTyp + 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(BeendigungPositionZLERTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize BeendigungPositionZLERTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes BeendigungPositionZLERTyp object + ''' + ''' string to deserialize + ''' Output BeendigungPositionZLERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BeendigungPositionZLERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BeendigungPositionZLERTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BeendigungPositionZLERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As BeendigungPositionZLERTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), BeendigungPositionZLERTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As BeendigungPositionZLERTyp + Return CType(SerializerXml.Deserialize(s), BeendigungPositionZLERTyp) + End Function +#End Region + + ''' + ''' Serializes current BeendigungPositionZLERTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an BeendigungPositionZLERTyp object + ''' + ''' File to load and deserialize + ''' Output BeendigungPositionZLERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BeendigungPositionZLERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BeendigungPositionZLERTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BeendigungPositionZLERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As BeendigungPositionZLERTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class BeendigungZLERTyp + +#Region "Private fields" + Private _abgleichErfolgt As String + + Private _anzahlPositionen As String + + Private _bewilligungsnummer As String + + Private _bezugsnummer As String + + Private _positionZL As List(Of BeendigungPositionZLERTyp) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._positionZL = New List(Of BeendigungPositionZLERTyp)() + End Sub + + + Public Property AbgleichErfolgt() As String + Get + Return Me._abgleichErfolgt + End Get + Set + Me._abgleichErfolgt = 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 Bewilligungsnummer() As String + Get + Return Me._bewilligungsnummer + End Get + Set + Me._bewilligungsnummer = Value + End Set + End Property + + + Public Property Bezugsnummer() As String + Get + Return Me._bezugsnummer + End Get + Set + Me._bezugsnummer = Value + End Set + End Property + + + Public Property PositionZL() As List(Of BeendigungPositionZLERTyp) + 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(BeendigungZLERTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize BeendigungZLERTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes BeendigungZLERTyp object + ''' + ''' string to deserialize + ''' Output BeendigungZLERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BeendigungZLERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BeendigungZLERTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BeendigungZLERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As BeendigungZLERTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), BeendigungZLERTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As BeendigungZLERTyp + Return CType(SerializerXml.Deserialize(s), BeendigungZLERTyp) + End Function +#End Region + + ''' + ''' Serializes current BeendigungZLERTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an BeendigungZLERTyp object + ''' + ''' File to load and deserialize + ''' Output BeendigungZLERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BeendigungZLERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BeendigungZLERTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BeendigungZLERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As BeendigungZLERTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class EmpfaengerPositionERTyp + +#Region "Private fields" + Private _teilnehmerEORI As String + + Private _identifikationsart As String + + Private _teilnehmerNLNR As String + + Private _name As String + + Private _strasse As String + + Private _ort As String + + Private _pLZ As String + + Private _landCode As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property TeilnehmerEORI() As String + Get + Return Me._teilnehmerEORI + End Get + Set + Me._teilnehmerEORI = 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 TeilnehmerNLNR() As String + Get + Return Me._teilnehmerNLNR + End Get + Set + Me._teilnehmerNLNR = 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 Strasse() As String + Get + Return Me._strasse + End Get + Set + Me._strasse = 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 PLZ() As String + Get + Return Me._pLZ + End Get + Set + Me._pLZ = Value + End Set + End Property + + + Public Property LandCode() As String + Get + Return Me._landCode + End Get + Set + Me._landCode = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(EmpfaengerPositionERTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize EmpfaengerPositionERTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes EmpfaengerPositionERTyp object + ''' + ''' string to deserialize + ''' Output EmpfaengerPositionERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EmpfaengerPositionERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EmpfaengerPositionERTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EmpfaengerPositionERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As EmpfaengerPositionERTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), EmpfaengerPositionERTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As EmpfaengerPositionERTyp + Return CType(SerializerXml.Deserialize(s), EmpfaengerPositionERTyp) + End Function +#End Region + + ''' + ''' Serializes current EmpfaengerPositionERTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an EmpfaengerPositionERTyp object + ''' + ''' File to load and deserialize + ''' Output EmpfaengerPositionERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EmpfaengerPositionERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EmpfaengerPositionERTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EmpfaengerPositionERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As EmpfaengerPositionERTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class InhaltsstoffERTyp + +#Region "Private fields" + Private _textlicheErklaerung As String + + Private _lizenznummer As String + + Private _anteilGHT As Decimal + + Private _anteilsmenge As Decimal + + Private _herstellerErklaerungsnummer As String + + Private _schluesselnummer As String + + Private _umrechnungsfaktor1 As Decimal + + Private _umrechnungsfaktor1Kz As String + + Private _umrechnungsfaktor2 As Decimal + + Private _umrechnungsfaktorSatz As Decimal + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property TextlicheErklaerung() As String + Get + Return Me._textlicheErklaerung + End Get + Set + Me._textlicheErklaerung = Value + End Set + End Property + + + Public Property Lizenznummer() As String + Get + Return Me._lizenznummer + End Get + Set + Me._lizenznummer = Value + End Set + End Property + + + Public Property AnteilGHT() As Decimal + Get + Return Me._anteilGHT + End Get + Set + Me._anteilGHT = Value + End Set + End Property + + + Public Property Anteilsmenge() As Decimal + Get + Return Me._anteilsmenge + End Get + Set + Me._anteilsmenge = Value + End Set + End Property + + + Public Property HerstellerErklaerungsnummer() As String + Get + Return Me._herstellerErklaerungsnummer + End Get + Set + Me._herstellerErklaerungsnummer = Value + End Set + End Property + + + Public Property Schluesselnummer() As String + Get + Return Me._schluesselnummer + End Get + Set + Me._schluesselnummer = Value + End Set + End Property + + + Public Property Umrechnungsfaktor1() As Decimal + Get + Return Me._umrechnungsfaktor1 + End Get + Set + Me._umrechnungsfaktor1 = Value + End Set + End Property + + + Public Property Umrechnungsfaktor1Kz() As String + Get + Return Me._umrechnungsfaktor1Kz + End Get + Set + Me._umrechnungsfaktor1Kz = Value + End Set + End Property + + + Public Property Umrechnungsfaktor2() As Decimal + Get + Return Me._umrechnungsfaktor2 + End Get + Set + Me._umrechnungsfaktor2 = Value + End Set + End Property + + + Public Property UmrechnungsfaktorSatz() As Decimal + Get + Return Me._umrechnungsfaktorSatz + End Get + Set + Me._umrechnungsfaktorSatz = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(InhaltsstoffERTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize InhaltsstoffERTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes InhaltsstoffERTyp object + ''' + ''' string to deserialize + ''' Output InhaltsstoffERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As InhaltsstoffERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, InhaltsstoffERTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As InhaltsstoffERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As InhaltsstoffERTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), InhaltsstoffERTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As InhaltsstoffERTyp + Return CType(SerializerXml.Deserialize(s), InhaltsstoffERTyp) + End Function +#End Region + + ''' + ''' Serializes current InhaltsstoffERTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an InhaltsstoffERTyp object + ''' + ''' File to load and deserialize + ''' Output InhaltsstoffERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As InhaltsstoffERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, InhaltsstoffERTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As InhaltsstoffERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As InhaltsstoffERTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AusfuhrerstattungPositionERTyp + +#Region "Private fields" + Private _warenbezeichnungErgaenzung As String + + Private _ursprungsland As String + + Private _menge As Decimal + + Private _masseinheit As String + + Private _zahlungsfall As String + + Private _anpassungskoeffizient As Decimal + + Private _anteilswertA As Decimal + + Private _anteilswertB As Decimal + + Private _anteilswertC As Decimal + + Private _anteilswertD As Decimal + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property WarenbezeichnungErgaenzung() As String + Get + Return Me._warenbezeichnungErgaenzung + End Get + Set + Me._warenbezeichnungErgaenzung = Value + End Set + End Property + + + Public Property Ursprungsland() As String + Get + Return Me._ursprungsland + End Get + Set + Me._ursprungsland = Value + End Set + End Property + + + Public Property Menge() As Decimal + Get + Return Me._menge + End Get + Set + Me._menge = 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 Zahlungsfall() As String + Get + Return Me._zahlungsfall + End Get + Set + Me._zahlungsfall = Value + End Set + End Property + + + Public Property Anpassungskoeffizient() As Decimal + Get + Return Me._anpassungskoeffizient + End Get + Set + Me._anpassungskoeffizient = Value + End Set + End Property + + + Public Property AnteilswertA() As Decimal + Get + Return Me._anteilswertA + End Get + Set + Me._anteilswertA = Value + End Set + End Property + + + Public Property AnteilswertB() As Decimal + Get + Return Me._anteilswertB + End Get + Set + Me._anteilswertB = Value + End Set + End Property + + + Public Property AnteilswertC() As Decimal + Get + Return Me._anteilswertC + End Get + Set + Me._anteilswertC = Value + End Set + End Property + + + Public Property AnteilswertD() As Decimal + Get + Return Me._anteilswertD + End Get + Set + Me._anteilswertD = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AusfuhrerstattungPositionERTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AusfuhrerstattungPositionERTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AusfuhrerstattungPositionERTyp object + ''' + ''' string to deserialize + ''' Output AusfuhrerstattungPositionERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AusfuhrerstattungPositionERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AusfuhrerstattungPositionERTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AusfuhrerstattungPositionERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AusfuhrerstattungPositionERTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AusfuhrerstattungPositionERTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AusfuhrerstattungPositionERTyp + Return CType(SerializerXml.Deserialize(s), AusfuhrerstattungPositionERTyp) + End Function +#End Region + + ''' + ''' Serializes current AusfuhrerstattungPositionERTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AusfuhrerstattungPositionERTyp object + ''' + ''' File to load and deserialize + ''' Output AusfuhrerstattungPositionERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AusfuhrerstattungPositionERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AusfuhrerstattungPositionERTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AusfuhrerstattungPositionERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AusfuhrerstattungPositionERTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class UnterlageERTyp + +#Region "Private fields" + Private _typCode As String + + Private _qualifierCode As String + + Private _referenzID As String + + Private _zusatz As String + + Private _datumAusstellung As Date + + Private _datumEndeGueltigkeit As Date + + Private _detail As String + + Private _wert As String + + Private _masseinheit As String + + Private _abschreibungsmenge As Decimal + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property TypCode() As String + Get + Return Me._typCode + End Get + Set + Me._typCode = Value + End Set + End Property + + + Public Property QualifierCode() As String + Get + Return Me._qualifierCode + End Get + Set + Me._qualifierCode = Value + End Set + End Property + + + Public Property ReferenzID() As String + Get + Return Me._referenzID + End Get + Set + Me._referenzID = 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 DatumAusstellung() As Date + Get + Return Me._datumAusstellung + End Get + Set + Me._datumAusstellung = Value + End Set + End Property + + + Public Property DatumEndeGueltigkeit() As Date + Get + Return Me._datumEndeGueltigkeit + End Get + Set + Me._datumEndeGueltigkeit = Value + End Set + End Property + + + Public Property Detail() As String + Get + Return Me._detail + End Get + Set + Me._detail = Value + End Set + End Property + + + Public Property Wert() As String + 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 Abschreibungsmenge() As Decimal + Get + Return Me._abschreibungsmenge + End Get + Set + Me._abschreibungsmenge = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(UnterlageERTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize UnterlageERTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes UnterlageERTyp object + ''' + ''' string to deserialize + ''' Output UnterlageERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As UnterlageERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, UnterlageERTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As UnterlageERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As UnterlageERTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), UnterlageERTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As UnterlageERTyp + Return CType(SerializerXml.Deserialize(s), UnterlageERTyp) + End Function +#End Region + + ''' + ''' Serializes current UnterlageERTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an UnterlageERTyp object + ''' + ''' File to load and deserialize + ''' Output UnterlageERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As UnterlageERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, UnterlageERTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As UnterlageERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As UnterlageERTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class PackstueckERTyp + +#Region "Private fields" + Private _anzahl As String + + Private _laufendeNummer As String + + Private _verpackungsartCode As String + + Private _kennzeichnung As String + + Private _positionHauptpack 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 LaufendeNummer() As String + Get + Return Me._laufendeNummer + End Get + Set + Me._laufendeNummer = Value + End Set + End Property + + + Public Property VerpackungsartCode() As String + Get + Return Me._verpackungsartCode + End Get + Set + Me._verpackungsartCode = Value + End Set + End Property + + + Public Property Kennzeichnung() As String + Get + Return Me._kennzeichnung + End Get + Set + Me._kennzeichnung = Value + End Set + End Property + + + Public Property PositionHauptpack() As String + Get + Return Me._positionHauptpack + End Get + Set + Me._positionHauptpack = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PackstueckERTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize PackstueckERTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes PackstueckERTyp object + ''' + ''' string to deserialize + ''' Output PackstueckERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PackstueckERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PackstueckERTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PackstueckERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As PackstueckERTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PackstueckERTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As PackstueckERTyp + Return CType(SerializerXml.Deserialize(s), PackstueckERTyp) + End Function +#End Region + + ''' + ''' Serializes current PackstueckERTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an PackstueckERTyp object + ''' + ''' File to load and deserialize + ''' Output PackstueckERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PackstueckERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PackstueckERTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PackstueckERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PackstueckERTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class VorpapierERTyp + +#Region "Private fields" + Private _typCode As String + + Private _referenzID As String + + Private _zusatz As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property TypCode() As String + Get + Return Me._typCode + End Get + Set + Me._typCode = Value + End Set + End Property + + + Public Property ReferenzID() As String + Get + Return Me._referenzID + End Get + Set + Me._referenzID = 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(VorpapierERTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize VorpapierERTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes VorpapierERTyp object + ''' + ''' string to deserialize + ''' Output VorpapierERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VorpapierERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VorpapierERTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VorpapierERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As VorpapierERTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), VorpapierERTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As VorpapierERTyp + Return CType(SerializerXml.Deserialize(s), VorpapierERTyp) + End Function +#End Region + + ''' + ''' Serializes current VorpapierERTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an VorpapierERTyp object + ''' + ''' File to load and deserialize + ''' Output VorpapierERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VorpapierERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VorpapierERTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VorpapierERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As VorpapierERTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class VerfahrenERTyp + +#Region "Private fields" + Private _verfahrenAngemeldetCode As String + + Private _verfahrenVorangegangenCode As String + + Private _verfahrenNationalCode As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property VerfahrenAngemeldetCode() As String + Get + Return Me._verfahrenAngemeldetCode + End Get + Set + Me._verfahrenAngemeldetCode = Value + End Set + End Property + + + Public Property VerfahrenVorangegangenCode() As String + Get + Return Me._verfahrenVorangegangenCode + End Get + Set + Me._verfahrenVorangegangenCode = Value + End Set + End Property + + + Public Property VerfahrenNationalCode() As String + Get + Return Me._verfahrenNationalCode + End Get + Set + Me._verfahrenNationalCode = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(VerfahrenERTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize VerfahrenERTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes VerfahrenERTyp object + ''' + ''' string to deserialize + ''' Output VerfahrenERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VerfahrenERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VerfahrenERTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VerfahrenERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As VerfahrenERTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), VerfahrenERTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As VerfahrenERTyp + Return CType(SerializerXml.Deserialize(s), VerfahrenERTyp) + End Function +#End Region + + ''' + ''' Serializes current VerfahrenERTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an VerfahrenERTyp object + ''' + ''' File to load and deserialize + ''' Output VerfahrenERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VerfahrenERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VerfahrenERTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VerfahrenERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As VerfahrenERTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class PositionUeberlassungTyp + +#Region "Private fields" + Private _positionsnummer As String + + Private _warenNummerKN8 As String + + Private _warenNummerTARIC As String + + Private _warenNummerZusatz1 As String + + Private _warenNummerZusatz2 As String + + Private _warenNummerNational As String + + Private _warenBezeichnung As String + + Private _registrierNummerFremdSystem As String + + Private _kennnummerSendung As String + + Private _ursprungslandCode As String + + Private _eigenmasse As Decimal + + Private _rohmasse As Decimal + + Private _originalePositionsnummer As String + + Private _gefahrgutnummer As String + + Private _befoerderungskostenZahlungsweise As String + + Private _verfahren As VerfahrenERTyp + + Private _ausfuhrerstattungVerfahrenscode As String + + Private _menge As Decimal + + Private _wert As String + + Private _vorpapier As List(Of VorpapierERTyp) + + Private _packstueck As List(Of PackstueckERTyp) + + Private _containerNummer As List(Of String) + + Private _unterlage As List(Of UnterlageERTyp) + + Private _ausfuhrerstattung As AusfuhrerstattungPositionERTyp + + Private _inhaltsstoff As List(Of InhaltsstoffERTyp) + + Private _empfaenger As EmpfaengerPositionERTyp + + Private _beendigungZL As BeendigungZLERTyp + + Private _beendigungAVUV As BeendigungAVUVERTyp + + Private _incotermCode As String + + Private _incotermText As String + + Private _incotermOrt As String + + Private _geschaeftArtCode As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._beendigungAVUV = New BeendigungAVUVERTyp() + Me._beendigungZL = New BeendigungZLERTyp() + Me._empfaenger = New EmpfaengerPositionERTyp() + Me._inhaltsstoff = New List(Of InhaltsstoffERTyp)() + Me._ausfuhrerstattung = New AusfuhrerstattungPositionERTyp() + Me._unterlage = New List(Of UnterlageERTyp)() + Me._containerNummer = New List(Of String)() + Me._packstueck = New List(Of PackstueckERTyp)() + Me._vorpapier = New List(Of VorpapierERTyp)() + Me._verfahren = New VerfahrenERTyp() + End Sub + + + Public Property Positionsnummer() As String + Get + Return Me._positionsnummer + End Get + Set + Me._positionsnummer = Value + End Set + End Property + + + Public Property WarenNummerKN8() As String + Get + Return Me._warenNummerKN8 + End Get + Set + Me._warenNummerKN8 = Value + End Set + End Property + + + Public Property WarenNummerTARIC() As String + Get + Return Me._warenNummerTARIC + End Get + Set + Me._warenNummerTARIC = Value + End Set + End Property + + + Public Property WarenNummerZusatz1() As String + Get + Return Me._warenNummerZusatz1 + End Get + Set + Me._warenNummerZusatz1 = Value + End Set + End Property + + + Public Property WarenNummerZusatz2() As String + Get + Return Me._warenNummerZusatz2 + End Get + Set + Me._warenNummerZusatz2 = Value + End Set + End Property + + + Public Property WarenNummerNational() As String + Get + Return Me._warenNummerNational + End Get + Set + Me._warenNummerNational = 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 RegistrierNummerFremdSystem() As String + Get + Return Me._registrierNummerFremdSystem + End Get + Set + Me._registrierNummerFremdSystem = 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 UrsprungslandCode() As String + Get + Return Me._ursprungslandCode + End Get + Set + Me._ursprungslandCode = 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 Rohmasse() As Decimal + Get + Return Me._rohmasse + End Get + Set + Me._rohmasse = Value + End Set + End Property + + + Public Property OriginalePositionsnummer() As String + Get + Return Me._originalePositionsnummer + End Get + Set + Me._originalePositionsnummer = Value + End Set + End Property + + + Public Property Gefahrgutnummer() As String + Get + Return Me._gefahrgutnummer + End Get + Set + Me._gefahrgutnummer = 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 Verfahren() As VerfahrenERTyp + Get + Return Me._verfahren + End Get + Set + Me._verfahren = Value + End Set + End Property + + + Public Property AusfuhrerstattungVerfahrenscode() As String + Get + Return Me._ausfuhrerstattungVerfahrenscode + End Get + Set + Me._ausfuhrerstattungVerfahrenscode = Value + End Set + End Property + + + Public Property Menge() As Decimal + Get + Return Me._menge + End Get + Set + Me._menge = Value + End Set + End Property + + + Public Property Wert() As String + Get + Return Me._wert + End Get + Set + Me._wert = Value + End Set + End Property + + + Public Property Vorpapier() As List(Of VorpapierERTyp) + Get + Return Me._vorpapier + End Get + Set + Me._vorpapier = Value + End Set + End Property + + + Public Property Packstueck() As List(Of PackstueckERTyp) + Get + Return Me._packstueck + End Get + Set + Me._packstueck = 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 Unterlage() As List(Of UnterlageERTyp) + Get + Return Me._unterlage + End Get + Set + Me._unterlage = Value + End Set + End Property + + + Public Property Ausfuhrerstattung() As AusfuhrerstattungPositionERTyp + Get + Return Me._ausfuhrerstattung + End Get + Set + Me._ausfuhrerstattung = Value + End Set + End Property + + + Public Property Inhaltsstoff() As List(Of InhaltsstoffERTyp) + Get + Return Me._inhaltsstoff + End Get + Set + Me._inhaltsstoff = Value + End Set + End Property + + + Public Property Empfaenger() As EmpfaengerPositionERTyp + Get + Return Me._empfaenger + End Get + Set + Me._empfaenger = Value + End Set + End Property + + + Public Property BeendigungZL() As BeendigungZLERTyp + Get + Return Me._beendigungZL + End Get + Set + Me._beendigungZL = Value + End Set + End Property + + + Public Property BeendigungAVUV() As BeendigungAVUVERTyp + Get + Return Me._beendigungAVUV + End Get + Set + Me._beendigungAVUV = Value + End Set + End Property + + + Public Property IncotermCode() As String + Get + Return Me._incotermCode + End Get + Set + Me._incotermCode = Value + End Set + End Property + + + Public Property IncotermText() As String + Get + Return Me._incotermText + End Get + Set + Me._incotermText = Value + End Set + End Property + + + Public Property IncotermOrt() As String + Get + Return Me._incotermOrt + End Get + Set + Me._incotermOrt = Value + End Set + End Property + + + Public Property GeschaeftArtCode() As String + Get + Return Me._geschaeftArtCode + End Get + Set + Me._geschaeftArtCode = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PositionUeberlassungTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize PositionUeberlassungTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes PositionUeberlassungTyp object + ''' + ''' string to deserialize + ''' Output PositionUeberlassungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PositionUeberlassungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PositionUeberlassungTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PositionUeberlassungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As PositionUeberlassungTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PositionUeberlassungTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As PositionUeberlassungTyp + Return CType(SerializerXml.Deserialize(s), PositionUeberlassungTyp) + End Function +#End Region + + ''' + ''' Serializes current PositionUeberlassungTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an PositionUeberlassungTyp object + ''' + ''' File to load and deserialize + ''' Output PositionUeberlassungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PositionUeberlassungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PositionUeberlassungTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PositionUeberlassungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PositionUeberlassungTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ErzeugnisERTyp + +#Region "Private fields" + Private _erzeugnisWarennummer As String + + Private _erzeugnisWarenbezeichnung As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property ErzeugnisWarennummer() As String + Get + Return Me._erzeugnisWarennummer + End Get + Set + Me._erzeugnisWarennummer = Value + End Set + End Property + + + Public Property ErzeugnisWarenbezeichnung() As String + Get + Return Me._erzeugnisWarenbezeichnung + End Get + Set + Me._erzeugnisWarenbezeichnung = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ErzeugnisERTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ErzeugnisERTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ErzeugnisERTyp object + ''' + ''' string to deserialize + ''' Output ErzeugnisERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ErzeugnisERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ErzeugnisERTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ErzeugnisERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ErzeugnisERTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ErzeugnisERTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ErzeugnisERTyp + Return CType(SerializerXml.Deserialize(s), ErzeugnisERTyp) + End Function +#End Region + + ''' + ''' Serializes current ErzeugnisERTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ErzeugnisERTyp object + ''' + ''' File to load and deserialize + ''' Output ErzeugnisERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ErzeugnisERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ErzeugnisERTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ErzeugnisERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ErzeugnisERTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class NaemlichkeitERTyp + +#Region "Private fields" + Private _art As String + + Private _beschreibung 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 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(NaemlichkeitERTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize NaemlichkeitERTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes NaemlichkeitERTyp object + ''' + ''' string to deserialize + ''' Output NaemlichkeitERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As NaemlichkeitERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, NaemlichkeitERTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As NaemlichkeitERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As NaemlichkeitERTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), NaemlichkeitERTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As NaemlichkeitERTyp + Return CType(SerializerXml.Deserialize(s), NaemlichkeitERTyp) + End Function +#End Region + + ''' + ''' Serializes current NaemlichkeitERTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an NaemlichkeitERTyp object + ''' + ''' File to load and deserialize + ''' Output NaemlichkeitERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As NaemlichkeitERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, NaemlichkeitERTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As NaemlichkeitERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As NaemlichkeitERTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AusfuhrerstattungKopfERTyp + +#Region "Private fields" + Private _bestimmungsland As String + + Private _textlicheErklaerung As String + + Private _antragsart As String + + Private _zahlungsweg As String + + Private _zustellungsbevollmaechtigter As String + + Private _sicherheitskonto As String + + Private _klammerungsvorbehalt As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Bestimmungsland() As String + Get + Return Me._bestimmungsland + End Get + Set + Me._bestimmungsland = Value + End Set + End Property + + + Public Property TextlicheErklaerung() As String + Get + Return Me._textlicheErklaerung + End Get + Set + Me._textlicheErklaerung = Value + End Set + End Property + + + Public Property Antragsart() As String + Get + Return Me._antragsart + End Get + Set + Me._antragsart = Value + End Set + End Property + + + Public Property Zahlungsweg() As String + Get + Return Me._zahlungsweg + End Get + Set + Me._zahlungsweg = Value + End Set + End Property + + + Public Property Zustellungsbevollmaechtigter() As String + Get + Return Me._zustellungsbevollmaechtigter + End Get + Set + Me._zustellungsbevollmaechtigter = Value + End Set + End Property + + + Public Property Sicherheitskonto() As String + Get + Return Me._sicherheitskonto + End Get + Set + Me._sicherheitskonto = Value + End Set + End Property + + + Public Property Klammerungsvorbehalt() As String + Get + Return Me._klammerungsvorbehalt + End Get + Set + Me._klammerungsvorbehalt = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AusfuhrerstattungKopfERTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AusfuhrerstattungKopfERTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AusfuhrerstattungKopfERTyp object + ''' + ''' string to deserialize + ''' Output AusfuhrerstattungKopfERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AusfuhrerstattungKopfERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AusfuhrerstattungKopfERTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AusfuhrerstattungKopfERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AusfuhrerstattungKopfERTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AusfuhrerstattungKopfERTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AusfuhrerstattungKopfERTyp + Return CType(SerializerXml.Deserialize(s), AusfuhrerstattungKopfERTyp) + End Function +#End Region + + ''' + ''' Serializes current AusfuhrerstattungKopfERTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AusfuhrerstattungKopfERTyp object + ''' + ''' File to load and deserialize + ''' Output AusfuhrerstattungKopfERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AusfuhrerstattungKopfERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AusfuhrerstattungKopfERTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AusfuhrerstattungKopfERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AusfuhrerstattungKopfERTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class LieferbedingungERTyp + +#Region "Private fields" + Private _incotermCode As String + + Private _incotermText As String + + Private _incotermOrt As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property IncotermCode() As String + Get + Return Me._incotermCode + End Get + Set + Me._incotermCode = Value + End Set + End Property + + + Public Property IncotermText() As String + Get + Return Me._incotermText + End Get + Set + Me._incotermText = Value + End Set + End Property + + + Public Property IncotermOrt() As String + Get + Return Me._incotermOrt + End Get + Set + Me._incotermOrt = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(LieferbedingungERTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize LieferbedingungERTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes LieferbedingungERTyp object + ''' + ''' string to deserialize + ''' Output LieferbedingungERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As LieferbedingungERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, LieferbedingungERTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As LieferbedingungERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As LieferbedingungERTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), LieferbedingungERTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As LieferbedingungERTyp + Return CType(SerializerXml.Deserialize(s), LieferbedingungERTyp) + End Function +#End Region + + ''' + ''' Serializes current LieferbedingungERTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an LieferbedingungERTyp object + ''' + ''' File to load and deserialize + ''' Output LieferbedingungERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As LieferbedingungERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, LieferbedingungERTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As LieferbedingungERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As LieferbedingungERTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class VerfahrensinhaberPVERTyp + +#Region "Private fields" + Private _teilnehmerEORI As String + + Private _teilnehmerNLNR As String + + Private _name As String + + Private _strasse As String + + Private _ort As String + + Private _pLZ As String + + Private _landCode As String + + Private _ansprechpartner As AnsprechpartnerERTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._ansprechpartner = New AnsprechpartnerERTyp() + End Sub + + + Public Property TeilnehmerEORI() As String + Get + Return Me._teilnehmerEORI + End Get + Set + Me._teilnehmerEORI = Value + End Set + End Property + + + Public Property TeilnehmerNLNR() As String + Get + Return Me._teilnehmerNLNR + End Get + Set + Me._teilnehmerNLNR = 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 Strasse() As String + Get + Return Me._strasse + End Get + Set + Me._strasse = 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 PLZ() As String + Get + Return Me._pLZ + End Get + Set + Me._pLZ = Value + End Set + End Property + + + Public Property LandCode() As String + Get + Return Me._landCode + End Get + Set + Me._landCode = Value + End Set + End Property + + + Public Property Ansprechpartner() As AnsprechpartnerERTyp + 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(VerfahrensinhaberPVERTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize VerfahrensinhaberPVERTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes VerfahrensinhaberPVERTyp object + ''' + ''' string to deserialize + ''' Output VerfahrensinhaberPVERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VerfahrensinhaberPVERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VerfahrensinhaberPVERTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VerfahrensinhaberPVERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As VerfahrensinhaberPVERTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), VerfahrensinhaberPVERTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As VerfahrensinhaberPVERTyp + Return CType(SerializerXml.Deserialize(s), VerfahrensinhaberPVERTyp) + End Function +#End Region + + ''' + ''' Serializes current VerfahrensinhaberPVERTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an VerfahrensinhaberPVERTyp object + ''' + ''' File to load and deserialize + ''' Output VerfahrensinhaberPVERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VerfahrensinhaberPVERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VerfahrensinhaberPVERTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VerfahrensinhaberPVERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As VerfahrensinhaberPVERTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AnsprechpartnerERTyp + +#Region "Private fields" + Private _sachbearbeiter As String + + Private _telefonnummer As String + + Private _stellung As String + + Private _emailAdresse As String + + Private _telefaxnummer 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 Telefonnummer() As String + Get + Return Me._telefonnummer + End Get + Set + Me._telefonnummer = 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 EmailAdresse() As String + Get + Return Me._emailAdresse + End Get + Set + Me._emailAdresse = Value + End Set + End Property + + + Public Property Telefaxnummer() As String + Get + Return Me._telefaxnummer + End Get + Set + Me._telefaxnummer = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AnsprechpartnerERTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AnsprechpartnerERTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AnsprechpartnerERTyp object + ''' + ''' string to deserialize + ''' Output AnsprechpartnerERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AnsprechpartnerERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AnsprechpartnerERTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AnsprechpartnerERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AnsprechpartnerERTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AnsprechpartnerERTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AnsprechpartnerERTyp + Return CType(SerializerXml.Deserialize(s), AnsprechpartnerERTyp) + End Function +#End Region + + ''' + ''' Serializes current AnsprechpartnerERTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AnsprechpartnerERTyp object + ''' + ''' File to load and deserialize + ''' Output AnsprechpartnerERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AnsprechpartnerERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AnsprechpartnerERTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AnsprechpartnerERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AnsprechpartnerERTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class SubUnternehmerERTyp + +#Region "Private fields" + Private _teilnehmerEORI As String + + Private _teilnehmerNLNR As String + + Private _name As String + + Private _strasse As String + + Private _ort As String + + Private _pLZ As String + + Private _landCode As String + + Private _ansprechpartner As AnsprechpartnerERTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._ansprechpartner = New AnsprechpartnerERTyp() + End Sub + + + Public Property TeilnehmerEORI() As String + Get + Return Me._teilnehmerEORI + End Get + Set + Me._teilnehmerEORI = Value + End Set + End Property + + + Public Property TeilnehmerNLNR() As String + Get + Return Me._teilnehmerNLNR + End Get + Set + Me._teilnehmerNLNR = 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 Strasse() As String + Get + Return Me._strasse + End Get + Set + Me._strasse = 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 PLZ() As String + Get + Return Me._pLZ + End Get + Set + Me._pLZ = Value + End Set + End Property + + + Public Property LandCode() As String + Get + Return Me._landCode + End Get + Set + Me._landCode = Value + End Set + End Property + + + Public Property Ansprechpartner() As AnsprechpartnerERTyp + 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(SubUnternehmerERTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize SubUnternehmerERTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes SubUnternehmerERTyp object + ''' + ''' string to deserialize + ''' Output SubUnternehmerERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SubUnternehmerERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SubUnternehmerERTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SubUnternehmerERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As SubUnternehmerERTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), SubUnternehmerERTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As SubUnternehmerERTyp + Return CType(SerializerXml.Deserialize(s), SubUnternehmerERTyp) + End Function +#End Region + + ''' + ''' Serializes current SubUnternehmerERTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an SubUnternehmerERTyp object + ''' + ''' File to load and deserialize + ''' Output SubUnternehmerERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SubUnternehmerERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SubUnternehmerERTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SubUnternehmerERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As SubUnternehmerERTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class VertreterAnmelderERTyp + +#Region "Private fields" + Private _teilnehmerEORI As String + + Private _teilnehmerNLNR As String + + Private _name As String + + Private _strasse As String + + Private _ort As String + + Private _pLZ As String + + Private _landCode As String + + Private _ansprechpartner As AnsprechpartnerERTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._ansprechpartner = New AnsprechpartnerERTyp() + End Sub + + + Public Property TeilnehmerEORI() As String + Get + Return Me._teilnehmerEORI + End Get + Set + Me._teilnehmerEORI = Value + End Set + End Property + + + Public Property TeilnehmerNLNR() As String + Get + Return Me._teilnehmerNLNR + End Get + Set + Me._teilnehmerNLNR = 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 Strasse() As String + Get + Return Me._strasse + End Get + Set + Me._strasse = 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 PLZ() As String + Get + Return Me._pLZ + End Get + Set + Me._pLZ = Value + End Set + End Property + + + Public Property LandCode() As String + Get + Return Me._landCode + End Get + Set + Me._landCode = Value + End Set + End Property + + + Public Property Ansprechpartner() As AnsprechpartnerERTyp + 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(VertreterAnmelderERTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize VertreterAnmelderERTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes VertreterAnmelderERTyp object + ''' + ''' string to deserialize + ''' Output VertreterAnmelderERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VertreterAnmelderERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VertreterAnmelderERTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VertreterAnmelderERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As VertreterAnmelderERTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), VertreterAnmelderERTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As VertreterAnmelderERTyp + Return CType(SerializerXml.Deserialize(s), VertreterAnmelderERTyp) + End Function +#End Region + + ''' + ''' Serializes current VertreterAnmelderERTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an VertreterAnmelderERTyp object + ''' + ''' File to load and deserialize + ''' Output VertreterAnmelderERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VertreterAnmelderERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VertreterAnmelderERTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VertreterAnmelderERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As VertreterAnmelderERTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AnmelderERTyp + +#Region "Private fields" + Private _teilnehmerEORI As String + + Private _teilnehmerNLNR As String + + Private _name As String + + Private _strasse As String + + Private _ort As String + + Private _pLZ As String + + Private _landCode As String + + Private _ansprechpartner As AnsprechpartnerERTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._ansprechpartner = New AnsprechpartnerERTyp() + End Sub + + + Public Property TeilnehmerEORI() As String + Get + Return Me._teilnehmerEORI + End Get + Set + Me._teilnehmerEORI = Value + End Set + End Property + + + Public Property TeilnehmerNLNR() As String + Get + Return Me._teilnehmerNLNR + End Get + Set + Me._teilnehmerNLNR = 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 Strasse() As String + Get + Return Me._strasse + End Get + Set + Me._strasse = 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 PLZ() As String + Get + Return Me._pLZ + End Get + Set + Me._pLZ = Value + End Set + End Property + + + Public Property LandCode() As String + Get + Return Me._landCode + End Get + Set + Me._landCode = Value + End Set + End Property + + + Public Property Ansprechpartner() As AnsprechpartnerERTyp + 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(AnmelderERTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AnmelderERTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AnmelderERTyp object + ''' + ''' string to deserialize + ''' Output AnmelderERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AnmelderERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AnmelderERTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AnmelderERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AnmelderERTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AnmelderERTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AnmelderERTyp + Return CType(SerializerXml.Deserialize(s), AnmelderERTyp) + End Function +#End Region + + ''' + ''' Serializes current AnmelderERTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AnmelderERTyp object + ''' + ''' File to load and deserialize + ''' Output AnmelderERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AnmelderERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AnmelderERTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AnmelderERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AnmelderERTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class EmpfaengerERTyp + +#Region "Private fields" + Private _teilnehmerEORI As String + + Private _identifikationsart As String + + Private _teilnehmerNLNR As String + + Private _name As String + + Private _strasse As String + + Private _ort As String + + Private _pLZ As String + + Private _landCode As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property TeilnehmerEORI() As String + Get + Return Me._teilnehmerEORI + End Get + Set + Me._teilnehmerEORI = 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 TeilnehmerNLNR() As String + Get + Return Me._teilnehmerNLNR + End Get + Set + Me._teilnehmerNLNR = 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 Strasse() As String + Get + Return Me._strasse + End Get + Set + Me._strasse = 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 PLZ() As String + Get + Return Me._pLZ + End Get + Set + Me._pLZ = Value + End Set + End Property + + + Public Property LandCode() As String + Get + Return Me._landCode + End Get + Set + Me._landCode = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(EmpfaengerERTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize EmpfaengerERTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes EmpfaengerERTyp object + ''' + ''' string to deserialize + ''' Output EmpfaengerERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EmpfaengerERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EmpfaengerERTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EmpfaengerERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As EmpfaengerERTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), EmpfaengerERTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As EmpfaengerERTyp + Return CType(SerializerXml.Deserialize(s), EmpfaengerERTyp) + End Function +#End Region + + ''' + ''' Serializes current EmpfaengerERTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an EmpfaengerERTyp object + ''' + ''' File to load and deserialize + ''' Output EmpfaengerERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EmpfaengerERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EmpfaengerERTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EmpfaengerERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As EmpfaengerERTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AusfuehrerERTyp + +#Region "Private fields" + Private _teilnehmerEORI As String + + Private _identifikationsart As String + + Private _teilnehmerNLNR As String + + Private _name As String + + Private _strasse As String + + Private _ort As String + + Private _pLZ As String + + Private _landCode As String + + Private _ansprechpartner As AnsprechpartnerERTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._ansprechpartner = New AnsprechpartnerERTyp() + End Sub + + + Public Property TeilnehmerEORI() As String + Get + Return Me._teilnehmerEORI + End Get + Set + Me._teilnehmerEORI = 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 TeilnehmerNLNR() As String + Get + Return Me._teilnehmerNLNR + End Get + Set + Me._teilnehmerNLNR = 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 Strasse() As String + Get + Return Me._strasse + End Get + Set + Me._strasse = 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 PLZ() As String + Get + Return Me._pLZ + End Get + Set + Me._pLZ = Value + End Set + End Property + + + Public Property LandCode() As String + Get + Return Me._landCode + End Get + Set + Me._landCode = Value + End Set + End Property + + + Public Property Ansprechpartner() As AnsprechpartnerERTyp + 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(AusfuehrerERTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AusfuehrerERTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AusfuehrerERTyp object + ''' + ''' string to deserialize + ''' Output AusfuehrerERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AusfuehrerERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AusfuehrerERTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AusfuehrerERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AusfuehrerERTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AusfuehrerERTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AusfuehrerERTyp + Return CType(SerializerXml.Deserialize(s), AusfuehrerERTyp) + End Function +#End Region + + ''' + ''' Serializes current AusfuehrerERTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AusfuehrerERTyp object + ''' + ''' File to load and deserialize + ''' Output AusfuehrerERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AusfuehrerERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AusfuehrerERTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AusfuehrerERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AusfuehrerERTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class VerschluesseERTyp + +#Region "Private fields" + Private _artCode 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 ArtCode() As String + Get + Return Me._artCode + End Get + Set + Me._artCode = 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(VerschluesseERTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize VerschluesseERTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes VerschluesseERTyp object + ''' + ''' string to deserialize + ''' Output VerschluesseERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VerschluesseERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VerschluesseERTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VerschluesseERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As VerschluesseERTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), VerschluesseERTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As VerschluesseERTyp + Return CType(SerializerXml.Deserialize(s), VerschluesseERTyp) + End Function +#End Region + + ''' + ''' Serializes current VerschluesseERTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an VerschluesseERTyp object + ''' + ''' File to load and deserialize + ''' Output VerschluesseERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VerschluesseERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VerschluesseERTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VerschluesseERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As VerschluesseERTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class BeantragterLadeortERTyp + +#Region "Private fields" + Private _ortID As String + + Private _strasse As String + + Private _pLZ As String + + Private _ort As String + + Private _zusatz As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property OrtID() As String + Get + Return Me._ortID + End Get + Set + Me._ortID = Value + End Set + End Property + + + Public Property Strasse() As String + Get + Return Me._strasse + End Get + Set + Me._strasse = 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 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(BeantragterLadeortERTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize BeantragterLadeortERTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes BeantragterLadeortERTyp object + ''' + ''' string to deserialize + ''' Output BeantragterLadeortERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BeantragterLadeortERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BeantragterLadeortERTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BeantragterLadeortERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As BeantragterLadeortERTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), BeantragterLadeortERTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As BeantragterLadeortERTyp + Return CType(SerializerXml.Deserialize(s), BeantragterLadeortERTyp) + End Function +#End Region + + ''' + ''' Serializes current BeantragterLadeortERTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an BeantragterLadeortERTyp object + ''' + ''' File to load and deserialize + ''' Output BeantragterLadeortERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BeantragterLadeortERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BeantragterLadeortERTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BeantragterLadeortERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As BeantragterLadeortERTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class BefoerderungsmittelERTyp + +#Region "Private fields" + Private _artCode As String + + Private _kennzeichen As String + + Private _staatCode As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property ArtCode() As String + Get + Return Me._artCode + End Get + Set + Me._artCode = Value + End Set + End Property + + + Public Property Kennzeichen() As String + Get + Return Me._kennzeichen + End Get + Set + Me._kennzeichen = Value + End Set + End Property + + + Public Property StaatCode() As String + Get + Return Me._staatCode + End Get + Set + Me._staatCode = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(BefoerderungsmittelERTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize BefoerderungsmittelERTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes BefoerderungsmittelERTyp object + ''' + ''' string to deserialize + ''' Output BefoerderungsmittelERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BefoerderungsmittelERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BefoerderungsmittelERTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BefoerderungsmittelERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As BefoerderungsmittelERTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), BefoerderungsmittelERTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As BefoerderungsmittelERTyp + Return CType(SerializerXml.Deserialize(s), BefoerderungsmittelERTyp) + End Function +#End Region + + ''' + ''' Serializes current BefoerderungsmittelERTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an BefoerderungsmittelERTyp object + ''' + ''' File to load and deserialize + ''' Output BefoerderungsmittelERTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BefoerderungsmittelERTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BefoerderungsmittelERTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BefoerderungsmittelERTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As BefoerderungsmittelERTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class KopfDatenUeberlassungTyp + +#Region "Private fields" + Private _anmeldeArtAusfuhrCode As String + + Private _anmeldeArtVerfahrenCode As String + + Private _anmeldeArtUeberfuehrungCode As String + + Private _movementReferenceNumber As String + + Private _bestimmungslandCode As String + + Private _ausfuhrlandCode As String + + Private _entgegennahmeDatumZeit As Date + + Private _annahmeDatumZeit As Date + + Private _datumAusgang As Date + + Private _ueberlassungDatumZeit As Date + + Private _massgeblichesDatum As Date + + Private _containerIndikator As String + + Private _beteiligtenKonstellation As String + + Private _gesamtRohMasse As Decimal + + Private _registrierNummerFremdSystem As String + + Private _anzahlPackStuecke As String + + Private _anzahlPositionen As String + + Private _verkehrszweigInland As String + + Private _befoerderungsmittelAbgang As BefoerderungsmittelERTyp + + Private _verkehrszweigGrenze As String + + Private _befoerderungsmittelGrenze As BefoerderungsmittelERTyp + + Private _ausfuhrZollstelleID As String + + Private _ausfuhrZollstelleErgaenzungID As String + + Private _ausgangZollstelleID As String + + Private _tatsaechlicheAusgangZollstelleID As String + + Private _bewilligungsnummerAnschreibeverfahren As String + + Private _bewilligungsnummerPassiveVeredelung As String + + Private _bewilligungsnummerVertrauenswuerdigerAusfuehrer As String + + Private _bewilligungsnummerAusfuhr As String + + Private _beantragterLadeort As BeantragterLadeortERTyp + + Private _geschaeftArtCode As String + + Private _rechnungspreis As Decimal + + Private _rechnungswaehrung As String + + Private _besondereUmstaende As String + + Private _befoerderungskostenZahlungsweise As String + + Private _kennnummerSendung As String + + Private _besondererTatbestand As List(Of String) + + Private _verschluss As VerschluesseERTyp + + Private _ausfuehrer As AusfuehrerERTyp + + Private _empfaenger As EmpfaengerERTyp + + Private _anmelder As AnmelderERTyp + + Private _vertreterAnmelder As VertreterAnmelderERTyp + + Private _subUnternehmer As SubUnternehmerERTyp + + Private _verfahrensinhaberPV As VerfahrensinhaberPVERTyp + + Private _lieferbedingung As LieferbedingungERTyp + + Private _ausfuhrerstattung As AusfuhrerstattungKopfERTyp + + Private _dateinameExportbegleitdokument As String + + Private _befoerderungsrouteLand As List(Of String) + + Private _wiedereinfuhrDatum As Date + + Private _standardaustausch As String + + Private _wiedereinfuhrland As List(Of String) + + Private _naemlichkeit As List(Of NaemlichkeitERTyp) + + Private _erzeugnis As List(Of ErzeugnisERTyp) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._erzeugnis = New List(Of ErzeugnisERTyp)() + Me._naemlichkeit = New List(Of NaemlichkeitERTyp)() + Me._wiedereinfuhrland = New List(Of String)() + Me._befoerderungsrouteLand = New List(Of String)() + Me._ausfuhrerstattung = New AusfuhrerstattungKopfERTyp() + Me._lieferbedingung = New LieferbedingungERTyp() + Me._verfahrensinhaberPV = New VerfahrensinhaberPVERTyp() + Me._subUnternehmer = New SubUnternehmerERTyp() + Me._vertreterAnmelder = New VertreterAnmelderERTyp() + Me._anmelder = New AnmelderERTyp() + Me._empfaenger = New EmpfaengerERTyp() + Me._ausfuehrer = New AusfuehrerERTyp() + Me._verschluss = New VerschluesseERTyp() + Me._besondererTatbestand = New List(Of String)() + Me._beantragterLadeort = New BeantragterLadeortERTyp() + Me._befoerderungsmittelGrenze = New BefoerderungsmittelERTyp() + Me._befoerderungsmittelAbgang = New BefoerderungsmittelERTyp() + End Sub + + + Public Property AnmeldeArtAusfuhrCode() As String + Get + Return Me._anmeldeArtAusfuhrCode + End Get + Set + Me._anmeldeArtAusfuhrCode = Value + End Set + End Property + + + Public Property AnmeldeArtVerfahrenCode() As String + Get + Return Me._anmeldeArtVerfahrenCode + End Get + Set + Me._anmeldeArtVerfahrenCode = Value + End Set + End Property + + + Public Property AnmeldeArtUeberfuehrungCode() As String + Get + Return Me._anmeldeArtUeberfuehrungCode + End Get + Set + Me._anmeldeArtUeberfuehrungCode = Value + End Set + End Property + + + Public Property MovementReferenceNumber() As String + Get + Return Me._movementReferenceNumber + End Get + Set + Me._movementReferenceNumber = Value + End Set + End Property + + + Public Property BestimmungslandCode() As String + Get + Return Me._bestimmungslandCode + End Get + Set + Me._bestimmungslandCode = Value + End Set + End Property + + + Public Property AusfuhrlandCode() As String + Get + Return Me._ausfuhrlandCode + End Get + Set + Me._ausfuhrlandCode = 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 AnnahmeDatumZeit() As Date + Get + Return Me._annahmeDatumZeit + End Get + Set + Me._annahmeDatumZeit = Value + End Set + End Property + + + Public Property DatumAusgang() As Date + Get + Return Me._datumAusgang + End Get + Set + Me._datumAusgang = Value + End Set + End Property + + + Public Property UeberlassungDatumZeit() As Date + Get + Return Me._ueberlassungDatumZeit + End Get + Set + Me._ueberlassungDatumZeit = Value + End Set + End Property + + + Public Property MassgeblichesDatum() As Date + Get + Return Me._massgeblichesDatum + End Get + Set + Me._massgeblichesDatum = Value + End Set + End Property + + + Public Property ContainerIndikator() As String + Get + Return Me._containerIndikator + End Get + Set + Me._containerIndikator = Value + End Set + End Property + + + Public Property BeteiligtenKonstellation() As String + Get + Return Me._beteiligtenKonstellation + End Get + Set + Me._beteiligtenKonstellation = 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 RegistrierNummerFremdSystem() As String + Get + Return Me._registrierNummerFremdSystem + End Get + Set + Me._registrierNummerFremdSystem = Value + End Set + End Property + + + Public Property AnzahlPackStuecke() As String + Get + Return Me._anzahlPackStuecke + End Get + Set + Me._anzahlPackStuecke = 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 VerkehrszweigInland() As String + Get + Return Me._verkehrszweigInland + End Get + Set + Me._verkehrszweigInland = Value + End Set + End Property + + + Public Property BefoerderungsmittelAbgang() As BefoerderungsmittelERTyp + Get + Return Me._befoerderungsmittelAbgang + End Get + Set + Me._befoerderungsmittelAbgang = Value + End Set + End Property + + + Public Property VerkehrszweigGrenze() As String + Get + Return Me._verkehrszweigGrenze + End Get + Set + Me._verkehrszweigGrenze = Value + End Set + End Property + + + Public Property BefoerderungsmittelGrenze() As BefoerderungsmittelERTyp + Get + Return Me._befoerderungsmittelGrenze + End Get + Set + Me._befoerderungsmittelGrenze = Value + End Set + End Property + + + Public Property AusfuhrZollstelleID() As String + Get + Return Me._ausfuhrZollstelleID + End Get + Set + Me._ausfuhrZollstelleID = Value + End Set + End Property + + + Public Property AusfuhrZollstelleErgaenzungID() As String + Get + Return Me._ausfuhrZollstelleErgaenzungID + End Get + Set + Me._ausfuhrZollstelleErgaenzungID = Value + End Set + End Property + + + Public Property AusgangZollstelleID() As String + Get + Return Me._ausgangZollstelleID + End Get + Set + Me._ausgangZollstelleID = Value + End Set + End Property + + + Public Property TatsaechlicheAusgangZollstelleID() As String + Get + Return Me._tatsaechlicheAusgangZollstelleID + End Get + Set + Me._tatsaechlicheAusgangZollstelleID = Value + End Set + End Property + + + Public Property BewilligungsnummerAnschreibeverfahren() As String + Get + Return Me._bewilligungsnummerAnschreibeverfahren + End Get + Set + Me._bewilligungsnummerAnschreibeverfahren = Value + End Set + End Property + + + Public Property BewilligungsnummerPassiveVeredelung() As String + Get + Return Me._bewilligungsnummerPassiveVeredelung + End Get + Set + Me._bewilligungsnummerPassiveVeredelung = Value + End Set + End Property + + + Public Property BewilligungsnummerVertrauenswuerdigerAusfuehrer() As String + Get + Return Me._bewilligungsnummerVertrauenswuerdigerAusfuehrer + End Get + Set + Me._bewilligungsnummerVertrauenswuerdigerAusfuehrer = Value + End Set + End Property + + + Public Property BewilligungsnummerAusfuhr() As String + Get + Return Me._bewilligungsnummerAusfuhr + End Get + Set + Me._bewilligungsnummerAusfuhr = Value + End Set + End Property + + + Public Property BeantragterLadeort() As BeantragterLadeortERTyp + Get + Return Me._beantragterLadeort + End Get + Set + Me._beantragterLadeort = Value + End Set + End Property + + + Public Property GeschaeftArtCode() As String + Get + Return Me._geschaeftArtCode + End Get + Set + Me._geschaeftArtCode = Value + End Set + End Property + + + Public Property Rechnungspreis() As Decimal + Get + Return Me._rechnungspreis + End Get + Set + Me._rechnungspreis = Value + End Set + End Property + + + Public Property Rechnungswaehrung() As String + Get + Return Me._rechnungswaehrung + End Get + Set + Me._rechnungswaehrung = 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 BefoerderungskostenZahlungsweise() As String + Get + Return Me._befoerderungskostenZahlungsweise + End Get + Set + Me._befoerderungskostenZahlungsweise = 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 BesondererTatbestand() As List(Of String) + Get + Return Me._besondererTatbestand + End Get + Set + Me._besondererTatbestand = Value + End Set + End Property + + + Public Property Verschluss() As VerschluesseERTyp + Get + Return Me._verschluss + End Get + Set + Me._verschluss = Value + End Set + End Property + + + Public Property Ausfuehrer() As AusfuehrerERTyp + Get + Return Me._ausfuehrer + End Get + Set + Me._ausfuehrer = Value + End Set + End Property + + + Public Property Empfaenger() As EmpfaengerERTyp + Get + Return Me._empfaenger + End Get + Set + Me._empfaenger = Value + End Set + End Property + + + Public Property Anmelder() As AnmelderERTyp + Get + Return Me._anmelder + End Get + Set + Me._anmelder = Value + End Set + End Property + + + Public Property VertreterAnmelder() As VertreterAnmelderERTyp + Get + Return Me._vertreterAnmelder + End Get + Set + Me._vertreterAnmelder = Value + End Set + End Property + + + Public Property SubUnternehmer() As SubUnternehmerERTyp + Get + Return Me._subUnternehmer + End Get + Set + Me._subUnternehmer = Value + End Set + End Property + + + Public Property VerfahrensinhaberPV() As VerfahrensinhaberPVERTyp + Get + Return Me._verfahrensinhaberPV + End Get + Set + Me._verfahrensinhaberPV = Value + End Set + End Property + + + Public Property Lieferbedingung() As LieferbedingungERTyp + Get + Return Me._lieferbedingung + End Get + Set + Me._lieferbedingung = Value + End Set + End Property + + + Public Property Ausfuhrerstattung() As AusfuhrerstattungKopfERTyp + Get + Return Me._ausfuhrerstattung + End Get + Set + Me._ausfuhrerstattung = Value + End Set + End Property + + + Public Property DateinameExportbegleitdokument() As String + Get + Return Me._dateinameExportbegleitdokument + End Get + Set + Me._dateinameExportbegleitdokument = Value + End Set + End Property + + + Public Property BefoerderungsrouteLand() As List(Of String) + Get + Return Me._befoerderungsrouteLand + End Get + Set + Me._befoerderungsrouteLand = Value + End Set + End Property + + + Public Property WiedereinfuhrDatum() As Date + Get + Return Me._wiedereinfuhrDatum + End Get + Set + Me._wiedereinfuhrDatum = Value + End Set + End Property + + + Public Property Standardaustausch() As String + Get + Return Me._standardaustausch + End Get + Set + Me._standardaustausch = Value + End Set + End Property + + + Public Property Wiedereinfuhrland() As List(Of String) + Get + Return Me._wiedereinfuhrland + End Get + Set + Me._wiedereinfuhrland = Value + End Set + End Property + + + Public Property Naemlichkeit() As List(Of NaemlichkeitERTyp) + Get + Return Me._naemlichkeit + End Get + Set + Me._naemlichkeit = Value + End Set + End Property + + + Public Property Erzeugnis() As List(Of ErzeugnisERTyp) + Get + Return Me._erzeugnis + End Get + Set + Me._erzeugnis = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(KopfDatenUeberlassungTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize KopfDatenUeberlassungTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes KopfDatenUeberlassungTyp object + ''' + ''' string to deserialize + ''' Output KopfDatenUeberlassungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As KopfDatenUeberlassungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, KopfDatenUeberlassungTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As KopfDatenUeberlassungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As KopfDatenUeberlassungTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), KopfDatenUeberlassungTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As KopfDatenUeberlassungTyp + Return CType(SerializerXml.Deserialize(s), KopfDatenUeberlassungTyp) + End Function +#End Region + + ''' + ''' Serializes current KopfDatenUeberlassungTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an KopfDatenUeberlassungTyp object + ''' + ''' File to load and deserialize + ''' Output KopfDatenUeberlassungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As KopfDatenUeberlassungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, KopfDatenUeberlassungTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As KopfDatenUeberlassungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As KopfDatenUeberlassungTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransaktionExportTyp + +#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(TransaktionExportTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransaktionExportTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransaktionExportTyp object + ''' + ''' string to deserialize + ''' Output TransaktionExportTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransaktionExportTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransaktionExportTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransaktionExportTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransaktionExportTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransaktionExportTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransaktionExportTyp + Return CType(SerializerXml.Deserialize(s), TransaktionExportTyp) + End Function +#End Region + + ''' + ''' Serializes current TransaktionExportTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransaktionExportTyp object + ''' + ''' File to load and deserialize + ''' Output TransaktionExportTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransaktionExportTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransaktionExportTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransaktionExportTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransaktionExportTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DatenaustauschExportTyp + +#Region "Private fields" + Private _transaktion As TransaktionExportTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._transaktion = New TransaktionExportTyp() + End Sub + + + Public Property Transaktion() As TransaktionExportTyp + 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(DatenaustauschExportTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DatenaustauschExportTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DatenaustauschExportTyp object + ''' + ''' string to deserialize + ''' Output DatenaustauschExportTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DatenaustauschExportTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DatenaustauschExportTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DatenaustauschExportTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DatenaustauschExportTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DatenaustauschExportTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DatenaustauschExportTyp + Return CType(SerializerXml.Deserialize(s), DatenaustauschExportTyp) + End Function +#End Region + + ''' + ''' Serializes current DatenaustauschExportTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DatenaustauschExportTyp object + ''' + ''' File to load and deserialize + ''' Output DatenaustauschExportTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DatenaustauschExportTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DatenaustauschExportTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DatenaustauschExportTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DatenaustauschExportTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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/AES/UeberlassungAusfuhr/UeberlassungAusfuhr_007.xsd b/DAKOSY_Worker/DAKOSY/ATLAS/AES/UeberlassungAusfuhr/UeberlassungAusfuhr_007.xsd new file mode 100644 index 0000000..c221e7f --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/AES/UeberlassungAusfuhr/UeberlassungAusfuhr_007.xsd @@ -0,0 +1,1172 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/EZA/Abgabenbescheid/Abgabenbescheid_011.Designer.vb b/DAKOSY_Worker/DAKOSY/ATLAS/EZA/Abgabenbescheid/Abgabenbescheid_011.Designer.vb new file mode 100644 index 0000000..f319804 --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/EZA/Abgabenbescheid/Abgabenbescheid_011.Designer.vb @@ -0,0 +1,6970 @@ +'' ------------------------------------------------------------------------------ +'' +'' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com +'' {"TargetFramework":"Net47","NameSpace":"Abgabenbescheid_011","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 Abgabenbescheid_011 + + + Partial Public Class AbgabenbescheidEinfuhrTAXTyp + Inherits DatenaustauschFreierVerkehrTyp + +#Region "Private fields" + Private _einzelAbgabenbescheid As EinzelAbgabenbescheidTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._einzelAbgabenbescheid = New EinzelAbgabenbescheidTyp() + End Sub + + + Public Property EinzelAbgabenbescheid() As EinzelAbgabenbescheidTyp + Get + Return Me._einzelAbgabenbescheid + End Get + Set + Me._einzelAbgabenbescheid = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AbgabenbescheidEinfuhrTAXTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AbgabenbescheidEinfuhrTAXTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AbgabenbescheidEinfuhrTAXTyp object + ''' + ''' string to deserialize + ''' Output AbgabenbescheidEinfuhrTAXTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AbgabenbescheidEinfuhrTAXTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AbgabenbescheidEinfuhrTAXTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AbgabenbescheidEinfuhrTAXTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AbgabenbescheidEinfuhrTAXTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AbgabenbescheidEinfuhrTAXTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AbgabenbescheidEinfuhrTAXTyp + Return CType(SerializerXml.Deserialize(s), AbgabenbescheidEinfuhrTAXTyp) + End Function +#End Region + + ''' + ''' Serializes current AbgabenbescheidEinfuhrTAXTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AbgabenbescheidEinfuhrTAXTyp object + ''' + ''' File to load and deserialize + ''' Output AbgabenbescheidEinfuhrTAXTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AbgabenbescheidEinfuhrTAXTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AbgabenbescheidEinfuhrTAXTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AbgabenbescheidEinfuhrTAXTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AbgabenbescheidEinfuhrTAXTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class EinzelAbgabenbescheidTyp + +#Region "Private fields" + Private _objektIdentifizierung As ObjektIdentifizierungTAXTyp + + Private _kopfDaten As KopfDatenEinfuhrbescheidTyp + + Private _position As List(Of PositionAbgabenbescheidEinfuhrTyp) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._position = New List(Of PositionAbgabenbescheidEinfuhrTyp)() + Me._kopfDaten = New KopfDatenEinfuhrbescheidTyp() + Me._objektIdentifizierung = New ObjektIdentifizierungTAXTyp() + End Sub + + + Public Property ObjektIdentifizierung() As ObjektIdentifizierungTAXTyp + Get + Return Me._objektIdentifizierung + End Get + Set + Me._objektIdentifizierung = Value + End Set + End Property + + + Public Property KopfDaten() As KopfDatenEinfuhrbescheidTyp + Get + Return Me._kopfDaten + End Get + Set + Me._kopfDaten = Value + End Set + End Property + + + Public Property Position() As List(Of PositionAbgabenbescheidEinfuhrTyp) + Get + Return Me._position + End Get + Set + Me._position = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(EinzelAbgabenbescheidTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize EinzelAbgabenbescheidTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes EinzelAbgabenbescheidTyp object + ''' + ''' string to deserialize + ''' Output EinzelAbgabenbescheidTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelAbgabenbescheidTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EinzelAbgabenbescheidTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelAbgabenbescheidTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As EinzelAbgabenbescheidTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), EinzelAbgabenbescheidTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As EinzelAbgabenbescheidTyp + Return CType(SerializerXml.Deserialize(s), EinzelAbgabenbescheidTyp) + End Function +#End Region + + ''' + ''' Serializes current EinzelAbgabenbescheidTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an EinzelAbgabenbescheidTyp object + ''' + ''' File to load and deserialize + ''' Output EinzelAbgabenbescheidTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelAbgabenbescheidTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EinzelAbgabenbescheidTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelAbgabenbescheidTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As EinzelAbgabenbescheidTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ObjektIdentifizierungTAXTyp + +#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(ObjektIdentifizierungTAXTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ObjektIdentifizierungTAXTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ObjektIdentifizierungTAXTyp object + ''' + ''' string to deserialize + ''' Output ObjektIdentifizierungTAXTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ObjektIdentifizierungTAXTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ObjektIdentifizierungTAXTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ObjektIdentifizierungTAXTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ObjektIdentifizierungTAXTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ObjektIdentifizierungTAXTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ObjektIdentifizierungTAXTyp + Return CType(SerializerXml.Deserialize(s), ObjektIdentifizierungTAXTyp) + End Function +#End Region + + ''' + ''' Serializes current ObjektIdentifizierungTAXTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ObjektIdentifizierungTAXTyp object + ''' + ''' File to load and deserialize + ''' Output ObjektIdentifizierungTAXTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ObjektIdentifizierungTAXTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ObjektIdentifizierungTAXTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ObjektIdentifizierungTAXTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ObjektIdentifizierungTAXTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class EinzelAbgabenSatzTAXTyp + +#Region "Private fields" + Private _lfdNrAbgabensatz As String + + Private _abgabensatz As Decimal + + Private _bemessungsmassstab As String + + Private _gehaltsangabenArt As String + + Private _gehaltsangabenGradProzent As Decimal + + Private _bemessungsgrundlageKz As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property LfdNrAbgabensatz() As String + Get + Return Me._lfdNrAbgabensatz + End Get + Set + Me._lfdNrAbgabensatz = Value + End Set + End Property + + + Public Property Abgabensatz() As Decimal + Get + Return Me._abgabensatz + End Get + Set + Me._abgabensatz = Value + End Set + End Property + + + Public Property Bemessungsmassstab() As String + Get + Return Me._bemessungsmassstab + End Get + Set + Me._bemessungsmassstab = Value + End Set + End Property + + + Public Property GehaltsangabenArt() As String + Get + Return Me._gehaltsangabenArt + End Get + Set + Me._gehaltsangabenArt = Value + End Set + End Property + + + Public Property GehaltsangabenGradProzent() As Decimal + Get + Return Me._gehaltsangabenGradProzent + End Get + Set + Me._gehaltsangabenGradProzent = Value + End Set + End Property + + + Public Property BemessungsgrundlageKz() As String + Get + Return Me._bemessungsgrundlageKz + End Get + Set + Me._bemessungsgrundlageKz = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(EinzelAbgabenSatzTAXTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize EinzelAbgabenSatzTAXTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes EinzelAbgabenSatzTAXTyp object + ''' + ''' string to deserialize + ''' Output EinzelAbgabenSatzTAXTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelAbgabenSatzTAXTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EinzelAbgabenSatzTAXTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelAbgabenSatzTAXTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As EinzelAbgabenSatzTAXTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), EinzelAbgabenSatzTAXTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As EinzelAbgabenSatzTAXTyp + Return CType(SerializerXml.Deserialize(s), EinzelAbgabenSatzTAXTyp) + End Function +#End Region + + ''' + ''' Serializes current EinzelAbgabenSatzTAXTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an EinzelAbgabenSatzTAXTyp object + ''' + ''' File to load and deserialize + ''' Output EinzelAbgabenSatzTAXTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelAbgabenSatzTAXTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EinzelAbgabenSatzTAXTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelAbgabenSatzTAXTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As EinzelAbgabenSatzTAXTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AbgabengruppeTAXTyp + +#Region "Private fields" + Private _abgabengruppe As String + + Private _abgabeArt As String + + Private _berechnungshinweis As String + + Private _errechneterAbgabenbetrag As Decimal + + Private _abgabenbetrag As Decimal + + Private _abgabensatzKontNr As String + + Private _verbrauchssteuerCode As String + + Private _verbrauchssteuerMenge As Decimal + + Private _verbrauchssteuerMasseinheit As String + + Private _verbrauchssteuerQualifikator As String + + Private _verbrauchssteuerGradProzent As Decimal + + Private _verbrauchssteuerWert As Decimal + + Private _einzelAbgabenSatz As List(Of EinzelAbgabenSatzTAXTyp) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._einzelAbgabenSatz = New List(Of EinzelAbgabenSatzTAXTyp)() + End Sub + + + Public Property Abgabengruppe() As String + Get + Return Me._abgabengruppe + End Get + Set + Me._abgabengruppe = Value + End Set + End Property + + + Public Property AbgabeArt() As String + Get + Return Me._abgabeArt + End Get + Set + Me._abgabeArt = Value + End Set + End Property + + + Public Property Berechnungshinweis() As String + Get + Return Me._berechnungshinweis + End Get + Set + Me._berechnungshinweis = Value + End Set + End Property + + + Public Property ErrechneterAbgabenbetrag() As Decimal + Get + Return Me._errechneterAbgabenbetrag + End Get + Set + Me._errechneterAbgabenbetrag = Value + End Set + End Property + + + Public Property Abgabenbetrag() As Decimal + Get + Return Me._abgabenbetrag + End Get + Set + Me._abgabenbetrag = Value + End Set + End Property + + + Public Property AbgabensatzKontNr() As String + Get + Return Me._abgabensatzKontNr + End Get + Set + Me._abgabensatzKontNr = Value + End Set + End Property + + + Public Property VerbrauchssteuerCode() As String + Get + Return Me._verbrauchssteuerCode + End Get + Set + Me._verbrauchssteuerCode = Value + End Set + End Property + + + Public Property VerbrauchssteuerMenge() As Decimal + Get + Return Me._verbrauchssteuerMenge + End Get + Set + Me._verbrauchssteuerMenge = Value + End Set + End Property + + + Public Property VerbrauchssteuerMasseinheit() As String + Get + Return Me._verbrauchssteuerMasseinheit + End Get + Set + Me._verbrauchssteuerMasseinheit = Value + End Set + End Property + + + Public Property VerbrauchssteuerQualifikator() As String + Get + Return Me._verbrauchssteuerQualifikator + End Get + Set + Me._verbrauchssteuerQualifikator = Value + End Set + End Property + + + Public Property VerbrauchssteuerGradProzent() As Decimal + Get + Return Me._verbrauchssteuerGradProzent + End Get + Set + Me._verbrauchssteuerGradProzent = Value + End Set + End Property + + + Public Property VerbrauchssteuerWert() As Decimal + Get + Return Me._verbrauchssteuerWert + End Get + Set + Me._verbrauchssteuerWert = Value + End Set + End Property + + + Public Property EinzelAbgabenSatz() As List(Of EinzelAbgabenSatzTAXTyp) + Get + Return Me._einzelAbgabenSatz + End Get + Set + Me._einzelAbgabenSatz = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AbgabengruppeTAXTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AbgabengruppeTAXTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AbgabengruppeTAXTyp object + ''' + ''' string to deserialize + ''' Output AbgabengruppeTAXTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AbgabengruppeTAXTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AbgabengruppeTAXTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AbgabengruppeTAXTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AbgabengruppeTAXTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AbgabengruppeTAXTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AbgabengruppeTAXTyp + Return CType(SerializerXml.Deserialize(s), AbgabengruppeTAXTyp) + End Function +#End Region + + ''' + ''' Serializes current AbgabengruppeTAXTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AbgabengruppeTAXTyp object + ''' + ''' File to load and deserialize + ''' Output AbgabengruppeTAXTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AbgabengruppeTAXTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AbgabengruppeTAXTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AbgabengruppeTAXTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AbgabengruppeTAXTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class PauschalierungTAXTyp + +#Region "Private fields" + Private _warenkategorie As String + + Private _kzPauschalierterAbgabensatz As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Warenkategorie() As String + Get + Return Me._warenkategorie + End Get + Set + Me._warenkategorie = Value + End Set + End Property + + + Public Property KzPauschalierterAbgabensatz() As String + Get + Return Me._kzPauschalierterAbgabensatz + End Get + Set + Me._kzPauschalierterAbgabensatz = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PauschalierungTAXTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize PauschalierungTAXTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes PauschalierungTAXTyp object + ''' + ''' string to deserialize + ''' Output PauschalierungTAXTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PauschalierungTAXTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PauschalierungTAXTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PauschalierungTAXTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As PauschalierungTAXTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PauschalierungTAXTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As PauschalierungTAXTyp + Return CType(SerializerXml.Deserialize(s), PauschalierungTAXTyp) + End Function +#End Region + + ''' + ''' Serializes current PauschalierungTAXTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an PauschalierungTAXTyp object + ''' + ''' File to load and deserialize + ''' Output PauschalierungTAXTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PauschalierungTAXTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PauschalierungTAXTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PauschalierungTAXTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PauschalierungTAXTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AbweichendeFestsetzungTAXTyp + +#Region "Private fields" + Private _feldname As String + + Private _qualifikator As String + + Private _qualifikatorInhalt As String + + Private _artAbweichendeFestsetzung As String + + Private _festgesetztVon As String + + Private _festgesetztAuf As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Feldname() As String + Get + Return Me._feldname + End Get + Set + Me._feldname = Value + End Set + End Property + + + Public Property Qualifikator() As String + Get + Return Me._qualifikator + End Get + Set + Me._qualifikator = Value + End Set + End Property + + + Public Property QualifikatorInhalt() As String + Get + Return Me._qualifikatorInhalt + End Get + Set + Me._qualifikatorInhalt = Value + End Set + End Property + + + Public Property ArtAbweichendeFestsetzung() As String + Get + Return Me._artAbweichendeFestsetzung + End Get + Set + Me._artAbweichendeFestsetzung = Value + End Set + End Property + + + Public Property FestgesetztVon() As String + Get + Return Me._festgesetztVon + End Get + Set + Me._festgesetztVon = Value + End Set + End Property + + + Public Property FestgesetztAuf() As String + Get + Return Me._festgesetztAuf + End Get + Set + Me._festgesetztAuf = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AbweichendeFestsetzungTAXTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AbweichendeFestsetzungTAXTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AbweichendeFestsetzungTAXTyp object + ''' + ''' string to deserialize + ''' Output AbweichendeFestsetzungTAXTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AbweichendeFestsetzungTAXTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AbweichendeFestsetzungTAXTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AbweichendeFestsetzungTAXTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AbweichendeFestsetzungTAXTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AbweichendeFestsetzungTAXTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AbweichendeFestsetzungTAXTyp + Return CType(SerializerXml.Deserialize(s), AbweichendeFestsetzungTAXTyp) + End Function +#End Region + + ''' + ''' Serializes current AbweichendeFestsetzungTAXTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AbweichendeFestsetzungTAXTyp object + ''' + ''' File to load and deserialize + ''' Output AbweichendeFestsetzungTAXTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AbweichendeFestsetzungTAXTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AbweichendeFestsetzungTAXTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AbweichendeFestsetzungTAXTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AbweichendeFestsetzungTAXTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class KontingentAngerechnetWarenMengeTAXTyp + +#Region "Private fields" + Private _menge As String + + Private _masseinheit As String + + Private _qualifier As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Menge() As String + Get + Return Me._menge + End Get + Set + Me._menge = 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 Qualifier() As String + Get + Return Me._qualifier + End Get + Set + Me._qualifier = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(KontingentAngerechnetWarenMengeTAXTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize KontingentAngerechnetWarenMengeTAXTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes KontingentAngerechnetWarenMengeTAXTyp object + ''' + ''' string to deserialize + ''' Output KontingentAngerechnetWarenMengeTAXTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As KontingentAngerechnetWarenMengeTAXTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, KontingentAngerechnetWarenMengeTAXTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As KontingentAngerechnetWarenMengeTAXTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As KontingentAngerechnetWarenMengeTAXTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), KontingentAngerechnetWarenMengeTAXTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As KontingentAngerechnetWarenMengeTAXTyp + Return CType(SerializerXml.Deserialize(s), KontingentAngerechnetWarenMengeTAXTyp) + End Function +#End Region + + ''' + ''' Serializes current KontingentAngerechnetWarenMengeTAXTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an KontingentAngerechnetWarenMengeTAXTyp object + ''' + ''' File to load and deserialize + ''' Output KontingentAngerechnetWarenMengeTAXTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As KontingentAngerechnetWarenMengeTAXTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, KontingentAngerechnetWarenMengeTAXTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As KontingentAngerechnetWarenMengeTAXTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As KontingentAngerechnetWarenMengeTAXTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class KontingentAngerechnetTAXTyp + +#Region "Private fields" + Private _kontNrAngerechnet As String + + Private _zollwertAngerechnet As Decimal + + Private _eUStKostenAngerechnet As Decimal + + Private _beguenstMengeAngerechnet As Decimal + + Private _masseinhBegMengeAng As String + + Private _qualifBegMengeAng As String + + Private _warenMenge As List(Of KontingentAngerechnetWarenMengeTAXTyp) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._warenMenge = New List(Of KontingentAngerechnetWarenMengeTAXTyp)() + End Sub + + + Public Property KontNrAngerechnet() As String + Get + Return Me._kontNrAngerechnet + End Get + Set + Me._kontNrAngerechnet = Value + End Set + End Property + + + Public Property ZollwertAngerechnet() As Decimal + Get + Return Me._zollwertAngerechnet + End Get + Set + Me._zollwertAngerechnet = Value + End Set + End Property + + + Public Property EUStKostenAngerechnet() As Decimal + Get + Return Me._eUStKostenAngerechnet + End Get + Set + Me._eUStKostenAngerechnet = Value + End Set + End Property + + + Public Property BeguenstMengeAngerechnet() As Decimal + Get + Return Me._beguenstMengeAngerechnet + End Get + Set + Me._beguenstMengeAngerechnet = Value + End Set + End Property + + + Public Property MasseinhBegMengeAng() As String + Get + Return Me._masseinhBegMengeAng + End Get + Set + Me._masseinhBegMengeAng = Value + End Set + End Property + + + Public Property QualifBegMengeAng() As String + Get + Return Me._qualifBegMengeAng + End Get + Set + Me._qualifBegMengeAng = Value + End Set + End Property + + + Public Property WarenMenge() As List(Of KontingentAngerechnetWarenMengeTAXTyp) + Get + Return Me._warenMenge + End Get + Set + Me._warenMenge = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(KontingentAngerechnetTAXTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize KontingentAngerechnetTAXTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes KontingentAngerechnetTAXTyp object + ''' + ''' string to deserialize + ''' Output KontingentAngerechnetTAXTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As KontingentAngerechnetTAXTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, KontingentAngerechnetTAXTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As KontingentAngerechnetTAXTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As KontingentAngerechnetTAXTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), KontingentAngerechnetTAXTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As KontingentAngerechnetTAXTyp + Return CType(SerializerXml.Deserialize(s), KontingentAngerechnetTAXTyp) + End Function +#End Region + + ''' + ''' Serializes current KontingentAngerechnetTAXTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an KontingentAngerechnetTAXTyp object + ''' + ''' File to load and deserialize + ''' Output KontingentAngerechnetTAXTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As KontingentAngerechnetTAXTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, KontingentAngerechnetTAXTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As KontingentAngerechnetTAXTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As KontingentAngerechnetTAXTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class SonderfalleingabeTAXTyp + +#Region "Private fields" + Private _sonderabgabenGruppe As String + + Private _anwendungsart As String + + Private _satzBetragFaktor As Decimal + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property SonderabgabenGruppe() As String + Get + Return Me._sonderabgabenGruppe + End Get + Set + Me._sonderabgabenGruppe = Value + End Set + End Property + + + Public Property Anwendungsart() As String + Get + Return Me._anwendungsart + End Get + Set + Me._anwendungsart = Value + End Set + End Property + + + Public Property SatzBetragFaktor() As Decimal + Get + Return Me._satzBetragFaktor + End Get + Set + Me._satzBetragFaktor = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(SonderfalleingabeTAXTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize SonderfalleingabeTAXTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes SonderfalleingabeTAXTyp object + ''' + ''' string to deserialize + ''' Output SonderfalleingabeTAXTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SonderfalleingabeTAXTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SonderfalleingabeTAXTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SonderfalleingabeTAXTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As SonderfalleingabeTAXTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), SonderfalleingabeTAXTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As SonderfalleingabeTAXTyp + Return CType(SerializerXml.Deserialize(s), SonderfalleingabeTAXTyp) + End Function +#End Region + + ''' + ''' Serializes current SonderfalleingabeTAXTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an SonderfalleingabeTAXTyp object + ''' + ''' File to load and deserialize + ''' Output SonderfalleingabeTAXTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SonderfalleingabeTAXTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SonderfalleingabeTAXTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SonderfalleingabeTAXTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As SonderfalleingabeTAXTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class EZAAVVeredelungserzeugnisTyp + +#Region "Private fields" + Private _warenbezeichnung As String + + Private _ausbeuteart As String + + Private _ausbeutesatz As String + + Private _kNCode As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Warenbezeichnung() As String + Get + Return Me._warenbezeichnung + End Get + Set + Me._warenbezeichnung = Value + End Set + End Property + + + Public Property Ausbeuteart() As String + Get + Return Me._ausbeuteart + End Get + Set + Me._ausbeuteart = Value + End Set + End Property + + + Public Property Ausbeutesatz() As String + Get + Return Me._ausbeutesatz + End Get + Set + Me._ausbeutesatz = Value + End Set + End Property + + + Public Property KNCode() As String + Get + Return Me._kNCode + End Get + Set + Me._kNCode = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(EZAAVVeredelungserzeugnisTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize EZAAVVeredelungserzeugnisTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes EZAAVVeredelungserzeugnisTyp object + ''' + ''' string to deserialize + ''' Output EZAAVVeredelungserzeugnisTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EZAAVVeredelungserzeugnisTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EZAAVVeredelungserzeugnisTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EZAAVVeredelungserzeugnisTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As EZAAVVeredelungserzeugnisTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), EZAAVVeredelungserzeugnisTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As EZAAVVeredelungserzeugnisTyp + Return CType(SerializerXml.Deserialize(s), EZAAVVeredelungserzeugnisTyp) + End Function +#End Region + + ''' + ''' Serializes current EZAAVVeredelungserzeugnisTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an EZAAVVeredelungserzeugnisTyp object + ''' + ''' File to load and deserialize + ''' Output EZAAVVeredelungserzeugnisTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EZAAVVeredelungserzeugnisTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EZAAVVeredelungserzeugnisTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EZAAVVeredelungserzeugnisTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As EZAAVVeredelungserzeugnisTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class EZAAVAngabenPosTyp + +#Region "Private fields" + Private _aVWirtschaftlicheVoraussetzungen As String + + Private _aVVeredelungserzeugnis As List(Of EZAAVVeredelungserzeugnisTyp) + + Private _aVNaemlichkeitsmittel As String + + Private _aVErlaeuterungNaemlichkeit As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._aVVeredelungserzeugnis = New List(Of EZAAVVeredelungserzeugnisTyp)() + End Sub + + + Public Property AVWirtschaftlicheVoraussetzungen() As String + Get + Return Me._aVWirtschaftlicheVoraussetzungen + End Get + Set + Me._aVWirtschaftlicheVoraussetzungen = Value + End Set + End Property + + + Public Property AVVeredelungserzeugnis() As List(Of EZAAVVeredelungserzeugnisTyp) + Get + Return Me._aVVeredelungserzeugnis + End Get + Set + Me._aVVeredelungserzeugnis = Value + End Set + End Property + + + Public Property AVNaemlichkeitsmittel() As String + Get + Return Me._aVNaemlichkeitsmittel + End Get + Set + Me._aVNaemlichkeitsmittel = Value + End Set + End Property + + + Public Property AVErlaeuterungNaemlichkeit() As String + Get + Return Me._aVErlaeuterungNaemlichkeit + End Get + Set + Me._aVErlaeuterungNaemlichkeit = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(EZAAVAngabenPosTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize EZAAVAngabenPosTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes EZAAVAngabenPosTyp object + ''' + ''' string to deserialize + ''' Output EZAAVAngabenPosTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EZAAVAngabenPosTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EZAAVAngabenPosTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EZAAVAngabenPosTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As EZAAVAngabenPosTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), EZAAVAngabenPosTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As EZAAVAngabenPosTyp + Return CType(SerializerXml.Deserialize(s), EZAAVAngabenPosTyp) + End Function +#End Region + + ''' + ''' Serializes current EZAAVAngabenPosTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an EZAAVAngabenPosTyp object + ''' + ''' File to load and deserialize + ''' Output EZAAVAngabenPosTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EZAAVAngabenPosTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EZAAVAngabenPosTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EZAAVAngabenPosTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As EZAAVAngabenPosTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AngemeldeteUnterlageTAXTyp + +#Region "Private fields" + Private _unterlageArt As String + + Private _unterlageBereich As String + + Private _unterlageNr As String + + Private _anerkennungKz As String + + Private _abschreibungKz As String + + Private _einbehaltenKz As String + + Private _periodischeVorlageKz As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property UnterlageArt() As String + Get + Return Me._unterlageArt + End Get + Set + Me._unterlageArt = Value + End Set + End Property + + + Public Property UnterlageBereich() As String + Get + Return Me._unterlageBereich + End Get + Set + Me._unterlageBereich = Value + End Set + End Property + + + Public Property UnterlageNr() As String + Get + Return Me._unterlageNr + End Get + Set + Me._unterlageNr = Value + End Set + End Property + + + Public Property AnerkennungKz() As String + Get + Return Me._anerkennungKz + End Get + Set + Me._anerkennungKz = Value + End Set + End Property + + + Public Property AbschreibungKz() As String + Get + Return Me._abschreibungKz + End Get + Set + Me._abschreibungKz = Value + End Set + End Property + + + Public Property EinbehaltenKz() As String + Get + Return Me._einbehaltenKz + End Get + Set + Me._einbehaltenKz = Value + End Set + End Property + + + Public Property PeriodischeVorlageKz() As String + Get + Return Me._periodischeVorlageKz + End Get + Set + Me._periodischeVorlageKz = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AngemeldeteUnterlageTAXTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AngemeldeteUnterlageTAXTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AngemeldeteUnterlageTAXTyp object + ''' + ''' string to deserialize + ''' Output AngemeldeteUnterlageTAXTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AngemeldeteUnterlageTAXTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AngemeldeteUnterlageTAXTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AngemeldeteUnterlageTAXTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AngemeldeteUnterlageTAXTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AngemeldeteUnterlageTAXTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AngemeldeteUnterlageTAXTyp + Return CType(SerializerXml.Deserialize(s), AngemeldeteUnterlageTAXTyp) + End Function +#End Region + + ''' + ''' Serializes current AngemeldeteUnterlageTAXTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AngemeldeteUnterlageTAXTyp object + ''' + ''' File to load and deserialize + ''' Output AngemeldeteUnterlageTAXTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AngemeldeteUnterlageTAXTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AngemeldeteUnterlageTAXTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AngemeldeteUnterlageTAXTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AngemeldeteUnterlageTAXTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class KursAbzugHinzuTAXTyp + +#Region "Private fields" + Private _artAbHinzu As String + + Private _angewandterKurs As Decimal + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property ArtAbHinzu() As String + Get + Return Me._artAbHinzu + End Get + Set + Me._artAbHinzu = Value + End Set + End Property + + + Public Property AngewandterKurs() As Decimal + Get + Return Me._angewandterKurs + End Get + Set + Me._angewandterKurs = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(KursAbzugHinzuTAXTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize KursAbzugHinzuTAXTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes KursAbzugHinzuTAXTyp object + ''' + ''' string to deserialize + ''' Output KursAbzugHinzuTAXTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As KursAbzugHinzuTAXTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, KursAbzugHinzuTAXTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As KursAbzugHinzuTAXTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As KursAbzugHinzuTAXTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), KursAbzugHinzuTAXTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As KursAbzugHinzuTAXTyp + Return CType(SerializerXml.Deserialize(s), KursAbzugHinzuTAXTyp) + End Function +#End Region + + ''' + ''' Serializes current KursAbzugHinzuTAXTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an KursAbzugHinzuTAXTyp object + ''' + ''' File to load and deserialize + ''' Output KursAbzugHinzuTAXTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As KursAbzugHinzuTAXTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, KursAbzugHinzuTAXTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As KursAbzugHinzuTAXTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As KursAbzugHinzuTAXTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class PositionAbgabenbescheidEinfuhrTyp + +#Region "Private fields" + Private _positionsNr As String + + Private _erledigungKz As String + + Private _warenNummerEZT As String + + Private _warenNummerZusatzCode As List(Of String) + + Private _warenBezeichnung As String + + Private _beschauMitteilung As String + + Private _erledigungMitteilung As String + + Private _ablehnungAenderung As String + + Private _weitererNachweis As String + + Private _gewaehrteBeguenstigung As String + + Private _anordnungKz As String + + Private _eUStWert As Decimal + + Private _kostenFuerEUSt As Decimal + + Private _zollWert As Decimal + + Private _annahmeAenderung As String + + Private _sicherheitsLeistungBetrag As Decimal + + Private _registrierNrvZAAZ As String + + Private _positionsNrInvZAAZ As String + + Private _annahmeKz As String + + Private _annahmeDatum As Date + + Private _ueberlassungDatum As Date + + Private _lagerfrist As Date + + Private _wiederAusfuhrFrist As Date + + Private _fristWeitererNachweis As Date + + Private _befund As String + + Private _dV1AbweichendFestgesetztKz As String + + Private _sonderfalleingabeKz As String + + Private _angewandterKursNettopreis As Decimal + + Private _angewandterKursMittelbZahlungen As Decimal + + Private _abzugHinzurechnungen As List(Of KursAbzugHinzuTAXTyp) + + Private _luftFrachtGesamtProzentsatz As String + + Private _luftFrachtGesamtAngewandterKurs As Decimal + + Private _angemeldeteUnterlage As List(Of AngemeldeteUnterlageTAXTyp) + + Private _eZAAVAngabenPos As EZAAVAngabenPosTyp + + Private _sonderabgabenGruppe As List(Of SonderfalleingabeTAXTyp) + + Private _kontNrAngewandt As List(Of String) + + Private _kontingentAngerechnet As List(Of KontingentAngerechnetTAXTyp) + + Private _abweichendeFestsetzung As List(Of AbweichendeFestsetzungTAXTyp) + + Private _pauschalierung As PauschalierungTAXTyp + + Private _abgaben As List(Of AbgabengruppeTAXTyp) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._abgaben = New List(Of AbgabengruppeTAXTyp)() + Me._pauschalierung = New PauschalierungTAXTyp() + Me._abweichendeFestsetzung = New List(Of AbweichendeFestsetzungTAXTyp)() + Me._kontingentAngerechnet = New List(Of KontingentAngerechnetTAXTyp)() + Me._kontNrAngewandt = New List(Of String)() + Me._sonderabgabenGruppe = New List(Of SonderfalleingabeTAXTyp)() + Me._eZAAVAngabenPos = New EZAAVAngabenPosTyp() + Me._angemeldeteUnterlage = New List(Of AngemeldeteUnterlageTAXTyp)() + Me._abzugHinzurechnungen = New List(Of KursAbzugHinzuTAXTyp)() + Me._warenNummerZusatzCode = New List(Of String)() + End Sub + + + Public Property PositionsNr() As String + Get + Return Me._positionsNr + End Get + Set + Me._positionsNr = Value + End Set + End Property + + + Public Property ErledigungKz() As String + Get + Return Me._erledigungKz + End Get + Set + Me._erledigungKz = Value + End Set + End Property + + + Public Property WarenNummerEZT() As String + Get + Return Me._warenNummerEZT + End Get + Set + Me._warenNummerEZT = Value + End Set + End Property + + + Public Property WarenNummerZusatzCode() As List(Of String) + Get + Return Me._warenNummerZusatzCode + End Get + Set + Me._warenNummerZusatzCode = 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 BeschauMitteilung() As String + Get + Return Me._beschauMitteilung + End Get + Set + Me._beschauMitteilung = Value + End Set + End Property + + + Public Property ErledigungMitteilung() As String + Get + Return Me._erledigungMitteilung + End Get + Set + Me._erledigungMitteilung = Value + End Set + End Property + + + Public Property AblehnungAenderung() As String + Get + Return Me._ablehnungAenderung + End Get + Set + Me._ablehnungAenderung = Value + End Set + End Property + + + Public Property WeitererNachweis() As String + Get + Return Me._weitererNachweis + End Get + Set + Me._weitererNachweis = Value + End Set + End Property + + + Public Property GewaehrteBeguenstigung() As String + Get + Return Me._gewaehrteBeguenstigung + End Get + Set + Me._gewaehrteBeguenstigung = Value + End Set + End Property + + + Public Property AnordnungKz() As String + Get + Return Me._anordnungKz + End Get + Set + Me._anordnungKz = Value + End Set + End Property + + + Public Property EUStWert() As Decimal + Get + Return Me._eUStWert + End Get + Set + Me._eUStWert = Value + End Set + End Property + + + Public Property KostenFuerEUSt() As Decimal + Get + Return Me._kostenFuerEUSt + End Get + Set + Me._kostenFuerEUSt = Value + End Set + End Property + + + Public Property ZollWert() As Decimal + Get + Return Me._zollWert + End Get + Set + Me._zollWert = Value + End Set + End Property + + + Public Property AnnahmeAenderung() As String + Get + Return Me._annahmeAenderung + End Get + Set + Me._annahmeAenderung = Value + End Set + End Property + + + Public Property SicherheitsLeistungBetrag() As Decimal + Get + Return Me._sicherheitsLeistungBetrag + End Get + Set + Me._sicherheitsLeistungBetrag = Value + End Set + End Property + + + Public Property RegistrierNrvZAAZ() As String + Get + Return Me._registrierNrvZAAZ + End Get + Set + Me._registrierNrvZAAZ = Value + End Set + End Property + + + Public Property PositionsNrInvZAAZ() As String + Get + Return Me._positionsNrInvZAAZ + End Get + Set + Me._positionsNrInvZAAZ = Value + End Set + End Property + + + Public Property AnnahmeKz() As String + Get + Return Me._annahmeKz + End Get + Set + Me._annahmeKz = 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 UeberlassungDatum() As Date + Get + Return Me._ueberlassungDatum + End Get + Set + Me._ueberlassungDatum = Value + End Set + End Property + + + Public Property Lagerfrist() As Date + Get + Return Me._lagerfrist + End Get + Set + Me._lagerfrist = Value + End Set + End Property + + + Public Property WiederAusfuhrFrist() As Date + Get + Return Me._wiederAusfuhrFrist + End Get + Set + Me._wiederAusfuhrFrist = Value + End Set + End Property + + + Public Property FristWeitererNachweis() As Date + Get + Return Me._fristWeitererNachweis + End Get + Set + Me._fristWeitererNachweis = Value + End Set + End Property + + + Public Property Befund() As String + Get + Return Me._befund + End Get + Set + Me._befund = Value + End Set + End Property + + + Public Property DV1AbweichendFestgesetztKz() As String + Get + Return Me._dV1AbweichendFestgesetztKz + End Get + Set + Me._dV1AbweichendFestgesetztKz = Value + End Set + End Property + + + Public Property SonderfalleingabeKz() As String + Get + Return Me._sonderfalleingabeKz + End Get + Set + Me._sonderfalleingabeKz = Value + End Set + End Property + + + Public Property AngewandterKursNettopreis() As Decimal + Get + Return Me._angewandterKursNettopreis + End Get + Set + Me._angewandterKursNettopreis = Value + End Set + End Property + + + Public Property AngewandterKursMittelbZahlungen() As Decimal + Get + Return Me._angewandterKursMittelbZahlungen + End Get + Set + Me._angewandterKursMittelbZahlungen = Value + End Set + End Property + + + Public Property AbzugHinzurechnungen() As List(Of KursAbzugHinzuTAXTyp) + Get + Return Me._abzugHinzurechnungen + End Get + Set + Me._abzugHinzurechnungen = Value + End Set + End Property + + + Public Property LuftFrachtGesamtProzentsatz() As String + Get + Return Me._luftFrachtGesamtProzentsatz + End Get + Set + Me._luftFrachtGesamtProzentsatz = Value + End Set + End Property + + + Public Property LuftFrachtGesamtAngewandterKurs() As Decimal + Get + Return Me._luftFrachtGesamtAngewandterKurs + End Get + Set + Me._luftFrachtGesamtAngewandterKurs = Value + End Set + End Property + + + Public Property AngemeldeteUnterlage() As List(Of AngemeldeteUnterlageTAXTyp) + Get + Return Me._angemeldeteUnterlage + End Get + Set + Me._angemeldeteUnterlage = Value + End Set + End Property + + + Public Property EZAAVAngabenPos() As EZAAVAngabenPosTyp + Get + Return Me._eZAAVAngabenPos + End Get + Set + Me._eZAAVAngabenPos = Value + End Set + End Property + + + Public Property SonderabgabenGruppe() As List(Of SonderfalleingabeTAXTyp) + Get + Return Me._sonderabgabenGruppe + End Get + Set + Me._sonderabgabenGruppe = Value + End Set + End Property + + + Public Property KontNrAngewandt() As List(Of String) + Get + Return Me._kontNrAngewandt + End Get + Set + Me._kontNrAngewandt = Value + End Set + End Property + + + Public Property KontingentAngerechnet() As List(Of KontingentAngerechnetTAXTyp) + Get + Return Me._kontingentAngerechnet + End Get + Set + Me._kontingentAngerechnet = Value + End Set + End Property + + + Public Property AbweichendeFestsetzung() As List(Of AbweichendeFestsetzungTAXTyp) + Get + Return Me._abweichendeFestsetzung + End Get + Set + Me._abweichendeFestsetzung = Value + End Set + End Property + + + Public Property Pauschalierung() As PauschalierungTAXTyp + Get + Return Me._pauschalierung + End Get + Set + Me._pauschalierung = Value + End Set + End Property + + + Public Property Abgaben() As List(Of AbgabengruppeTAXTyp) + Get + Return Me._abgaben + End Get + Set + Me._abgaben = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PositionAbgabenbescheidEinfuhrTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize PositionAbgabenbescheidEinfuhrTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes PositionAbgabenbescheidEinfuhrTyp object + ''' + ''' string to deserialize + ''' Output PositionAbgabenbescheidEinfuhrTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PositionAbgabenbescheidEinfuhrTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PositionAbgabenbescheidEinfuhrTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PositionAbgabenbescheidEinfuhrTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As PositionAbgabenbescheidEinfuhrTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PositionAbgabenbescheidEinfuhrTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As PositionAbgabenbescheidEinfuhrTyp + Return CType(SerializerXml.Deserialize(s), PositionAbgabenbescheidEinfuhrTyp) + End Function +#End Region + + ''' + ''' Serializes current PositionAbgabenbescheidEinfuhrTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an PositionAbgabenbescheidEinfuhrTyp object + ''' + ''' File to load and deserialize + ''' Output PositionAbgabenbescheidEinfuhrTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PositionAbgabenbescheidEinfuhrTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PositionAbgabenbescheidEinfuhrTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PositionAbgabenbescheidEinfuhrTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PositionAbgabenbescheidEinfuhrTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class EZAAVAngabenKopfWeitererVeredelungsortTyp + +#Region "Private fields" + Private _strasse As String + + Private _land As String + + Private _pLZ As String + + Private _ort As String + + Private _ortsteil As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Strasse() As String + Get + Return Me._strasse + End Get + Set + Me._strasse = 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 Ortsteil() As String + Get + Return Me._ortsteil + End Get + Set + Me._ortsteil = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(EZAAVAngabenKopfWeitererVeredelungsortTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize EZAAVAngabenKopfWeitererVeredelungsortTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes EZAAVAngabenKopfWeitererVeredelungsortTyp object + ''' + ''' string to deserialize + ''' Output EZAAVAngabenKopfWeitererVeredelungsortTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EZAAVAngabenKopfWeitererVeredelungsortTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EZAAVAngabenKopfWeitererVeredelungsortTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EZAAVAngabenKopfWeitererVeredelungsortTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As EZAAVAngabenKopfWeitererVeredelungsortTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), EZAAVAngabenKopfWeitererVeredelungsortTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As EZAAVAngabenKopfWeitererVeredelungsortTyp + Return CType(SerializerXml.Deserialize(s), EZAAVAngabenKopfWeitererVeredelungsortTyp) + End Function +#End Region + + ''' + ''' Serializes current EZAAVAngabenKopfWeitererVeredelungsortTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an EZAAVAngabenKopfWeitererVeredelungsortTyp object + ''' + ''' File to load and deserialize + ''' Output EZAAVAngabenKopfWeitererVeredelungsortTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EZAAVAngabenKopfWeitererVeredelungsortTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EZAAVAngabenKopfWeitererVeredelungsortTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EZAAVAngabenKopfWeitererVeredelungsortTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As EZAAVAngabenKopfWeitererVeredelungsortTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class EZAAVAngabenKopfTyp + +#Region "Private fields" + Private _kzBemessungEinfuhrabgabenbetrag As String + + Private _kzAbrechnung As String + + Private _kzVereinfBefoerderung As String + + Private _zusaetzlicheAngaben As String + + Private _kzVerzichtSicherheit As String + + Private _erlaeuterungenZurSicherheit As String + + Private _betragDerSicherheit As Decimal + + Private _deutschesUeHZA As String + + Private _einzelheitenGeplantVeredelungsvorgang As String + + Private _hauptbuchhaltungStrasse As String + + Private _hauptbuchhaltungLand As String + + Private _hauptbuchhaltungPLZ As String + + Private _hauptbuchhaltungOrt As String + + Private _hauptbuchhaltungOrtsteil As String + + Private _veredelungStrasse As String + + Private _veredelungLand As String + + Private _veredelungPLZ As String + + Private _veredelungOrt As String + + Private _veredelungOrtsteil As String + + Private _weitererVeredelungsort As List(Of EZAAVAngabenKopfWeitererVeredelungsortTyp) + + Private _zollstelleErledigung As List(Of String) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._zollstelleErledigung = New List(Of String)() + Me._weitererVeredelungsort = New List(Of EZAAVAngabenKopfWeitererVeredelungsortTyp)() + End Sub + + + Public Property KzBemessungEinfuhrabgabenbetrag() As String + Get + Return Me._kzBemessungEinfuhrabgabenbetrag + End Get + Set + Me._kzBemessungEinfuhrabgabenbetrag = Value + End Set + End Property + + + Public Property KzAbrechnung() As String + Get + Return Me._kzAbrechnung + End Get + Set + Me._kzAbrechnung = Value + End Set + End Property + + + Public Property KzVereinfBefoerderung() As String + Get + Return Me._kzVereinfBefoerderung + End Get + Set + Me._kzVereinfBefoerderung = Value + End Set + End Property + + + Public Property ZusaetzlicheAngaben() As String + Get + Return Me._zusaetzlicheAngaben + End Get + Set + Me._zusaetzlicheAngaben = Value + End Set + End Property + + + Public Property KzVerzichtSicherheit() As String + Get + Return Me._kzVerzichtSicherheit + End Get + Set + Me._kzVerzichtSicherheit = Value + End Set + End Property + + + Public Property ErlaeuterungenZurSicherheit() As String + Get + Return Me._erlaeuterungenZurSicherheit + End Get + Set + Me._erlaeuterungenZurSicherheit = Value + End Set + End Property + + + Public Property BetragDerSicherheit() As Decimal + Get + Return Me._betragDerSicherheit + End Get + Set + Me._betragDerSicherheit = Value + End Set + End Property + + + Public Property DeutschesUeHZA() As String + Get + Return Me._deutschesUeHZA + End Get + Set + Me._deutschesUeHZA = Value + End Set + End Property + + + Public Property EinzelheitenGeplantVeredelungsvorgang() As String + Get + Return Me._einzelheitenGeplantVeredelungsvorgang + End Get + Set + Me._einzelheitenGeplantVeredelungsvorgang = Value + End Set + End Property + + + Public Property HauptbuchhaltungStrasse() As String + Get + Return Me._hauptbuchhaltungStrasse + End Get + Set + Me._hauptbuchhaltungStrasse = Value + End Set + End Property + + + Public Property HauptbuchhaltungLand() As String + Get + Return Me._hauptbuchhaltungLand + End Get + Set + Me._hauptbuchhaltungLand = Value + End Set + End Property + + + Public Property HauptbuchhaltungPLZ() As String + Get + Return Me._hauptbuchhaltungPLZ + End Get + Set + Me._hauptbuchhaltungPLZ = Value + End Set + End Property + + + Public Property HauptbuchhaltungOrt() As String + Get + Return Me._hauptbuchhaltungOrt + End Get + Set + Me._hauptbuchhaltungOrt = Value + End Set + End Property + + + Public Property HauptbuchhaltungOrtsteil() As String + Get + Return Me._hauptbuchhaltungOrtsteil + End Get + Set + Me._hauptbuchhaltungOrtsteil = Value + End Set + End Property + + + Public Property VeredelungStrasse() As String + Get + Return Me._veredelungStrasse + End Get + Set + Me._veredelungStrasse = Value + End Set + End Property + + + Public Property VeredelungLand() As String + Get + Return Me._veredelungLand + End Get + Set + Me._veredelungLand = Value + End Set + End Property + + + Public Property VeredelungPLZ() As String + Get + Return Me._veredelungPLZ + End Get + Set + Me._veredelungPLZ = Value + End Set + End Property + + + Public Property VeredelungOrt() As String + Get + Return Me._veredelungOrt + End Get + Set + Me._veredelungOrt = Value + End Set + End Property + + + Public Property VeredelungOrtsteil() As String + Get + Return Me._veredelungOrtsteil + End Get + Set + Me._veredelungOrtsteil = Value + End Set + End Property + + + Public Property WeitererVeredelungsort() As List(Of EZAAVAngabenKopfWeitererVeredelungsortTyp) + Get + Return Me._weitererVeredelungsort + End Get + Set + Me._weitererVeredelungsort = Value + End Set + End Property + + + Public Property ZollstelleErledigung() As List(Of String) + Get + Return Me._zollstelleErledigung + End Get + Set + Me._zollstelleErledigung = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(EZAAVAngabenKopfTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize EZAAVAngabenKopfTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes EZAAVAngabenKopfTyp object + ''' + ''' string to deserialize + ''' Output EZAAVAngabenKopfTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EZAAVAngabenKopfTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EZAAVAngabenKopfTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EZAAVAngabenKopfTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As EZAAVAngabenKopfTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), EZAAVAngabenKopfTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As EZAAVAngabenKopfTyp + Return CType(SerializerXml.Deserialize(s), EZAAVAngabenKopfTyp) + End Function +#End Region + + ''' + ''' Serializes current EZAAVAngabenKopfTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an EZAAVAngabenKopfTyp object + ''' + ''' File to load and deserialize + ''' Output EZAAVAngabenKopfTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EZAAVAngabenKopfTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EZAAVAngabenKopfTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EZAAVAngabenKopfTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As EZAAVAngabenKopfTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class SicherheitTAXTyp + +#Region "Private fields" + Private _einzelbetragUnbareSicherheit As Decimal + + Private _artUnbareSicherheitsleistung As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property EinzelbetragUnbareSicherheit() As Decimal + Get + Return Me._einzelbetragUnbareSicherheit + End Get + Set + Me._einzelbetragUnbareSicherheit = Value + End Set + End Property + + + Public Property ArtUnbareSicherheitsleistung() As String + Get + Return Me._artUnbareSicherheitsleistung + End Get + Set + Me._artUnbareSicherheitsleistung = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(SicherheitTAXTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize SicherheitTAXTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes SicherheitTAXTyp object + ''' + ''' string to deserialize + ''' Output SicherheitTAXTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SicherheitTAXTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SicherheitTAXTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SicherheitTAXTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As SicherheitTAXTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), SicherheitTAXTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As SicherheitTAXTyp + Return CType(SerializerXml.Deserialize(s), SicherheitTAXTyp) + End Function +#End Region + + ''' + ''' Serializes current SicherheitTAXTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an SicherheitTAXTyp object + ''' + ''' File to load and deserialize + ''' Output SicherheitTAXTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SicherheitTAXTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SicherheitTAXTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SicherheitTAXTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As SicherheitTAXTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AbgabenNachArtKopfTAXTyp + +#Region "Private fields" + Private _abgabeArt As String + + Private _abgabenbetrag As Decimal + + Private _zahlungsart As String + + Private _aufschubnehmerName As String + + Private _aufschubnehmerTIN As String + + Private _artAufschubAntrag As String + + Private _kennBuchstabenAufschub As String + + Private _aufschubkontoNr As String + + Private _faelligkeit As Date + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property AbgabeArt() As String + Get + Return Me._abgabeArt + End Get + Set + Me._abgabeArt = Value + End Set + End Property + + + Public Property Abgabenbetrag() As Decimal + Get + Return Me._abgabenbetrag + End Get + Set + Me._abgabenbetrag = Value + End Set + End Property + + + Public Property Zahlungsart() As String + Get + Return Me._zahlungsart + End Get + Set + Me._zahlungsart = Value + End Set + End Property + + + Public Property AufschubnehmerName() As String + Get + Return Me._aufschubnehmerName + End Get + Set + Me._aufschubnehmerName = Value + End Set + End Property + + + Public Property AufschubnehmerTIN() As String + Get + Return Me._aufschubnehmerTIN + End Get + Set + Me._aufschubnehmerTIN = Value + End Set + End Property + + + Public Property ArtAufschubAntrag() As String + Get + Return Me._artAufschubAntrag + End Get + Set + Me._artAufschubAntrag = Value + End Set + End Property + + + Public Property KennBuchstabenAufschub() As String + Get + Return Me._kennBuchstabenAufschub + End Get + Set + Me._kennBuchstabenAufschub = Value + End Set + End Property + + + Public Property AufschubkontoNr() As String + Get + Return Me._aufschubkontoNr + End Get + Set + Me._aufschubkontoNr = Value + End Set + End Property + + + Public Property Faelligkeit() As Date + Get + Return Me._faelligkeit + End Get + Set + Me._faelligkeit = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AbgabenNachArtKopfTAXTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AbgabenNachArtKopfTAXTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AbgabenNachArtKopfTAXTyp object + ''' + ''' string to deserialize + ''' Output AbgabenNachArtKopfTAXTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AbgabenNachArtKopfTAXTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AbgabenNachArtKopfTAXTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AbgabenNachArtKopfTAXTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AbgabenNachArtKopfTAXTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AbgabenNachArtKopfTAXTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AbgabenNachArtKopfTAXTyp + Return CType(SerializerXml.Deserialize(s), AbgabenNachArtKopfTAXTyp) + End Function +#End Region + + ''' + ''' Serializes current AbgabenNachArtKopfTAXTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AbgabenNachArtKopfTAXTyp object + ''' + ''' File to load and deserialize + ''' Output AbgabenNachArtKopfTAXTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AbgabenNachArtKopfTAXTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AbgabenNachArtKopfTAXTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AbgabenNachArtKopfTAXTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AbgabenNachArtKopfTAXTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class KopfDatenEinfuhrbescheidTyp + +#Region "Private fields" + Private _artAnmeldung As String + + Private _erledigungKopfKz As String + + Private _waehrung As String + + Private _gesamtabgabenBetrag As Decimal + + Private _abgabenbetragZuZahlen As Decimal + + Private _abgabenbetragZuErstatten As Decimal + + Private _vertretungsverhaeltnis As String + + Private _zahlungsaufforderungArtAufschub As String + + Private _zahlungsaufforderungArtAbgaben As String + + Private _zahlungsaufforderungArtSicherheit As String + + Private _kleinbetragKz As String + + Private _kleinbetragRechtsbehelf As String + + Private _gesamtschuldnerschaftKz As String + + Private _eingangszollstelleGeaendertKz As String + + Private _aVbewilligtKz As String + + Private _benutzererstelltKz As String + + Private _eUStKz As String + + Private _registriernummer As String + + Private _registrierdatum As Date + + Private _nizzaRegistrierKz As String + + Private _nizzaRegistrierKzSicherheit As String + + Private _abgabenNachArt As List(Of AbgabenNachArtKopfTAXTyp) + + Private _gesamtsicherheitssumme As Decimal + + Private _errechneteSicherheitsSumme As Decimal + + Private _unbarSicherheitsbetraege As Decimal + + Private _barSicherheitsbetraege As Decimal + + Private _freizugebenSicherheit As Decimal + + Private _auszuzahlenSicherheit As Decimal + + Private _einbehaltenSicherheit As Decimal + + Private _sicherheitsleistungForm As String + + Private _sicherheitsleistungsVerzicht As String + + Private _auszahlungsArt As String + + Private _unbareSicherheiten As List(Of SicherheitTAXTyp) + + Private _bescheidendeDienststelleNr As String + + Private _bescheidendeDienststelleName As String + + Private _bescheidendeDienststelleStrasseHausNr As String + + Private _bescheidendeDienststelleOrtS As String + + Private _bescheidendeDienststellePLZS As String + + Private _bearbeiter As String + + Private _bescheidendeDienststelleTelefonNr As String + + Private _rechtsbehelfHauptzollamt As String + + Private _rechtsbehelfHZAEmailAdresse As String + + Private _rechtsbehelfHZADEmailAdresse As String + + Private _rechtsbehelfHauptzollamtStrHausNr As String + + Private _rechtsbehelfHauptzollamtPLZS As String + + Private _rechtsbehelfHauptzollamtOrtS As String + + Private _rechtsbehelfHauptzollamtOrtsteil As String + + Private _rechtsbehelfHauptzollamtPostfach As String + + Private _rechtsbehelfHauptzollamtPLZP As String + + Private _rechtsbehelfHauptzollamtOrtP As String + + Private _zollzahlstelle As String + + Private _zollzahlstelleKreditinstitut As String + + Private _zollzahlstelleStrasseHausNr As String + + Private _zollzahlstellePLZS As String + + Private _zollzahlstelleOrtS As String + + Private _zollzahlstellePostfach As String + + Private _zollzahlstellePLZP As String + + Private _zollzahlstelleOrtP As String + + Private _zollzahlstelleIBAN As String + + Private _zollzahlstelleBIC As String + + Private _anmelderEORI As String + + Private _anmelderNLNR As String + + Private _vorsteuerabzugKz As String + + Private _anmelderName As String + + Private _anmelderNationalitaet As String + + Private _anmelderStrasseHausNr As String + + Private _anmelderPLZS As String + + Private _anmelderOrtS As String + + Private _anmelderOrtsteil As String + + Private _vertreterEORI As String + + Private _vertreterNLNR As String + + Private _vertreterName As String + + Private _vertreterNationalitaet As String + + Private _vertreterStrasseHausNr As String + + Private _vertreterPLZS As String + + Private _vertreterOrtS As String + + Private _vertreterOrtsteil As String + + Private _fRechnungEORI As String + + Private _fRechnungNLNR As String + + Private _fRechnungNationalitaet As String + + Private _fRechnungName As String + + Private _fRechnungStrasseHausNr As String + + Private _fRechnungPLZS As String + + Private _fRechnungOrtS As String + + Private _fRechnungOrtsteil As String + + Private _lagerhalterEORI As String + + Private _lagerhalterNLNR As String + + Private _lagerhalterName As String + + Private _lagerhalterStrasseHausNr As String + + Private _lagerhalterNationalitaet As String + + Private _lagerhalterPLZ As String + + Private _lagerhalterOrt As String + + Private _lagerhalterOrtsteil As String + + Private _empfaengerEORI As String + + Private _empfaengerNLNR As String + + Private _empfaengerNationalitaet As String + + Private _empfaengerName As String + + Private _empfaengerStrasseHausNr As String + + Private _empfaengerPLZS As String + + Private _empfaengerOrtS As String + + Private _empfaengerOrtsteil As String + + Private _zahlungsEmpfaengerEORI As String + + Private _zahlungsEmpfaengerNLNR As String + + Private _zahlungsEmpfaengerKreditinstitut As String + + Private _zahlungsEmpfaengerName As String + + Private _zahlungsEmpfaengerNationalitaet As String + + Private _zahlungsEmpfaengerStrasseHausNr As String + + Private _zahlungsEmpfaengerPLZS As String + + Private _zahlungsEmpfaengerOrtS As String + + Private _zahlungsEmpfaengerOrtsteil As String + + Private _zahlungsEmpfaengerIBAN As String + + Private _zahlungsEmpfaengerBIC As String + + Private _erstellungsDatumBefund As Date + + Private _erfassungsdatum As Date + + Private _barzahlungFaelligkeit As Date + + Private _sicherheitsleistungFaelligkeit As Date + + Private _abrechnungszeitraumBeginn As Date + + Private _abrechnungszeitraumEnde As Date + + Private _zollbefund As String + + Private _eZAAVAngabenKopf As EZAAVAngabenKopfTyp + + Private _lieferbedingungCode As String + + Private _lieferbedingungText As String + + Private _lieferbedingungOrt As String + + Private _lieferbedingungSchluessel As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._eZAAVAngabenKopf = New EZAAVAngabenKopfTyp() + Me._unbareSicherheiten = New List(Of SicherheitTAXTyp)() + Me._abgabenNachArt = New List(Of AbgabenNachArtKopfTAXTyp)() + End Sub + + + Public Property ArtAnmeldung() As String + Get + Return Me._artAnmeldung + End Get + Set + Me._artAnmeldung = Value + End Set + End Property + + + Public Property ErledigungKopfKz() As String + Get + Return Me._erledigungKopfKz + End Get + Set + Me._erledigungKopfKz = 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 GesamtabgabenBetrag() As Decimal + Get + Return Me._gesamtabgabenBetrag + End Get + Set + Me._gesamtabgabenBetrag = Value + End Set + End Property + + + Public Property AbgabenbetragZuZahlen() As Decimal + Get + Return Me._abgabenbetragZuZahlen + End Get + Set + Me._abgabenbetragZuZahlen = Value + End Set + End Property + + + Public Property AbgabenbetragZuErstatten() As Decimal + Get + Return Me._abgabenbetragZuErstatten + End Get + Set + Me._abgabenbetragZuErstatten = Value + End Set + End Property + + + Public Property Vertretungsverhaeltnis() As String + Get + Return Me._vertretungsverhaeltnis + End Get + Set + Me._vertretungsverhaeltnis = Value + End Set + End Property + + + Public Property ZahlungsaufforderungArtAufschub() As String + Get + Return Me._zahlungsaufforderungArtAufschub + End Get + Set + Me._zahlungsaufforderungArtAufschub = Value + End Set + End Property + + + Public Property ZahlungsaufforderungArtAbgaben() As String + Get + Return Me._zahlungsaufforderungArtAbgaben + End Get + Set + Me._zahlungsaufforderungArtAbgaben = Value + End Set + End Property + + + Public Property ZahlungsaufforderungArtSicherheit() As String + Get + Return Me._zahlungsaufforderungArtSicherheit + End Get + Set + Me._zahlungsaufforderungArtSicherheit = Value + End Set + End Property + + + Public Property KleinbetragKz() As String + Get + Return Me._kleinbetragKz + End Get + Set + Me._kleinbetragKz = Value + End Set + End Property + + + Public Property KleinbetragRechtsbehelf() As String + Get + Return Me._kleinbetragRechtsbehelf + End Get + Set + Me._kleinbetragRechtsbehelf = Value + End Set + End Property + + + Public Property GesamtschuldnerschaftKz() As String + Get + Return Me._gesamtschuldnerschaftKz + End Get + Set + Me._gesamtschuldnerschaftKz = Value + End Set + End Property + + + Public Property EingangszollstelleGeaendertKz() As String + Get + Return Me._eingangszollstelleGeaendertKz + End Get + Set + Me._eingangszollstelleGeaendertKz = Value + End Set + End Property + + + Public Property AVbewilligtKz() As String + Get + Return Me._aVbewilligtKz + End Get + Set + Me._aVbewilligtKz = Value + End Set + End Property + + + Public Property BenutzererstelltKz() As String + Get + Return Me._benutzererstelltKz + End Get + Set + Me._benutzererstelltKz = Value + End Set + End Property + + + Public Property EUStKz() As String + Get + Return Me._eUStKz + End Get + Set + Me._eUStKz = 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 Registrierdatum() As Date + Get + Return Me._registrierdatum + End Get + Set + Me._registrierdatum = Value + End Set + End Property + + + Public Property NizzaRegistrierKz() As String + Get + Return Me._nizzaRegistrierKz + End Get + Set + Me._nizzaRegistrierKz = Value + End Set + End Property + + + Public Property NizzaRegistrierKzSicherheit() As String + Get + Return Me._nizzaRegistrierKzSicherheit + End Get + Set + Me._nizzaRegistrierKzSicherheit = Value + End Set + End Property + + + Public Property AbgabenNachArt() As List(Of AbgabenNachArtKopfTAXTyp) + Get + Return Me._abgabenNachArt + End Get + Set + Me._abgabenNachArt = Value + End Set + End Property + + + Public Property Gesamtsicherheitssumme() As Decimal + Get + Return Me._gesamtsicherheitssumme + End Get + Set + Me._gesamtsicherheitssumme = Value + End Set + End Property + + + Public Property ErrechneteSicherheitsSumme() As Decimal + Get + Return Me._errechneteSicherheitsSumme + End Get + Set + Me._errechneteSicherheitsSumme = Value + End Set + End Property + + + Public Property UnbarSicherheitsbetraege() As Decimal + Get + Return Me._unbarSicherheitsbetraege + End Get + Set + Me._unbarSicherheitsbetraege = Value + End Set + End Property + + + Public Property BarSicherheitsbetraege() As Decimal + Get + Return Me._barSicherheitsbetraege + End Get + Set + Me._barSicherheitsbetraege = Value + End Set + End Property + + + Public Property FreizugebenSicherheit() As Decimal + Get + Return Me._freizugebenSicherheit + End Get + Set + Me._freizugebenSicherheit = Value + End Set + End Property + + + Public Property AuszuzahlenSicherheit() As Decimal + Get + Return Me._auszuzahlenSicherheit + End Get + Set + Me._auszuzahlenSicherheit = Value + End Set + End Property + + + Public Property EinbehaltenSicherheit() As Decimal + Get + Return Me._einbehaltenSicherheit + End Get + Set + Me._einbehaltenSicherheit = Value + End Set + End Property + + + Public Property SicherheitsleistungForm() As String + Get + Return Me._sicherheitsleistungForm + End Get + Set + Me._sicherheitsleistungForm = Value + End Set + End Property + + + Public Property SicherheitsleistungsVerzicht() As String + Get + Return Me._sicherheitsleistungsVerzicht + End Get + Set + Me._sicherheitsleistungsVerzicht = Value + End Set + End Property + + + Public Property AuszahlungsArt() As String + Get + Return Me._auszahlungsArt + End Get + Set + Me._auszahlungsArt = Value + End Set + End Property + + + Public Property UnbareSicherheiten() As List(Of SicherheitTAXTyp) + Get + Return Me._unbareSicherheiten + End Get + Set + Me._unbareSicherheiten = Value + End Set + End Property + + + Public Property BescheidendeDienststelleNr() As String + Get + Return Me._bescheidendeDienststelleNr + End Get + Set + Me._bescheidendeDienststelleNr = Value + End Set + End Property + + + Public Property BescheidendeDienststelleName() As String + Get + Return Me._bescheidendeDienststelleName + End Get + Set + Me._bescheidendeDienststelleName = Value + End Set + End Property + + + Public Property BescheidendeDienststelleStrasseHausNr() As String + Get + Return Me._bescheidendeDienststelleStrasseHausNr + End Get + Set + Me._bescheidendeDienststelleStrasseHausNr = Value + End Set + End Property + + + Public Property BescheidendeDienststelleOrtS() As String + Get + Return Me._bescheidendeDienststelleOrtS + End Get + Set + Me._bescheidendeDienststelleOrtS = Value + End Set + End Property + + + Public Property BescheidendeDienststellePLZS() As String + Get + Return Me._bescheidendeDienststellePLZS + End Get + Set + Me._bescheidendeDienststellePLZS = 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 BescheidendeDienststelleTelefonNr() As String + Get + Return Me._bescheidendeDienststelleTelefonNr + End Get + Set + Me._bescheidendeDienststelleTelefonNr = Value + End Set + End Property + + + Public Property RechtsbehelfHauptzollamt() As String + Get + Return Me._rechtsbehelfHauptzollamt + End Get + Set + Me._rechtsbehelfHauptzollamt = Value + End Set + End Property + + + Public Property RechtsbehelfHZAEmailAdresse() As String + Get + Return Me._rechtsbehelfHZAEmailAdresse + End Get + Set + Me._rechtsbehelfHZAEmailAdresse = Value + End Set + End Property + + + Public Property RechtsbehelfHZADEmailAdresse() As String + Get + Return Me._rechtsbehelfHZADEmailAdresse + End Get + Set + Me._rechtsbehelfHZADEmailAdresse = Value + End Set + End Property + + + Public Property RechtsbehelfHauptzollamtStrHausNr() As String + Get + Return Me._rechtsbehelfHauptzollamtStrHausNr + End Get + Set + Me._rechtsbehelfHauptzollamtStrHausNr = Value + End Set + End Property + + + Public Property RechtsbehelfHauptzollamtPLZS() As String + Get + Return Me._rechtsbehelfHauptzollamtPLZS + End Get + Set + Me._rechtsbehelfHauptzollamtPLZS = Value + End Set + End Property + + + Public Property RechtsbehelfHauptzollamtOrtS() As String + Get + Return Me._rechtsbehelfHauptzollamtOrtS + End Get + Set + Me._rechtsbehelfHauptzollamtOrtS = Value + End Set + End Property + + + Public Property RechtsbehelfHauptzollamtOrtsteil() As String + Get + Return Me._rechtsbehelfHauptzollamtOrtsteil + End Get + Set + Me._rechtsbehelfHauptzollamtOrtsteil = Value + End Set + End Property + + + Public Property RechtsbehelfHauptzollamtPostfach() As String + Get + Return Me._rechtsbehelfHauptzollamtPostfach + End Get + Set + Me._rechtsbehelfHauptzollamtPostfach = Value + End Set + End Property + + + Public Property RechtsbehelfHauptzollamtPLZP() As String + Get + Return Me._rechtsbehelfHauptzollamtPLZP + End Get + Set + Me._rechtsbehelfHauptzollamtPLZP = Value + End Set + End Property + + + Public Property RechtsbehelfHauptzollamtOrtP() As String + Get + Return Me._rechtsbehelfHauptzollamtOrtP + End Get + Set + Me._rechtsbehelfHauptzollamtOrtP = Value + End Set + End Property + + + Public Property Zollzahlstelle() As String + Get + Return Me._zollzahlstelle + End Get + Set + Me._zollzahlstelle = Value + End Set + End Property + + + Public Property ZollzahlstelleKreditinstitut() As String + Get + Return Me._zollzahlstelleKreditinstitut + End Get + Set + Me._zollzahlstelleKreditinstitut = Value + End Set + End Property + + + Public Property ZollzahlstelleStrasseHausNr() As String + Get + Return Me._zollzahlstelleStrasseHausNr + End Get + Set + Me._zollzahlstelleStrasseHausNr = Value + End Set + End Property + + + Public Property ZollzahlstellePLZS() As String + Get + Return Me._zollzahlstellePLZS + End Get + Set + Me._zollzahlstellePLZS = Value + End Set + End Property + + + Public Property ZollzahlstelleOrtS() As String + Get + Return Me._zollzahlstelleOrtS + End Get + Set + Me._zollzahlstelleOrtS = Value + End Set + End Property + + + Public Property ZollzahlstellePostfach() As String + Get + Return Me._zollzahlstellePostfach + End Get + Set + Me._zollzahlstellePostfach = Value + End Set + End Property + + + Public Property ZollzahlstellePLZP() As String + Get + Return Me._zollzahlstellePLZP + End Get + Set + Me._zollzahlstellePLZP = Value + End Set + End Property + + + Public Property ZollzahlstelleOrtP() As String + Get + Return Me._zollzahlstelleOrtP + End Get + Set + Me._zollzahlstelleOrtP = Value + End Set + End Property + + + Public Property ZollzahlstelleIBAN() As String + Get + Return Me._zollzahlstelleIBAN + End Get + Set + Me._zollzahlstelleIBAN = Value + End Set + End Property + + + Public Property ZollzahlstelleBIC() As String + Get + Return Me._zollzahlstelleBIC + End Get + Set + Me._zollzahlstelleBIC = Value + End Set + End Property + + + Public Property AnmelderEORI() As String + Get + Return Me._anmelderEORI + End Get + Set + Me._anmelderEORI = Value + End Set + End Property + + + Public Property AnmelderNLNR() As String + Get + Return Me._anmelderNLNR + End Get + Set + Me._anmelderNLNR = Value + End Set + End Property + + + Public Property VorsteuerabzugKz() As String + Get + Return Me._vorsteuerabzugKz + End Get + Set + Me._vorsteuerabzugKz = Value + End Set + End Property + + + Public Property AnmelderName() As String + Get + Return Me._anmelderName + End Get + Set + Me._anmelderName = Value + End Set + End Property + + + Public Property AnmelderNationalitaet() As String + Get + Return Me._anmelderNationalitaet + End Get + Set + Me._anmelderNationalitaet = Value + End Set + End Property + + + Public Property AnmelderStrasseHausNr() As String + Get + Return Me._anmelderStrasseHausNr + End Get + Set + Me._anmelderStrasseHausNr = Value + End Set + End Property + + + Public Property AnmelderPLZS() As String + Get + Return Me._anmelderPLZS + End Get + Set + Me._anmelderPLZS = Value + End Set + End Property + + + Public Property AnmelderOrtS() As String + Get + Return Me._anmelderOrtS + End Get + Set + Me._anmelderOrtS = Value + End Set + End Property + + + Public Property AnmelderOrtsteil() As String + Get + Return Me._anmelderOrtsteil + End Get + Set + Me._anmelderOrtsteil = Value + End Set + End Property + + + Public Property VertreterEORI() As String + Get + Return Me._vertreterEORI + End Get + Set + Me._vertreterEORI = Value + End Set + End Property + + + Public Property VertreterNLNR() As String + Get + Return Me._vertreterNLNR + End Get + Set + Me._vertreterNLNR = Value + End Set + End Property + + + Public Property VertreterName() As String + Get + Return Me._vertreterName + End Get + Set + Me._vertreterName = Value + End Set + End Property + + + Public Property VertreterNationalitaet() As String + Get + Return Me._vertreterNationalitaet + End Get + Set + Me._vertreterNationalitaet = Value + End Set + End Property + + + Public Property VertreterStrasseHausNr() As String + Get + Return Me._vertreterStrasseHausNr + End Get + Set + Me._vertreterStrasseHausNr = Value + End Set + End Property + + + Public Property VertreterPLZS() As String + Get + Return Me._vertreterPLZS + End Get + Set + Me._vertreterPLZS = Value + End Set + End Property + + + Public Property VertreterOrtS() As String + Get + Return Me._vertreterOrtS + End Get + Set + Me._vertreterOrtS = Value + End Set + End Property + + + Public Property VertreterOrtsteil() As String + Get + Return Me._vertreterOrtsteil + End Get + Set + Me._vertreterOrtsteil = Value + End Set + End Property + + + Public Property FRechnungEORI() As String + Get + Return Me._fRechnungEORI + End Get + Set + Me._fRechnungEORI = Value + End Set + End Property + + + Public Property FRechnungNLNR() As String + Get + Return Me._fRechnungNLNR + End Get + Set + Me._fRechnungNLNR = Value + End Set + End Property + + + Public Property FRechnungNationalitaet() As String + Get + Return Me._fRechnungNationalitaet + End Get + Set + Me._fRechnungNationalitaet = Value + End Set + End Property + + + Public Property FRechnungName() As String + Get + Return Me._fRechnungName + End Get + Set + Me._fRechnungName = Value + End Set + End Property + + + Public Property FRechnungStrasseHausNr() As String + Get + Return Me._fRechnungStrasseHausNr + End Get + Set + Me._fRechnungStrasseHausNr = Value + End Set + End Property + + + Public Property FRechnungPLZS() As String + Get + Return Me._fRechnungPLZS + End Get + Set + Me._fRechnungPLZS = Value + End Set + End Property + + + Public Property FRechnungOrtS() As String + Get + Return Me._fRechnungOrtS + End Get + Set + Me._fRechnungOrtS = Value + End Set + End Property + + + Public Property FRechnungOrtsteil() As String + Get + Return Me._fRechnungOrtsteil + End Get + Set + Me._fRechnungOrtsteil = Value + End Set + End Property + + + Public Property LagerhalterEORI() As String + Get + Return Me._lagerhalterEORI + End Get + Set + Me._lagerhalterEORI = Value + End Set + End Property + + + Public Property LagerhalterNLNR() As String + Get + Return Me._lagerhalterNLNR + End Get + Set + Me._lagerhalterNLNR = Value + End Set + End Property + + + Public Property LagerhalterName() As String + Get + Return Me._lagerhalterName + End Get + Set + Me._lagerhalterName = Value + End Set + End Property + + + Public Property LagerhalterStrasseHausNr() As String + Get + Return Me._lagerhalterStrasseHausNr + End Get + Set + Me._lagerhalterStrasseHausNr = Value + End Set + End Property + + + Public Property LagerhalterNationalitaet() As String + Get + Return Me._lagerhalterNationalitaet + End Get + Set + Me._lagerhalterNationalitaet = Value + End Set + End Property + + + Public Property LagerhalterPLZ() As String + Get + Return Me._lagerhalterPLZ + End Get + Set + Me._lagerhalterPLZ = Value + End Set + End Property + + + Public Property LagerhalterOrt() As String + Get + Return Me._lagerhalterOrt + End Get + Set + Me._lagerhalterOrt = Value + End Set + End Property + + + Public Property LagerhalterOrtsteil() As String + Get + Return Me._lagerhalterOrtsteil + End Get + Set + Me._lagerhalterOrtsteil = Value + End Set + End Property + + + Public Property EmpfaengerEORI() As String + Get + Return Me._empfaengerEORI + End Get + Set + Me._empfaengerEORI = Value + End Set + End Property + + + Public Property EmpfaengerNLNR() As String + Get + Return Me._empfaengerNLNR + End Get + Set + Me._empfaengerNLNR = Value + End Set + End Property + + + Public Property EmpfaengerNationalitaet() As String + Get + Return Me._empfaengerNationalitaet + End Get + Set + Me._empfaengerNationalitaet = Value + End Set + End Property + + + Public Property EmpfaengerName() As String + Get + Return Me._empfaengerName + End Get + Set + Me._empfaengerName = Value + End Set + End Property + + + Public Property EmpfaengerStrasseHausNr() As String + Get + Return Me._empfaengerStrasseHausNr + End Get + Set + Me._empfaengerStrasseHausNr = Value + End Set + End Property + + + Public Property EmpfaengerPLZS() As String + Get + Return Me._empfaengerPLZS + End Get + Set + Me._empfaengerPLZS = Value + End Set + End Property + + + Public Property EmpfaengerOrtS() As String + Get + Return Me._empfaengerOrtS + End Get + Set + Me._empfaengerOrtS = Value + End Set + End Property + + + Public Property EmpfaengerOrtsteil() As String + Get + Return Me._empfaengerOrtsteil + End Get + Set + Me._empfaengerOrtsteil = Value + End Set + End Property + + + Public Property ZahlungsEmpfaengerEORI() As String + Get + Return Me._zahlungsEmpfaengerEORI + End Get + Set + Me._zahlungsEmpfaengerEORI = Value + End Set + End Property + + + Public Property ZahlungsEmpfaengerNLNR() As String + Get + Return Me._zahlungsEmpfaengerNLNR + End Get + Set + Me._zahlungsEmpfaengerNLNR = Value + End Set + End Property + + + Public Property ZahlungsEmpfaengerKreditinstitut() As String + Get + Return Me._zahlungsEmpfaengerKreditinstitut + End Get + Set + Me._zahlungsEmpfaengerKreditinstitut = Value + End Set + End Property + + + Public Property ZahlungsEmpfaengerName() As String + Get + Return Me._zahlungsEmpfaengerName + End Get + Set + Me._zahlungsEmpfaengerName = Value + End Set + End Property + + + Public Property ZahlungsEmpfaengerNationalitaet() As String + Get + Return Me._zahlungsEmpfaengerNationalitaet + End Get + Set + Me._zahlungsEmpfaengerNationalitaet = Value + End Set + End Property + + + Public Property ZahlungsEmpfaengerStrasseHausNr() As String + Get + Return Me._zahlungsEmpfaengerStrasseHausNr + End Get + Set + Me._zahlungsEmpfaengerStrasseHausNr = Value + End Set + End Property + + + Public Property ZahlungsEmpfaengerPLZS() As String + Get + Return Me._zahlungsEmpfaengerPLZS + End Get + Set + Me._zahlungsEmpfaengerPLZS = Value + End Set + End Property + + + Public Property ZahlungsEmpfaengerOrtS() As String + Get + Return Me._zahlungsEmpfaengerOrtS + End Get + Set + Me._zahlungsEmpfaengerOrtS = Value + End Set + End Property + + + Public Property ZahlungsEmpfaengerOrtsteil() As String + Get + Return Me._zahlungsEmpfaengerOrtsteil + End Get + Set + Me._zahlungsEmpfaengerOrtsteil = Value + End Set + End Property + + + Public Property ZahlungsEmpfaengerIBAN() As String + Get + Return Me._zahlungsEmpfaengerIBAN + End Get + Set + Me._zahlungsEmpfaengerIBAN = Value + End Set + End Property + + + Public Property ZahlungsEmpfaengerBIC() As String + Get + Return Me._zahlungsEmpfaengerBIC + End Get + Set + Me._zahlungsEmpfaengerBIC = Value + End Set + End Property + + + Public Property ErstellungsDatumBefund() As Date + Get + Return Me._erstellungsDatumBefund + End Get + Set + Me._erstellungsDatumBefund = Value + End Set + End Property + + + Public Property Erfassungsdatum() As Date + Get + Return Me._erfassungsdatum + End Get + Set + Me._erfassungsdatum = Value + End Set + End Property + + + Public Property BarzahlungFaelligkeit() As Date + Get + Return Me._barzahlungFaelligkeit + End Get + Set + Me._barzahlungFaelligkeit = Value + End Set + End Property + + + Public Property SicherheitsleistungFaelligkeit() As Date + Get + Return Me._sicherheitsleistungFaelligkeit + End Get + Set + Me._sicherheitsleistungFaelligkeit = Value + End Set + End Property + + + Public Property AbrechnungszeitraumBeginn() As Date + Get + Return Me._abrechnungszeitraumBeginn + End Get + Set + Me._abrechnungszeitraumBeginn = Value + End Set + End Property + + + Public Property AbrechnungszeitraumEnde() As Date + Get + Return Me._abrechnungszeitraumEnde + End Get + Set + Me._abrechnungszeitraumEnde = Value + End Set + End Property + + + Public Property Zollbefund() As String + Get + Return Me._zollbefund + End Get + Set + Me._zollbefund = Value + End Set + End Property + + + Public Property EZAAVAngabenKopf() As EZAAVAngabenKopfTyp + Get + Return Me._eZAAVAngabenKopf + End Get + Set + Me._eZAAVAngabenKopf = Value + End Set + End Property + + + Public Property LieferbedingungCode() As String + Get + Return Me._lieferbedingungCode + End Get + Set + Me._lieferbedingungCode = Value + End Set + End Property + + + Public Property LieferbedingungText() As String + Get + Return Me._lieferbedingungText + End Get + Set + Me._lieferbedingungText = Value + End Set + End Property + + + Public Property LieferbedingungOrt() As String + Get + Return Me._lieferbedingungOrt + End Get + Set + Me._lieferbedingungOrt = Value + End Set + End Property + + + Public Property LieferbedingungSchluessel() As String + Get + Return Me._lieferbedingungSchluessel + End Get + Set + Me._lieferbedingungSchluessel = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(KopfDatenEinfuhrbescheidTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize KopfDatenEinfuhrbescheidTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes KopfDatenEinfuhrbescheidTyp object + ''' + ''' string to deserialize + ''' Output KopfDatenEinfuhrbescheidTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As KopfDatenEinfuhrbescheidTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, KopfDatenEinfuhrbescheidTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As KopfDatenEinfuhrbescheidTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As KopfDatenEinfuhrbescheidTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), KopfDatenEinfuhrbescheidTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As KopfDatenEinfuhrbescheidTyp + Return CType(SerializerXml.Deserialize(s), KopfDatenEinfuhrbescheidTyp) + End Function +#End Region + + ''' + ''' Serializes current KopfDatenEinfuhrbescheidTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an KopfDatenEinfuhrbescheidTyp object + ''' + ''' File to load and deserialize + ''' Output KopfDatenEinfuhrbescheidTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As KopfDatenEinfuhrbescheidTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, KopfDatenEinfuhrbescheidTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As KopfDatenEinfuhrbescheidTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As KopfDatenEinfuhrbescheidTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransaktionFreierVerkehrTyp + +#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(TransaktionFreierVerkehrTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransaktionFreierVerkehrTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransaktionFreierVerkehrTyp object + ''' + ''' string to deserialize + ''' Output TransaktionFreierVerkehrTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransaktionFreierVerkehrTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransaktionFreierVerkehrTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransaktionFreierVerkehrTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransaktionFreierVerkehrTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransaktionFreierVerkehrTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransaktionFreierVerkehrTyp + Return CType(SerializerXml.Deserialize(s), TransaktionFreierVerkehrTyp) + End Function +#End Region + + ''' + ''' Serializes current TransaktionFreierVerkehrTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransaktionFreierVerkehrTyp object + ''' + ''' File to load and deserialize + ''' Output TransaktionFreierVerkehrTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransaktionFreierVerkehrTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransaktionFreierVerkehrTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransaktionFreierVerkehrTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransaktionFreierVerkehrTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DatenaustauschFreierVerkehrTyp + +#Region "Private fields" + Private _transaktion As TransaktionFreierVerkehrTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._transaktion = New TransaktionFreierVerkehrTyp() + End Sub + + + Public Property Transaktion() As TransaktionFreierVerkehrTyp + 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(DatenaustauschFreierVerkehrTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DatenaustauschFreierVerkehrTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DatenaustauschFreierVerkehrTyp object + ''' + ''' string to deserialize + ''' Output DatenaustauschFreierVerkehrTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DatenaustauschFreierVerkehrTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DatenaustauschFreierVerkehrTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DatenaustauschFreierVerkehrTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DatenaustauschFreierVerkehrTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DatenaustauschFreierVerkehrTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DatenaustauschFreierVerkehrTyp + Return CType(SerializerXml.Deserialize(s), DatenaustauschFreierVerkehrTyp) + End Function +#End Region + + ''' + ''' Serializes current DatenaustauschFreierVerkehrTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DatenaustauschFreierVerkehrTyp object + ''' + ''' File to load and deserialize + ''' Output DatenaustauschFreierVerkehrTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DatenaustauschFreierVerkehrTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DatenaustauschFreierVerkehrTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DatenaustauschFreierVerkehrTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DatenaustauschFreierVerkehrTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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/EZA/Abgabenbescheid/Abgabenbescheid_011.xsd b/DAKOSY_Worker/DAKOSY/ATLAS/EZA/Abgabenbescheid/Abgabenbescheid_011.xsd new file mode 100644 index 0000000..064648e --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/EZA/Abgabenbescheid/Abgabenbescheid_011.xsd @@ -0,0 +1,581 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/EZA/FreierVerkehr/FreierVerkehrAktVeredelUmwandlung_004.Designer.vb b/DAKOSY_Worker/DAKOSY/ATLAS/EZA/FreierVerkehr/FreierVerkehrAktVeredelUmwandlung_004.Designer.vb new file mode 100644 index 0000000..b5248b7 --- /dev/null +++ b/DAKOSY_Worker/DAKOSY/ATLAS/EZA/FreierVerkehr/FreierVerkehrAktVeredelUmwandlung_004.Designer.vb @@ -0,0 +1,8327 @@ +'' ------------------------------------------------------------------------------ +'' +'' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com +'' {"TargetFramework":"Net47","NameSpace":"FreierVerkehrAktVeredelUmwandlung_004","Language":"VisualBasic","ExcludeImportedTypes":true,"ExpandNestedAttributeGroup":true,"GenerateUnusedComplexType":true,"GenerateUnusedSimpleType":true,"Properties":{},"XmlAttribute":{"Enabled":true},"ClassParams":{},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{"Formating":true},"JsonOutput":{},"Enabled":true},"Miscellaneous":{}} +'' +'' ------------------------------------------------------------------------------ +#Disable Warning +Imports System +Imports System.Diagnostics +Imports System.Xml.Serialization +Imports System.Runtime.Serialization +Imports System.Collections +Imports System.Xml.Schema +Imports System.ComponentModel +Imports System.Xml +Imports System.IO +Imports System.Text +Imports System.Collections.Generic + +Namespace FreierVerkehrAktVeredelUmwandlung_004 + + + Partial Public Class FreierVerkehrAktVeredelUmwandlungAVUVTyp + Inherits DatenaustauschFreierVerkehrTyp + +#Region "Private fields" + Private _einzelAnmeldung As List(Of EinzelEinfuhrUnvollstaendigeAnmeldungTyp) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._einzelAnmeldung = New List(Of EinzelEinfuhrUnvollstaendigeAnmeldungTyp)() + End Sub + + + Public Property EinzelAnmeldung() As List(Of EinzelEinfuhrUnvollstaendigeAnmeldungTyp) + Get + Return Me._einzelAnmeldung + End Get + Set + Me._einzelAnmeldung = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(FreierVerkehrAktVeredelUmwandlungAVUVTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize FreierVerkehrAktVeredelUmwandlungAVUVTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes FreierVerkehrAktVeredelUmwandlungAVUVTyp object + ''' + ''' string to deserialize + ''' Output FreierVerkehrAktVeredelUmwandlungAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As FreierVerkehrAktVeredelUmwandlungAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FreierVerkehrAktVeredelUmwandlungAVUVTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As FreierVerkehrAktVeredelUmwandlungAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As FreierVerkehrAktVeredelUmwandlungAVUVTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), FreierVerkehrAktVeredelUmwandlungAVUVTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As FreierVerkehrAktVeredelUmwandlungAVUVTyp + Return CType(SerializerXml.Deserialize(s), FreierVerkehrAktVeredelUmwandlungAVUVTyp) + End Function +#End Region + + ''' + ''' Serializes current FreierVerkehrAktVeredelUmwandlungAVUVTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an FreierVerkehrAktVeredelUmwandlungAVUVTyp object + ''' + ''' File to load and deserialize + ''' Output FreierVerkehrAktVeredelUmwandlungAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FreierVerkehrAktVeredelUmwandlungAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, FreierVerkehrAktVeredelUmwandlungAVUVTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As FreierVerkehrAktVeredelUmwandlungAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As FreierVerkehrAktVeredelUmwandlungAVUVTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class EinzelEinfuhrUnvollstaendigeAnmeldungTyp + +#Region "Private fields" + Private _objektIdentifizierung As ObjektIdentifizierungAVUVTyp + + Private _kopfDaten As KopfDatenEinfuhrUnvollstaendigeAnmeldungTyp + + Private _warenPosition As List(Of PositionEinfuhrUnvollstaendigeAnmeldungTyp) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._warenPosition = New List(Of PositionEinfuhrUnvollstaendigeAnmeldungTyp)() + Me._kopfDaten = New KopfDatenEinfuhrUnvollstaendigeAnmeldungTyp() + Me._objektIdentifizierung = New ObjektIdentifizierungAVUVTyp() + End Sub + + + Public Property ObjektIdentifizierung() As ObjektIdentifizierungAVUVTyp + Get + Return Me._objektIdentifizierung + End Get + Set + Me._objektIdentifizierung = Value + End Set + End Property + + + Public Property KopfDaten() As KopfDatenEinfuhrUnvollstaendigeAnmeldungTyp + Get + Return Me._kopfDaten + End Get + Set + Me._kopfDaten = Value + End Set + End Property + + + Public Property WarenPosition() As List(Of PositionEinfuhrUnvollstaendigeAnmeldungTyp) + Get + Return Me._warenPosition + End Get + Set + Me._warenPosition = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(EinzelEinfuhrUnvollstaendigeAnmeldungTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize EinzelEinfuhrUnvollstaendigeAnmeldungTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes EinzelEinfuhrUnvollstaendigeAnmeldungTyp object + ''' + ''' string to deserialize + ''' Output EinzelEinfuhrUnvollstaendigeAnmeldungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelEinfuhrUnvollstaendigeAnmeldungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EinzelEinfuhrUnvollstaendigeAnmeldungTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelEinfuhrUnvollstaendigeAnmeldungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As EinzelEinfuhrUnvollstaendigeAnmeldungTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), EinzelEinfuhrUnvollstaendigeAnmeldungTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As EinzelEinfuhrUnvollstaendigeAnmeldungTyp + Return CType(SerializerXml.Deserialize(s), EinzelEinfuhrUnvollstaendigeAnmeldungTyp) + End Function +#End Region + + ''' + ''' Serializes current EinzelEinfuhrUnvollstaendigeAnmeldungTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an EinzelEinfuhrUnvollstaendigeAnmeldungTyp object + ''' + ''' File to load and deserialize + ''' Output EinzelEinfuhrUnvollstaendigeAnmeldungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelEinfuhrUnvollstaendigeAnmeldungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, EinzelEinfuhrUnvollstaendigeAnmeldungTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelEinfuhrUnvollstaendigeAnmeldungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As EinzelEinfuhrUnvollstaendigeAnmeldungTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ObjektIdentifizierungAVUVTyp + +#Region "Private fields" + Private _objektName As String + + Private _objektAlias As String + + Private _anmeldungArt As String + + Private _objektQuittung 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 _absenderSystemName As String + + Private _shipmentReferenz As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._objektAktion = New List(Of String)() + End Sub + + + Public Property ObjektName() As String + Get + Return Me._objektName + End Get + Set + Me._objektName = Value + End Set + End Property + + + Public Property ObjektAlias() As String + Get + Return Me._objektAlias + End Get + Set + Me._objektAlias = Value + End Set + End Property + + + Public Property AnmeldungArt() As String + Get + Return Me._anmeldungArt + End Get + Set + Me._anmeldungArt = Value + End Set + End Property + + + Public Property ObjektQuittung() As String + Get + Return Me._objektQuittung + End Get + Set + Me._objektQuittung = 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 AbsenderSystemName() As String + Get + Return Me._absenderSystemName + End Get + Set + Me._absenderSystemName = Value + End Set + End Property + + + Public Property ShipmentReferenz() As String + Get + Return Me._shipmentReferenz + End Get + Set + Me._shipmentReferenz = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ObjektIdentifizierungAVUVTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ObjektIdentifizierungAVUVTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ObjektIdentifizierungAVUVTyp object + ''' + ''' string to deserialize + ''' Output ObjektIdentifizierungAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ObjektIdentifizierungAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ObjektIdentifizierungAVUVTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ObjektIdentifizierungAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ObjektIdentifizierungAVUVTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ObjektIdentifizierungAVUVTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ObjektIdentifizierungAVUVTyp + Return CType(SerializerXml.Deserialize(s), ObjektIdentifizierungAVUVTyp) + End Function +#End Region + + ''' + ''' Serializes current ObjektIdentifizierungAVUVTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ObjektIdentifizierungAVUVTyp object + ''' + ''' File to load and deserialize + ''' Output ObjektIdentifizierungAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ObjektIdentifizierungAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ObjektIdentifizierungAVUVTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ObjektIdentifizierungAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ObjektIdentifizierungAVUVTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AussenhandelsstatistikAVUVTyp + +#Region "Private fields" + Private _verkehrszweigInland As String + + Private _verkehrszweigGrenze As String + + Private _versendungsland As String + + Private _bestimmungsbundesland As String + + Private _bestimmungsland As String + + Private _befoerderungsmittelGrenzeStaatszugehoerigkeitCode As String + + Private _befoerderungsmittelGrenzeArt As String + + Private _befoerderungsmittelBeschreibung As String + + Private _artGeschaeft As String + + Private _statistikstatus As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property VerkehrszweigInland() As String + Get + Return Me._verkehrszweigInland + End Get + Set + Me._verkehrszweigInland = Value + End Set + End Property + + + Public Property VerkehrszweigGrenze() As String + Get + Return Me._verkehrszweigGrenze + End Get + Set + Me._verkehrszweigGrenze = Value + End Set + End Property + + + Public Property Versendungsland() As String + Get + Return Me._versendungsland + End Get + Set + Me._versendungsland = Value + End Set + End Property + + + Public Property Bestimmungsbundesland() As String + Get + Return Me._bestimmungsbundesland + End Get + Set + Me._bestimmungsbundesland = 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 BefoerderungsmittelGrenzeStaatszugehoerigkeitCode() As String + Get + Return Me._befoerderungsmittelGrenzeStaatszugehoerigkeitCode + End Get + Set + Me._befoerderungsmittelGrenzeStaatszugehoerigkeitCode = Value + End Set + End Property + + + Public Property BefoerderungsmittelGrenzeArt() As String + Get + Return Me._befoerderungsmittelGrenzeArt + End Get + Set + Me._befoerderungsmittelGrenzeArt = Value + End Set + End Property + + + Public Property BefoerderungsmittelBeschreibung() As String + Get + Return Me._befoerderungsmittelBeschreibung + End Get + Set + Me._befoerderungsmittelBeschreibung = Value + End Set + End Property + + + Public Property ArtGeschaeft() As String + Get + Return Me._artGeschaeft + End Get + Set + Me._artGeschaeft = Value + End Set + End Property + + + Public Property Statistikstatus() As String + Get + Return Me._statistikstatus + End Get + Set + Me._statistikstatus = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AussenhandelsstatistikAVUVTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AussenhandelsstatistikAVUVTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AussenhandelsstatistikAVUVTyp object + ''' + ''' string to deserialize + ''' Output AussenhandelsstatistikAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AussenhandelsstatistikAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AussenhandelsstatistikAVUVTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AussenhandelsstatistikAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AussenhandelsstatistikAVUVTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AussenhandelsstatistikAVUVTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AussenhandelsstatistikAVUVTyp + Return CType(SerializerXml.Deserialize(s), AussenhandelsstatistikAVUVTyp) + End Function +#End Region + + ''' + ''' Serializes current AussenhandelsstatistikAVUVTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AussenhandelsstatistikAVUVTyp object + ''' + ''' File to load and deserialize + ''' Output AussenhandelsstatistikAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AussenhandelsstatistikAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AussenhandelsstatistikAVUVTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AussenhandelsstatistikAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AussenhandelsstatistikAVUVTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AbzugHinzurechnungAVUVTyp + +#Region "Private fields" + Private _artCode As String + + Private _beschreibungAndereZahlungen As String + + Private _betrag As String + + Private _waehrung As String + + Private _kursVereinbartKz As String + + Private _kursDatum As Date + + Private _prozentsatz As String + + Private _betragInEUR As String + + Private _iATAKursKz As String + + Private _frachtkostenBerechnungsgrundlage As String + + Private _kursAuslandswaehrung As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property ArtCode() As String + Get + Return Me._artCode + End Get + Set + Me._artCode = Value + End Set + End Property + + + Public Property BeschreibungAndereZahlungen() As String + Get + Return Me._beschreibungAndereZahlungen + End Get + Set + Me._beschreibungAndereZahlungen = Value + End Set + End Property + + + Public Property Betrag() As String + Get + Return Me._betrag + End Get + Set + Me._betrag = 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 KursVereinbartKz() As String + Get + Return Me._kursVereinbartKz + End Get + Set + Me._kursVereinbartKz = Value + End Set + End Property + + + Public Property KursDatum() As Date + Get + Return Me._kursDatum + End Get + Set + Me._kursDatum = Value + End Set + End Property + + + Public Property Prozentsatz() As String + Get + Return Me._prozentsatz + End Get + Set + Me._prozentsatz = Value + End Set + End Property + + + Public Property BetragInEUR() As String + Get + Return Me._betragInEUR + End Get + Set + Me._betragInEUR = Value + End Set + End Property + + + Public Property IATAKursKz() As String + Get + Return Me._iATAKursKz + End Get + Set + Me._iATAKursKz = Value + End Set + End Property + + + Public Property FrachtkostenBerechnungsgrundlage() As String + Get + Return Me._frachtkostenBerechnungsgrundlage + End Get + Set + Me._frachtkostenBerechnungsgrundlage = Value + End Set + End Property + + + Public Property KursAuslandswaehrung() As String + Get + Return Me._kursAuslandswaehrung + End Get + Set + Me._kursAuslandswaehrung = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AbzugHinzurechnungAVUVTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AbzugHinzurechnungAVUVTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AbzugHinzurechnungAVUVTyp object + ''' + ''' string to deserialize + ''' Output AbzugHinzurechnungAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AbzugHinzurechnungAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AbzugHinzurechnungAVUVTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AbzugHinzurechnungAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AbzugHinzurechnungAVUVTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AbzugHinzurechnungAVUVTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AbzugHinzurechnungAVUVTyp + Return CType(SerializerXml.Deserialize(s), AbzugHinzurechnungAVUVTyp) + End Function +#End Region + + ''' + ''' Serializes current AbzugHinzurechnungAVUVTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AbzugHinzurechnungAVUVTyp object + ''' + ''' File to load and deserialize + ''' Output AbzugHinzurechnungAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AbzugHinzurechnungAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AbzugHinzurechnungAVUVTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AbzugHinzurechnungAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AbzugHinzurechnungAVUVTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class BesondereWertangabeAVUVTyp + +#Region "Private fields" + Private _wert As String + + Private _preisartCode As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Wert() As String + Get + Return Me._wert + End Get + Set + Me._wert = Value + End Set + End Property + + + Public Property PreisartCode() As String + Get + Return Me._preisartCode + End Get + Set + Me._preisartCode = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(BesondereWertangabeAVUVTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize BesondereWertangabeAVUVTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes BesondereWertangabeAVUVTyp object + ''' + ''' string to deserialize + ''' Output BesondereWertangabeAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BesondereWertangabeAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BesondereWertangabeAVUVTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BesondereWertangabeAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As BesondereWertangabeAVUVTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), BesondereWertangabeAVUVTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As BesondereWertangabeAVUVTyp + Return CType(SerializerXml.Deserialize(s), BesondereWertangabeAVUVTyp) + End Function +#End Region + + ''' + ''' Serializes current BesondereWertangabeAVUVTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an BesondereWertangabeAVUVTyp object + ''' + ''' File to load and deserialize + ''' Output BesondereWertangabeAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BesondereWertangabeAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BesondereWertangabeAVUVTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BesondereWertangabeAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As BesondereWertangabeAVUVTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class UnterlageVZPositionAVUVTyp + +#Region "Private fields" + Private _bereich As String + + Private _art As String + + Private _nummer As String + + Private _datumAusstellung As Date + + Private _vorlageKz As String + + Private _abschreibungsMenge As String + + Private _abschreibungsMengeMasseinheit As String + + Private _abschreibungsMengeMasseinheitQualifier As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Bereich() As String + Get + Return Me._bereich + End Get + Set + Me._bereich = Value + End Set + End Property + + + Public Property Art() As String + Get + Return Me._art + End Get + Set + Me._art = Value + End Set + End Property + + + Public Property Nummer() As String + Get + Return Me._nummer + End Get + Set + Me._nummer = Value + End Set + End Property + + + Public Property DatumAusstellung() As Date + Get + Return Me._datumAusstellung + End Get + Set + Me._datumAusstellung = Value + End Set + End Property + + + Public Property VorlageKz() As String + Get + Return Me._vorlageKz + End Get + Set + Me._vorlageKz = Value + End Set + End Property + + + Public Property AbschreibungsMenge() As String + Get + Return Me._abschreibungsMenge + End Get + Set + Me._abschreibungsMenge = Value + End Set + End Property + + + Public Property AbschreibungsMengeMasseinheit() As String + Get + Return Me._abschreibungsMengeMasseinheit + End Get + Set + Me._abschreibungsMengeMasseinheit = Value + End Set + End Property + + + Public Property AbschreibungsMengeMasseinheitQualifier() As String + Get + Return Me._abschreibungsMengeMasseinheitQualifier + End Get + Set + Me._abschreibungsMengeMasseinheitQualifier = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(UnterlageVZPositionAVUVTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize UnterlageVZPositionAVUVTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes UnterlageVZPositionAVUVTyp object + ''' + ''' string to deserialize + ''' Output UnterlageVZPositionAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As UnterlageVZPositionAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, UnterlageVZPositionAVUVTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As UnterlageVZPositionAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As UnterlageVZPositionAVUVTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), UnterlageVZPositionAVUVTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As UnterlageVZPositionAVUVTyp + Return CType(SerializerXml.Deserialize(s), UnterlageVZPositionAVUVTyp) + End Function +#End Region + + ''' + ''' Serializes current UnterlageVZPositionAVUVTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an UnterlageVZPositionAVUVTyp object + ''' + ''' File to load and deserialize + ''' Output UnterlageVZPositionAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As UnterlageVZPositionAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, UnterlageVZPositionAVUVTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As UnterlageVZPositionAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As UnterlageVZPositionAVUVTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class SonderfalldatenAVUVTyp + +#Region "Private fields" + Private _sonderabgabenGruppeCode As String + + Private _anwendungArt As String + + Private _satzBetragFaktor As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property SonderabgabenGruppeCode() As String + Get + Return Me._sonderabgabenGruppeCode + End Get + Set + Me._sonderabgabenGruppeCode = Value + End Set + End Property + + + Public Property AnwendungArt() As String + Get + Return Me._anwendungArt + End Get + Set + Me._anwendungArt = Value + End Set + End Property + + + Public Property SatzBetragFaktor() As String + Get + Return Me._satzBetragFaktor + End Get + Set + Me._satzBetragFaktor = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(SonderfalldatenAVUVTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize SonderfalldatenAVUVTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes SonderfalldatenAVUVTyp object + ''' + ''' string to deserialize + ''' Output SonderfalldatenAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SonderfalldatenAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SonderfalldatenAVUVTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SonderfalldatenAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As SonderfalldatenAVUVTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), SonderfalldatenAVUVTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As SonderfalldatenAVUVTyp + Return CType(SerializerXml.Deserialize(s), SonderfalldatenAVUVTyp) + End Function +#End Region + + ''' + ''' Serializes current SonderfalldatenAVUVTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an SonderfalldatenAVUVTyp object + ''' + ''' File to load and deserialize + ''' Output SonderfalldatenAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SonderfalldatenAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SonderfalldatenAVUVTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SonderfalldatenAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As SonderfalldatenAVUVTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AbgabenminderungAVUVTyp + +#Region "Private fields" + Private _abgabengruppeCode As String + + Private _minderungsbetrag As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property AbgabengruppeCode() As String + Get + Return Me._abgabengruppeCode + End Get + Set + Me._abgabengruppeCode = Value + End Set + End Property + + + Public Property Minderungsbetrag() As String + Get + Return Me._minderungsbetrag + End Get + Set + Me._minderungsbetrag = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AbgabenminderungAVUVTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AbgabenminderungAVUVTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AbgabenminderungAVUVTyp object + ''' + ''' string to deserialize + ''' Output AbgabenminderungAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AbgabenminderungAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AbgabenminderungAVUVTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AbgabenminderungAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AbgabenminderungAVUVTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AbgabenminderungAVUVTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AbgabenminderungAVUVTyp + Return CType(SerializerXml.Deserialize(s), AbgabenminderungAVUVTyp) + End Function +#End Region + + ''' + ''' Serializes current AbgabenminderungAVUVTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AbgabenminderungAVUVTyp object + ''' + ''' File to load and deserialize + ''' Output AbgabenminderungAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AbgabenminderungAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AbgabenminderungAVUVTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AbgabenminderungAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AbgabenminderungAVUVTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class VerbrauchssteuerAVUVTyp + +#Region "Private fields" + Private _verbrauchsteuerCode As String + + Private _verbrauchssteuerMenge As String + + Private _verbrauchssteuerMasseinheitCode As String + + Private _verbrauchssteuerMasseinheitQualifier As String + + Private _gradProzent As String + + Private _verbrauchssteuerWertBasis As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property VerbrauchsteuerCode() As String + Get + Return Me._verbrauchsteuerCode + End Get + Set + Me._verbrauchsteuerCode = Value + End Set + End Property + + + Public Property VerbrauchssteuerMenge() As String + Get + Return Me._verbrauchssteuerMenge + End Get + Set + Me._verbrauchssteuerMenge = Value + End Set + End Property + + + Public Property VerbrauchssteuerMasseinheitCode() As String + Get + Return Me._verbrauchssteuerMasseinheitCode + End Get + Set + Me._verbrauchssteuerMasseinheitCode = Value + End Set + End Property + + + Public Property VerbrauchssteuerMasseinheitQualifier() As String + Get + Return Me._verbrauchssteuerMasseinheitQualifier + End Get + Set + Me._verbrauchssteuerMasseinheitQualifier = Value + End Set + End Property + + + Public Property GradProzent() As String + Get + Return Me._gradProzent + End Get + Set + Me._gradProzent = Value + End Set + End Property + + + Public Property VerbrauchssteuerWertBasis() As String + Get + Return Me._verbrauchssteuerWertBasis + End Get + Set + Me._verbrauchssteuerWertBasis = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(VerbrauchssteuerAVUVTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize VerbrauchssteuerAVUVTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes VerbrauchssteuerAVUVTyp object + ''' + ''' string to deserialize + ''' Output VerbrauchssteuerAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VerbrauchssteuerAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VerbrauchssteuerAVUVTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As VerbrauchssteuerAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As VerbrauchssteuerAVUVTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), VerbrauchssteuerAVUVTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As VerbrauchssteuerAVUVTyp + Return CType(SerializerXml.Deserialize(s), VerbrauchssteuerAVUVTyp) + End Function +#End Region + + ''' + ''' Serializes current VerbrauchssteuerAVUVTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an VerbrauchssteuerAVUVTyp object + ''' + ''' File to load and deserialize + ''' Output VerbrauchssteuerAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VerbrauchssteuerAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, VerbrauchssteuerAVUVTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As VerbrauchssteuerAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As VerbrauchssteuerAVUVTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class BeguenstigungsMengeAVUVTyp + +#Region "Private fields" + Private _menge As String + + Private _masseinheitCode As String + + Private _masseinheitQualifier As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Menge() As String + Get + Return Me._menge + End Get + Set + Me._menge = Value + End Set + End Property + + + Public Property MasseinheitCode() As String + Get + Return Me._masseinheitCode + End Get + Set + Me._masseinheitCode = Value + End Set + End Property + + + Public Property MasseinheitQualifier() As String + Get + Return Me._masseinheitQualifier + End Get + Set + Me._masseinheitQualifier = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(BeguenstigungsMengeAVUVTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize BeguenstigungsMengeAVUVTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes BeguenstigungsMengeAVUVTyp object + ''' + ''' string to deserialize + ''' Output BeguenstigungsMengeAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BeguenstigungsMengeAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BeguenstigungsMengeAVUVTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BeguenstigungsMengeAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As BeguenstigungsMengeAVUVTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), BeguenstigungsMengeAVUVTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As BeguenstigungsMengeAVUVTyp + Return CType(SerializerXml.Deserialize(s), BeguenstigungsMengeAVUVTyp) + End Function +#End Region + + ''' + ''' Serializes current BeguenstigungsMengeAVUVTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an BeguenstigungsMengeAVUVTyp object + ''' + ''' File to load and deserialize + ''' Output BeguenstigungsMengeAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BeguenstigungsMengeAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BeguenstigungsMengeAVUVTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BeguenstigungsMengeAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As BeguenstigungsMengeAVUVTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class GehaltsangabenAVUVTyp + +#Region "Private fields" + Private _artCode As String + + Private _gradProzent As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property ArtCode() As String + Get + Return Me._artCode + End Get + Set + Me._artCode = Value + End Set + End Property + + + Public Property GradProzent() As String + Get + Return Me._gradProzent + End Get + Set + Me._gradProzent = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(GehaltsangabenAVUVTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize GehaltsangabenAVUVTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes GehaltsangabenAVUVTyp object + ''' + ''' string to deserialize + ''' Output GehaltsangabenAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GehaltsangabenAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, GehaltsangabenAVUVTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GehaltsangabenAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As GehaltsangabenAVUVTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), GehaltsangabenAVUVTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As GehaltsangabenAVUVTyp + Return CType(SerializerXml.Deserialize(s), GehaltsangabenAVUVTyp) + End Function +#End Region + + ''' + ''' Serializes current GehaltsangabenAVUVTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an GehaltsangabenAVUVTyp object + ''' + ''' File to load and deserialize + ''' Output GehaltsangabenAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GehaltsangabenAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, GehaltsangabenAVUVTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GehaltsangabenAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As GehaltsangabenAVUVTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AVVeredelungserzeugnisTyp + +#Region "Private fields" + Private _warenbezeichnung As String + + Private _ausbeuteart As String + + Private _ausbeutesatz As String + + Private _kNCode As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Warenbezeichnung() As String + Get + Return Me._warenbezeichnung + End Get + Set + Me._warenbezeichnung = Value + End Set + End Property + + + Public Property Ausbeuteart() As String + Get + Return Me._ausbeuteart + End Get + Set + Me._ausbeuteart = Value + End Set + End Property + + + Public Property Ausbeutesatz() As String + Get + Return Me._ausbeutesatz + End Get + Set + Me._ausbeutesatz = Value + End Set + End Property + + + Public Property KNCode() As String + Get + Return Me._kNCode + End Get + Set + Me._kNCode = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AVVeredelungserzeugnisTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AVVeredelungserzeugnisTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AVVeredelungserzeugnisTyp object + ''' + ''' string to deserialize + ''' Output AVVeredelungserzeugnisTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AVVeredelungserzeugnisTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AVVeredelungserzeugnisTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AVVeredelungserzeugnisTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AVVeredelungserzeugnisTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AVVeredelungserzeugnisTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AVVeredelungserzeugnisTyp + Return CType(SerializerXml.Deserialize(s), AVVeredelungserzeugnisTyp) + End Function +#End Region + + ''' + ''' Serializes current AVVeredelungserzeugnisTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AVVeredelungserzeugnisTyp object + ''' + ''' File to load and deserialize + ''' Output AVVeredelungserzeugnisTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AVVeredelungserzeugnisTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AVVeredelungserzeugnisTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AVVeredelungserzeugnisTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AVVeredelungserzeugnisTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class WarenMengeAVUVTyp + +#Region "Private fields" + Private _menge As String + + Private _masseinheit As String + + Private _qualifier As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Menge() As String + Get + Return Me._menge + End Get + Set + Me._menge = 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 Qualifier() As String + Get + Return Me._qualifier + End Get + Set + Me._qualifier = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(WarenMengeAVUVTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize WarenMengeAVUVTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes WarenMengeAVUVTyp object + ''' + ''' string to deserialize + ''' Output WarenMengeAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As WarenMengeAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, WarenMengeAVUVTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As WarenMengeAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As WarenMengeAVUVTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), WarenMengeAVUVTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As WarenMengeAVUVTyp + Return CType(SerializerXml.Deserialize(s), WarenMengeAVUVTyp) + End Function +#End Region + + ''' + ''' Serializes current WarenMengeAVUVTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an WarenMengeAVUVTyp object + ''' + ''' File to load and deserialize + ''' Output WarenMengeAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As WarenMengeAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, WarenMengeAVUVTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As WarenMengeAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As WarenMengeAVUVTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class PositionEinfuhrUnvollstaendigeAnmeldungTyp + +#Region "Private fields" + Private _positionsnummer As String + + Private _artikelNummer As String + + Private _warenNummerEZT As String + + Private _warenNummerZusatzCode As List(Of String) + + Private _warenNummerZusatz1 As String + + Private _warenNummerZusatz2 As String + + Private _warenBezeichnung As String + + Private _verfahrenscodeVorangegangenesVerfahren As String + + Private _abgabensteuerungKz As String + + Private _eUCode As List(Of String) + + Private _ursprungslandCode As String + + Private _praeferenzursprungsland As String + + Private _rohmasse As String + + Private _eigenmasse As String + + Private _aHStatMenge As String + + Private _aHStatMengeMasseinheit As String + + Private _aHStatMengeQualifier As String + + Private _kostenEUSt As String + + Private _aHStatWert As String + + Private _packstueckAnzahl As String + + Private _packstueckArt As String + + Private _packstueckZeichen As String + + Private _warenMenge As List(Of WarenMengeAVUVTyp) + + Private _warenMengeZoll As String + + Private _warenMengeZollMasseinheit As String + + Private _warenMengeZollMasseinheitQualifier As String + + Private _beguenstigungBeantragtCode As String + + Private _kontingentnummer As List(Of String) + + Private _positionsZusatz As String + + Private _aHStatWertManuellKZ As String + + Private _artikelpreis As String + + Private _ortVerbringens As String + + Private _abflughafenIATACode As String + + Private _warenmengeAVUVZugang As String + + Private _warenmengeAVUVZugangMasseinheit As String + + Private _warenmengeAVUVZugangMasseinheitQualifier As String + + Private _warenmengeAgrarzoll As String + + Private _warenmengeAgrarzollMasseinheit As String + + Private _warenmengeAgrarzollMasseinheitQualifier As String + + Private _sachbereich As String + + Private _bedingungCode As String + + Private _veredelungWertsteigerung As String + + Private _tabakSteuerzeichenID As String + + Private _aVWirtschaftlicheVoraussetzungen As String + + Private _aVNaemlichkeitsmittel As String + + Private _aVErlaeuterungNaemlichkeit As String + + Private _aVVeredelungserzeugnis As List(Of AVVeredelungserzeugnisTyp) + + Private _gehaltsangaben As List(Of GehaltsangabenAVUVTyp) + + Private _beguenstigungsmenge As BeguenstigungsMengeAVUVTyp + + Private _verbrauchssteuer As List(Of VerbrauchssteuerAVUVTyp) + + Private _abgabenminderung As List(Of AbgabenminderungAVUVTyp) + + Private _sonderfalldaten As List(Of SonderfalldatenAVUVTyp) + + Private _unterlage As List(Of UnterlageVZPositionAVUVTyp) + + Private _besondereWertangabe As List(Of BesondereWertangabeAVUVTyp) + + Private _vZAStatus As String + + Private _eGZStatus As String + + Private _dV1Status As String + + Private _anmeldeArt As String + + Private _befundDatum As Date + + Private _anmelderAdressCodeEORI As String + + Private _anmelderAdressCodeZollnummer As String + + Private _zollverfahren As String + + Private _abrechnungszollstelleCode As String + + Private _sachbereichCode As String + + Private _registriernummervZA As String + + Private _anmeldeVerfahren As String + + Private _bewilligungsnummer As String + + Private _bewilligungsnummerEndverwenderEGZDurchDritte As String + + Private _zollwert As String + + Private _luftfrachtkostenGesamt As String + + Private _iATAKursKz As String + + Private _luftfrachtkostenGesamtWaehrung As String + + Private _kursVereinbartKz As String + + Private _kursBetragVereinbart As String + + Private _kursDatum As Date + + Private _abzugHinzurechnung As List(Of AbzugHinzurechnungAVUVTyp) + + Private _aussenhandelsstatistik As AussenhandelsstatistikAVUVTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._aussenhandelsstatistik = New AussenhandelsstatistikAVUVTyp() + Me._abzugHinzurechnung = New List(Of AbzugHinzurechnungAVUVTyp)() + Me._besondereWertangabe = New List(Of BesondereWertangabeAVUVTyp)() + Me._unterlage = New List(Of UnterlageVZPositionAVUVTyp)() + Me._sonderfalldaten = New List(Of SonderfalldatenAVUVTyp)() + Me._abgabenminderung = New List(Of AbgabenminderungAVUVTyp)() + Me._verbrauchssteuer = New List(Of VerbrauchssteuerAVUVTyp)() + Me._beguenstigungsmenge = New BeguenstigungsMengeAVUVTyp() + Me._gehaltsangaben = New List(Of GehaltsangabenAVUVTyp)() + Me._aVVeredelungserzeugnis = New List(Of AVVeredelungserzeugnisTyp)() + Me._kontingentnummer = New List(Of String)() + Me._warenMenge = New List(Of WarenMengeAVUVTyp)() + Me._eUCode = New List(Of String)() + Me._warenNummerZusatzCode = New List(Of String)() + End Sub + + + Public Property Positionsnummer() As String + Get + Return Me._positionsnummer + End Get + Set + Me._positionsnummer = Value + End Set + End Property + + + Public Property ArtikelNummer() As String + Get + Return Me._artikelNummer + End Get + Set + Me._artikelNummer = Value + End Set + End Property + + + Public Property WarenNummerEZT() As String + Get + Return Me._warenNummerEZT + End Get + Set + Me._warenNummerEZT = Value + End Set + End Property + + + Public Property WarenNummerZusatzCode() As List(Of String) + Get + Return Me._warenNummerZusatzCode + End Get + Set + Me._warenNummerZusatzCode = Value + End Set + End Property + + + Public Property WarenNummerZusatz1() As String + Get + Return Me._warenNummerZusatz1 + End Get + Set + Me._warenNummerZusatz1 = Value + End Set + End Property + + + Public Property WarenNummerZusatz2() As String + Get + Return Me._warenNummerZusatz2 + End Get + Set + Me._warenNummerZusatz2 = 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 VerfahrenscodeVorangegangenesVerfahren() As String + Get + Return Me._verfahrenscodeVorangegangenesVerfahren + End Get + Set + Me._verfahrenscodeVorangegangenesVerfahren = Value + End Set + End Property + + + Public Property AbgabensteuerungKz() As String + Get + Return Me._abgabensteuerungKz + End Get + Set + Me._abgabensteuerungKz = Value + End Set + End Property + + + Public Property EUCode() As List(Of String) + Get + Return Me._eUCode + End Get + Set + Me._eUCode = Value + End Set + End Property + + + Public Property UrsprungslandCode() As String + Get + Return Me._ursprungslandCode + End Get + Set + Me._ursprungslandCode = Value + End Set + End Property + + + Public Property Praeferenzursprungsland() As String + Get + Return Me._praeferenzursprungsland + End Get + Set + Me._praeferenzursprungsland = Value + End Set + End Property + + + Public Property Rohmasse() As String + Get + Return Me._rohmasse + End Get + Set + Me._rohmasse = Value + End Set + End Property + + + Public Property Eigenmasse() As String + Get + Return Me._eigenmasse + End Get + Set + Me._eigenmasse = Value + End Set + End Property + + + Public Property AHStatMenge() As String + Get + Return Me._aHStatMenge + End Get + Set + Me._aHStatMenge = Value + End Set + End Property + + + Public Property AHStatMengeMasseinheit() As String + Get + Return Me._aHStatMengeMasseinheit + End Get + Set + Me._aHStatMengeMasseinheit = Value + End Set + End Property + + + Public Property AHStatMengeQualifier() As String + Get + Return Me._aHStatMengeQualifier + End Get + Set + Me._aHStatMengeQualifier = Value + End Set + End Property + + + Public Property KostenEUSt() As String + Get + Return Me._kostenEUSt + End Get + Set + Me._kostenEUSt = Value + End Set + End Property + + + Public Property AHStatWert() As String + Get + Return Me._aHStatWert + End Get + Set + Me._aHStatWert = Value + End Set + End Property + + + Public Property PackstueckAnzahl() As String + Get + Return Me._packstueckAnzahl + End Get + Set + Me._packstueckAnzahl = Value + End Set + End Property + + + Public Property PackstueckArt() As String + Get + Return Me._packstueckArt + End Get + Set + Me._packstueckArt = Value + End Set + End Property + + + Public Property PackstueckZeichen() As String + Get + Return Me._packstueckZeichen + End Get + Set + Me._packstueckZeichen = Value + End Set + End Property + + + Public Property WarenMenge() As List(Of WarenMengeAVUVTyp) + Get + Return Me._warenMenge + End Get + Set + Me._warenMenge = Value + End Set + End Property + + + Public Property WarenMengeZoll() As String + Get + Return Me._warenMengeZoll + End Get + Set + Me._warenMengeZoll = Value + End Set + End Property + + + Public Property WarenMengeZollMasseinheit() As String + Get + Return Me._warenMengeZollMasseinheit + End Get + Set + Me._warenMengeZollMasseinheit = Value + End Set + End Property + + + Public Property WarenMengeZollMasseinheitQualifier() As String + Get + Return Me._warenMengeZollMasseinheitQualifier + End Get + Set + Me._warenMengeZollMasseinheitQualifier = Value + End Set + End Property + + + Public Property BeguenstigungBeantragtCode() As String + Get + Return Me._beguenstigungBeantragtCode + End Get + Set + Me._beguenstigungBeantragtCode = Value + End Set + End Property + + + Public Property Kontingentnummer() As List(Of String) + Get + Return Me._kontingentnummer + End Get + Set + Me._kontingentnummer = Value + End Set + End Property + + + Public Property PositionsZusatz() As String + Get + Return Me._positionsZusatz + End Get + Set + Me._positionsZusatz = Value + End Set + End Property + + + Public Property AHStatWertManuellKZ() As String + Get + Return Me._aHStatWertManuellKZ + End Get + Set + Me._aHStatWertManuellKZ = Value + End Set + End Property + + + Public Property Artikelpreis() As String + Get + Return Me._artikelpreis + End Get + Set + Me._artikelpreis = Value + End Set + End Property + + + Public Property OrtVerbringens() As String + Get + Return Me._ortVerbringens + End Get + Set + Me._ortVerbringens = Value + End Set + End Property + + + Public Property AbflughafenIATACode() As String + Get + Return Me._abflughafenIATACode + End Get + Set + Me._abflughafenIATACode = Value + End Set + End Property + + + Public Property WarenmengeAVUVZugang() As String + Get + Return Me._warenmengeAVUVZugang + End Get + Set + Me._warenmengeAVUVZugang = Value + End Set + End Property + + + Public Property WarenmengeAVUVZugangMasseinheit() As String + Get + Return Me._warenmengeAVUVZugangMasseinheit + End Get + Set + Me._warenmengeAVUVZugangMasseinheit = Value + End Set + End Property + + + Public Property WarenmengeAVUVZugangMasseinheitQualifier() As String + Get + Return Me._warenmengeAVUVZugangMasseinheitQualifier + End Get + Set + Me._warenmengeAVUVZugangMasseinheitQualifier = Value + End Set + End Property + + + Public Property WarenmengeAgrarzoll() As String + Get + Return Me._warenmengeAgrarzoll + End Get + Set + Me._warenmengeAgrarzoll = Value + End Set + End Property + + + Public Property WarenmengeAgrarzollMasseinheit() As String + Get + Return Me._warenmengeAgrarzollMasseinheit + End Get + Set + Me._warenmengeAgrarzollMasseinheit = Value + End Set + End Property + + + Public Property WarenmengeAgrarzollMasseinheitQualifier() As String + Get + Return Me._warenmengeAgrarzollMasseinheitQualifier + End Get + Set + Me._warenmengeAgrarzollMasseinheitQualifier = Value + End Set + End Property + + + Public Property Sachbereich() As String + Get + Return Me._sachbereich + End Get + Set + Me._sachbereich = Value + End Set + End Property + + + Public Property BedingungCode() As String + Get + Return Me._bedingungCode + End Get + Set + Me._bedingungCode = Value + End Set + End Property + + + Public Property VeredelungWertsteigerung() As String + Get + Return Me._veredelungWertsteigerung + End Get + Set + Me._veredelungWertsteigerung = Value + End Set + End Property + + + Public Property TabakSteuerzeichenID() As String + Get + Return Me._tabakSteuerzeichenID + End Get + Set + Me._tabakSteuerzeichenID = Value + End Set + End Property + + + Public Property AVWirtschaftlicheVoraussetzungen() As String + Get + Return Me._aVWirtschaftlicheVoraussetzungen + End Get + Set + Me._aVWirtschaftlicheVoraussetzungen = Value + End Set + End Property + + + Public Property AVNaemlichkeitsmittel() As String + Get + Return Me._aVNaemlichkeitsmittel + End Get + Set + Me._aVNaemlichkeitsmittel = Value + End Set + End Property + + + Public Property AVErlaeuterungNaemlichkeit() As String + Get + Return Me._aVErlaeuterungNaemlichkeit + End Get + Set + Me._aVErlaeuterungNaemlichkeit = Value + End Set + End Property + + + Public Property AVVeredelungserzeugnis() As List(Of AVVeredelungserzeugnisTyp) + Get + Return Me._aVVeredelungserzeugnis + End Get + Set + Me._aVVeredelungserzeugnis = Value + End Set + End Property + + + Public Property Gehaltsangaben() As List(Of GehaltsangabenAVUVTyp) + Get + Return Me._gehaltsangaben + End Get + Set + Me._gehaltsangaben = Value + End Set + End Property + + + Public Property Beguenstigungsmenge() As BeguenstigungsMengeAVUVTyp + Get + Return Me._beguenstigungsmenge + End Get + Set + Me._beguenstigungsmenge = Value + End Set + End Property + + + Public Property Verbrauchssteuer() As List(Of VerbrauchssteuerAVUVTyp) + Get + Return Me._verbrauchssteuer + End Get + Set + Me._verbrauchssteuer = Value + End Set + End Property + + + Public Property Abgabenminderung() As List(Of AbgabenminderungAVUVTyp) + Get + Return Me._abgabenminderung + End Get + Set + Me._abgabenminderung = Value + End Set + End Property + + + Public Property Sonderfalldaten() As List(Of SonderfalldatenAVUVTyp) + Get + Return Me._sonderfalldaten + End Get + Set + Me._sonderfalldaten = Value + End Set + End Property + + + Public Property Unterlage() As List(Of UnterlageVZPositionAVUVTyp) + Get + Return Me._unterlage + End Get + Set + Me._unterlage = Value + End Set + End Property + + + Public Property BesondereWertangabe() As List(Of BesondereWertangabeAVUVTyp) + Get + Return Me._besondereWertangabe + End Get + Set + Me._besondereWertangabe = Value + End Set + End Property + + + Public Property VZAStatus() As String + Get + Return Me._vZAStatus + End Get + Set + Me._vZAStatus = Value + End Set + End Property + + + Public Property EGZStatus() As String + Get + Return Me._eGZStatus + End Get + Set + Me._eGZStatus = Value + End Set + End Property + + + Public Property DV1Status() As String + Get + Return Me._dV1Status + End Get + Set + Me._dV1Status = Value + End Set + End Property + + + Public Property AnmeldeArt() As String + Get + Return Me._anmeldeArt + End Get + Set + Me._anmeldeArt = Value + End Set + End Property + + + Public Property BefundDatum() As Date + Get + Return Me._befundDatum + End Get + Set + Me._befundDatum = Value + End Set + End Property + + + Public Property AnmelderAdressCodeEORI() As String + Get + Return Me._anmelderAdressCodeEORI + End Get + Set + Me._anmelderAdressCodeEORI = Value + End Set + End Property + + + Public Property AnmelderAdressCodeZollnummer() As String + Get + Return Me._anmelderAdressCodeZollnummer + End Get + Set + Me._anmelderAdressCodeZollnummer = Value + End Set + End Property + + + Public Property Zollverfahren() As String + Get + Return Me._zollverfahren + End Get + Set + Me._zollverfahren = Value + End Set + End Property + + + Public Property AbrechnungszollstelleCode() As String + Get + Return Me._abrechnungszollstelleCode + End Get + Set + Me._abrechnungszollstelleCode = Value + End Set + End Property + + + Public Property SachbereichCode() As String + Get + Return Me._sachbereichCode + End Get + Set + Me._sachbereichCode = Value + End Set + End Property + + + Public Property RegistriernummervZA() As String + Get + Return Me._registriernummervZA + End Get + Set + Me._registriernummervZA = Value + End Set + End Property + + + Public Property AnmeldeVerfahren() As String + Get + Return Me._anmeldeVerfahren + End Get + Set + Me._anmeldeVerfahren = 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 BewilligungsnummerEndverwenderEGZDurchDritte() As String + Get + Return Me._bewilligungsnummerEndverwenderEGZDurchDritte + End Get + Set + Me._bewilligungsnummerEndverwenderEGZDurchDritte = Value + End Set + End Property + + + Public Property Zollwert() As String + Get + Return Me._zollwert + End Get + Set + Me._zollwert = Value + End Set + End Property + + + Public Property LuftfrachtkostenGesamt() As String + Get + Return Me._luftfrachtkostenGesamt + End Get + Set + Me._luftfrachtkostenGesamt = Value + End Set + End Property + + + Public Property IATAKursKz() As String + Get + Return Me._iATAKursKz + End Get + Set + Me._iATAKursKz = Value + End Set + End Property + + + Public Property LuftfrachtkostenGesamtWaehrung() As String + Get + Return Me._luftfrachtkostenGesamtWaehrung + End Get + Set + Me._luftfrachtkostenGesamtWaehrung = Value + End Set + End Property + + + Public Property KursVereinbartKz() As String + Get + Return Me._kursVereinbartKz + End Get + Set + Me._kursVereinbartKz = Value + End Set + End Property + + + Public Property KursBetragVereinbart() As String + Get + Return Me._kursBetragVereinbart + End Get + Set + Me._kursBetragVereinbart = Value + End Set + End Property + + + Public Property KursDatum() As Date + Get + Return Me._kursDatum + End Get + Set + Me._kursDatum = Value + End Set + End Property + + + Public Property AbzugHinzurechnung() As List(Of AbzugHinzurechnungAVUVTyp) + Get + Return Me._abzugHinzurechnung + End Get + Set + Me._abzugHinzurechnung = Value + End Set + End Property + + + Public Property Aussenhandelsstatistik() As AussenhandelsstatistikAVUVTyp + Get + Return Me._aussenhandelsstatistik + End Get + Set + Me._aussenhandelsstatistik = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PositionEinfuhrUnvollstaendigeAnmeldungTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize PositionEinfuhrUnvollstaendigeAnmeldungTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes PositionEinfuhrUnvollstaendigeAnmeldungTyp object + ''' + ''' string to deserialize + ''' Output PositionEinfuhrUnvollstaendigeAnmeldungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PositionEinfuhrUnvollstaendigeAnmeldungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PositionEinfuhrUnvollstaendigeAnmeldungTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PositionEinfuhrUnvollstaendigeAnmeldungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As PositionEinfuhrUnvollstaendigeAnmeldungTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PositionEinfuhrUnvollstaendigeAnmeldungTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As PositionEinfuhrUnvollstaendigeAnmeldungTyp + Return CType(SerializerXml.Deserialize(s), PositionEinfuhrUnvollstaendigeAnmeldungTyp) + End Function +#End Region + + ''' + ''' Serializes current PositionEinfuhrUnvollstaendigeAnmeldungTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an PositionEinfuhrUnvollstaendigeAnmeldungTyp object + ''' + ''' File to load and deserialize + ''' Output PositionEinfuhrUnvollstaendigeAnmeldungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PositionEinfuhrUnvollstaendigeAnmeldungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, PositionEinfuhrUnvollstaendigeAnmeldungTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PositionEinfuhrUnvollstaendigeAnmeldungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PositionEinfuhrUnvollstaendigeAnmeldungTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AdressenVzImportAVUVTyp + +#Region "Private fields" + Private _adressTyp As String + + Private _adressCode As String + + Private _teilnehmerEORI As String + + Private _teilnehmerNLNR As String + + Private _zollNr As String + + Private _nameFirma As String + + Private _strasseHausNr As String + + Private _ortsteil As String + + Private _landCode As String + + Private _pLZS As String + + Private _ortS As String + + Private _uStIDAnmelder As String + + Private _finanzamtIDAnmelder As String + + Private _sitzEinfuehrer As String + + Private _bewilligungsnummer As String + + Private _bewilligungFachVerfahren As String + + Private _bewilligungsnummerEndverwender As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property AdressTyp() As String + Get + Return Me._adressTyp + End Get + Set + Me._adressTyp = Value + End Set + End Property + + + Public Property AdressCode() As String + Get + Return Me._adressCode + End Get + Set + Me._adressCode = Value + End Set + End Property + + + Public Property TeilnehmerEORI() As String + Get + Return Me._teilnehmerEORI + End Get + Set + Me._teilnehmerEORI = Value + End Set + End Property + + + Public Property TeilnehmerNLNR() As String + Get + Return Me._teilnehmerNLNR + End Get + Set + Me._teilnehmerNLNR = Value + End Set + End Property + + + Public Property ZollNr() As String + Get + Return Me._zollNr + End Get + Set + Me._zollNr = Value + End Set + End Property + + + Public Property NameFirma() As String + Get + Return Me._nameFirma + End Get + Set + Me._nameFirma = Value + End Set + End Property + + + Public Property StrasseHausNr() As String + Get + Return Me._strasseHausNr + End Get + Set + Me._strasseHausNr = Value + End Set + End Property + + + Public Property Ortsteil() As String + Get + Return Me._ortsteil + End Get + Set + Me._ortsteil = Value + End Set + End Property + + + Public Property LandCode() As String + Get + Return Me._landCode + End Get + Set + Me._landCode = Value + End Set + End Property + + + Public Property PLZS() As String + Get + Return Me._pLZS + End Get + Set + Me._pLZS = Value + End Set + End Property + + + Public Property OrtS() As String + Get + Return Me._ortS + End Get + Set + Me._ortS = Value + End Set + End Property + + + Public Property UStIDAnmelder() As String + Get + Return Me._uStIDAnmelder + End Get + Set + Me._uStIDAnmelder = Value + End Set + End Property + + + Public Property FinanzamtIDAnmelder() As String + Get + Return Me._finanzamtIDAnmelder + End Get + Set + Me._finanzamtIDAnmelder = Value + End Set + End Property + + + Public Property SitzEinfuehrer() As String + Get + Return Me._sitzEinfuehrer + End Get + Set + Me._sitzEinfuehrer = 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 BewilligungFachVerfahren() As String + Get + Return Me._bewilligungFachVerfahren + End Get + Set + Me._bewilligungFachVerfahren = Value + End Set + End Property + + + Public Property BewilligungsnummerEndverwender() As String + Get + Return Me._bewilligungsnummerEndverwender + End Get + Set + Me._bewilligungsnummerEndverwender = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdressenVzImportAVUVTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AdressenVzImportAVUVTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AdressenVzImportAVUVTyp object + ''' + ''' string to deserialize + ''' Output AdressenVzImportAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdressenVzImportAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdressenVzImportAVUVTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdressenVzImportAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AdressenVzImportAVUVTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdressenVzImportAVUVTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdressenVzImportAVUVTyp + Return CType(SerializerXml.Deserialize(s), AdressenVzImportAVUVTyp) + End Function +#End Region + + ''' + ''' Serializes current AdressenVzImportAVUVTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AdressenVzImportAVUVTyp object + ''' + ''' File to load and deserialize + ''' Output AdressenVzImportAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdressenVzImportAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AdressenVzImportAVUVTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdressenVzImportAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdressenVzImportAVUVTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class ZusaetzlicheSteuerlicheVerweiseTyp + +#Region "Private fields" + Private _kennnummer As String + + Private _steuerbeteiligterTIN As String + + Private _name As String + + Private _strasseUndHausnummer As String + + Private _land As String + + Private _pLZ As String + + Private _ort As String + + Private _ortsteil As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Kennnummer() As String + Get + Return Me._kennnummer + End Get + Set + Me._kennnummer = Value + End Set + End Property + + + Public Property SteuerbeteiligterTIN() As String + Get + Return Me._steuerbeteiligterTIN + End Get + Set + Me._steuerbeteiligterTIN = 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 StrasseUndHausnummer() As String + Get + Return Me._strasseUndHausnummer + End Get + Set + Me._strasseUndHausnummer = 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 Ortsteil() As String + Get + Return Me._ortsteil + End Get + Set + Me._ortsteil = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ZusaetzlicheSteuerlicheVerweiseTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize ZusaetzlicheSteuerlicheVerweiseTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes ZusaetzlicheSteuerlicheVerweiseTyp object + ''' + ''' string to deserialize + ''' Output ZusaetzlicheSteuerlicheVerweiseTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ZusaetzlicheSteuerlicheVerweiseTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ZusaetzlicheSteuerlicheVerweiseTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ZusaetzlicheSteuerlicheVerweiseTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As ZusaetzlicheSteuerlicheVerweiseTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ZusaetzlicheSteuerlicheVerweiseTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As ZusaetzlicheSteuerlicheVerweiseTyp + Return CType(SerializerXml.Deserialize(s), ZusaetzlicheSteuerlicheVerweiseTyp) + End Function +#End Region + + ''' + ''' Serializes current ZusaetzlicheSteuerlicheVerweiseTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an ZusaetzlicheSteuerlicheVerweiseTyp object + ''' + ''' File to load and deserialize + ''' Output ZusaetzlicheSteuerlicheVerweiseTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ZusaetzlicheSteuerlicheVerweiseTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, ZusaetzlicheSteuerlicheVerweiseTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ZusaetzlicheSteuerlicheVerweiseTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ZusaetzlicheSteuerlicheVerweiseTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AVBuchhaltVeredelungTyp + +#Region "Private fields" + Private _strasse As String + + Private _land As String + + Private _pLZ As String + + Private _ort As String + + Private _ortsteil As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Strasse() As String + Get + Return Me._strasse + End Get + Set + Me._strasse = 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 Ortsteil() As String + Get + Return Me._ortsteil + End Get + Set + Me._ortsteil = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AVBuchhaltVeredelungTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AVBuchhaltVeredelungTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AVBuchhaltVeredelungTyp object + ''' + ''' string to deserialize + ''' Output AVBuchhaltVeredelungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AVBuchhaltVeredelungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AVBuchhaltVeredelungTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AVBuchhaltVeredelungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AVBuchhaltVeredelungTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AVBuchhaltVeredelungTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AVBuchhaltVeredelungTyp + Return CType(SerializerXml.Deserialize(s), AVBuchhaltVeredelungTyp) + End Function +#End Region + + ''' + ''' Serializes current AVBuchhaltVeredelungTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AVBuchhaltVeredelungTyp object + ''' + ''' File to load and deserialize + ''' Output AVBuchhaltVeredelungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AVBuchhaltVeredelungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AVBuchhaltVeredelungTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AVBuchhaltVeredelungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AVBuchhaltVeredelungTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class BEAnteilZLAVUVPositionAVUVTyp + +#Region "Private fields" + Private _registriernummerZugang As String + + Private _positionZugang As String + + Private _artikelcodeATZL As String + + Private _eigentuemerATZL As String + + Private _chargennummerATZL As String + + Private _ursprungslandATZL As String + + Private _atlasKz As String + + Private _warennummer As String + + Private _ueblicheBehandlungKz As String + + Private _handelsmenge As String + + Private _masseinheitHandelsmenge As String + + Private _qualifikatorHandelsmenge As String + + Private _abgangsmenge As String + + Private _masseinheitAbgangsmenge As String + + Private _qualifikatorAbgangsmenge As String + + Private _positionszusatz As String + + Private _warenbezogeneAngaben As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property RegistriernummerZugang() As String + Get + Return Me._registriernummerZugang + End Get + Set + Me._registriernummerZugang = Value + End Set + End Property + + + Public Property PositionZugang() As String + Get + Return Me._positionZugang + End Get + Set + Me._positionZugang = Value + End Set + End Property + + + Public Property ArtikelcodeATZL() As String + Get + Return Me._artikelcodeATZL + End Get + Set + Me._artikelcodeATZL = Value + End Set + End Property + + + Public Property EigentuemerATZL() As String + Get + Return Me._eigentuemerATZL + End Get + Set + Me._eigentuemerATZL = Value + End Set + End Property + + + Public Property ChargennummerATZL() As String + Get + Return Me._chargennummerATZL + End Get + Set + Me._chargennummerATZL = Value + End Set + End Property + + + Public Property UrsprungslandATZL() As String + Get + Return Me._ursprungslandATZL + End Get + Set + Me._ursprungslandATZL = Value + End Set + End Property + + + Public Property AtlasKz() As String + Get + Return Me._atlasKz + End Get + Set + Me._atlasKz = 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 UeblicheBehandlungKz() As String + Get + Return Me._ueblicheBehandlungKz + End Get + Set + Me._ueblicheBehandlungKz = Value + End Set + End Property + + + Public Property Handelsmenge() As String + Get + Return Me._handelsmenge + End Get + Set + Me._handelsmenge = Value + End Set + End Property + + + Public Property MasseinheitHandelsmenge() As String + Get + Return Me._masseinheitHandelsmenge + End Get + Set + Me._masseinheitHandelsmenge = Value + End Set + End Property + + + Public Property QualifikatorHandelsmenge() As String + Get + Return Me._qualifikatorHandelsmenge + End Get + Set + Me._qualifikatorHandelsmenge = Value + End Set + End Property + + + Public Property Abgangsmenge() As String + Get + Return Me._abgangsmenge + End Get + Set + Me._abgangsmenge = Value + End Set + End Property + + + Public Property MasseinheitAbgangsmenge() As String + Get + Return Me._masseinheitAbgangsmenge + End Get + Set + Me._masseinheitAbgangsmenge = Value + End Set + End Property + + + Public Property QualifikatorAbgangsmenge() As String + Get + Return Me._qualifikatorAbgangsmenge + End Get + Set + Me._qualifikatorAbgangsmenge = Value + End Set + End Property + + + Public Property Positionszusatz() As String + Get + Return Me._positionszusatz + End Get + Set + Me._positionszusatz = 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(BEAnteilZLAVUVPositionAVUVTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize BEAnteilZLAVUVPositionAVUVTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes BEAnteilZLAVUVPositionAVUVTyp object + ''' + ''' string to deserialize + ''' Output BEAnteilZLAVUVPositionAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BEAnteilZLAVUVPositionAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BEAnteilZLAVUVPositionAVUVTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As BEAnteilZLAVUVPositionAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As BEAnteilZLAVUVPositionAVUVTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), BEAnteilZLAVUVPositionAVUVTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As BEAnteilZLAVUVPositionAVUVTyp + Return CType(SerializerXml.Deserialize(s), BEAnteilZLAVUVPositionAVUVTyp) + End Function +#End Region + + ''' + ''' Serializes current BEAnteilZLAVUVPositionAVUVTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an BEAnteilZLAVUVPositionAVUVTyp object + ''' + ''' File to load and deserialize + ''' Output BEAnteilZLAVUVPositionAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BEAnteilZLAVUVPositionAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, BEAnteilZLAVUVPositionAVUVTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As BEAnteilZLAVUVPositionAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As BEAnteilZLAVUVPositionAVUVTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class SumABeendigungsAnteilAVUVTyp + +#Region "Private fields" + Private _sumARegistriernummer As String + + Private _sumAPosNr As String + + Private _beendigungsPackstueckzahl As String + + Private _artIdentifikation As String + + Private _verwahrerEORI As String + + Private _zollNummerVerwahrer As String + + Private _spezifOrdnungsbegriffArt As String + + Private _spezifOrdnungsbegriff As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property SumARegistriernummer() As String + Get + Return Me._sumARegistriernummer + End Get + Set + Me._sumARegistriernummer = Value + End Set + End Property + + + Public Property SumAPosNr() As String + Get + Return Me._sumAPosNr + End Get + Set + Me._sumAPosNr = Value + End Set + End Property + + + Public Property BeendigungsPackstueckzahl() As String + Get + Return Me._beendigungsPackstueckzahl + End Get + Set + Me._beendigungsPackstueckzahl = 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 VerwahrerEORI() As String + Get + Return Me._verwahrerEORI + End Get + Set + Me._verwahrerEORI = Value + End Set + End Property + + + Public Property ZollNummerVerwahrer() As String + Get + Return Me._zollNummerVerwahrer + End Get + Set + Me._zollNummerVerwahrer = Value + End Set + End Property + + + Public Property SpezifOrdnungsbegriffArt() As String + Get + Return Me._spezifOrdnungsbegriffArt + End Get + Set + Me._spezifOrdnungsbegriffArt = Value + End Set + End Property + + + Public Property SpezifOrdnungsbegriff() As String + Get + Return Me._spezifOrdnungsbegriff + End Get + Set + Me._spezifOrdnungsbegriff = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(SumABeendigungsAnteilAVUVTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize SumABeendigungsAnteilAVUVTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes SumABeendigungsAnteilAVUVTyp object + ''' + ''' string to deserialize + ''' Output SumABeendigungsAnteilAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SumABeendigungsAnteilAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SumABeendigungsAnteilAVUVTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SumABeendigungsAnteilAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As SumABeendigungsAnteilAVUVTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), SumABeendigungsAnteilAVUVTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As SumABeendigungsAnteilAVUVTyp + Return CType(SerializerXml.Deserialize(s), SumABeendigungsAnteilAVUVTyp) + End Function +#End Region + + ''' + ''' Serializes current SumABeendigungsAnteilAVUVTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an SumABeendigungsAnteilAVUVTyp object + ''' + ''' File to load and deserialize + ''' Output SumABeendigungsAnteilAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SumABeendigungsAnteilAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, SumABeendigungsAnteilAVUVTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SumABeendigungsAnteilAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As SumABeendigungsAnteilAVUVTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class AufschubAVUVTyp + +#Region "Private fields" + Private _aufschubart As String + + Private _artAufschubantrag As String + + Private _aufschubnehmerEORI As String + + Private _kennbuchstabenAufschub As String + + Private _zollnummerAufschubnehmer As String + + Private _kontoBewHZA As String + + Private _kontoNr As String + + Private _aufschubBIN As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Aufschubart() As String + Get + Return Me._aufschubart + End Get + Set + Me._aufschubart = Value + End Set + End Property + + + Public Property ArtAufschubantrag() As String + Get + Return Me._artAufschubantrag + End Get + Set + Me._artAufschubantrag = Value + End Set + End Property + + + Public Property AufschubnehmerEORI() As String + Get + Return Me._aufschubnehmerEORI + End Get + Set + Me._aufschubnehmerEORI = Value + End Set + End Property + + + Public Property KennbuchstabenAufschub() As String + Get + Return Me._kennbuchstabenAufschub + End Get + Set + Me._kennbuchstabenAufschub = Value + End Set + End Property + + + Public Property ZollnummerAufschubnehmer() As String + Get + Return Me._zollnummerAufschubnehmer + End Get + Set + Me._zollnummerAufschubnehmer = Value + End Set + End Property + + + Public Property KontoBewHZA() As String + Get + Return Me._kontoBewHZA + End Get + Set + Me._kontoBewHZA = Value + End Set + End Property + + + Public Property KontoNr() As String + Get + Return Me._kontoNr + End Get + Set + Me._kontoNr = Value + End Set + End Property + + + Public Property AufschubBIN() As String + Get + Return Me._aufschubBIN + End Get + Set + Me._aufschubBIN = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AufschubAVUVTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize AufschubAVUVTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes AufschubAVUVTyp object + ''' + ''' string to deserialize + ''' Output AufschubAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AufschubAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AufschubAVUVTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AufschubAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As AufschubAVUVTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AufschubAVUVTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As AufschubAVUVTyp + Return CType(SerializerXml.Deserialize(s), AufschubAVUVTyp) + End Function +#End Region + + ''' + ''' Serializes current AufschubAVUVTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an AufschubAVUVTyp object + ''' + ''' File to load and deserialize + ''' Output AufschubAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AufschubAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, AufschubAVUVTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AufschubAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AufschubAVUVTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class UnterlageVzKopfAVUVTyp + +#Region "Private fields" + Private _bereich As String + + Private _art As String + + Private _nummer As String + + Private _datumAusstellung As Date + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Bereich() As String + Get + Return Me._bereich + End Get + Set + Me._bereich = Value + End Set + End Property + + + Public Property Art() As String + Get + Return Me._art + End Get + Set + Me._art = Value + End Set + End Property + + + Public Property Nummer() As String + Get + Return Me._nummer + End Get + Set + Me._nummer = Value + End Set + End Property + + + Public Property DatumAusstellung() As Date + Get + Return Me._datumAusstellung + End Get + Set + Me._datumAusstellung = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(UnterlageVzKopfAVUVTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize UnterlageVzKopfAVUVTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes UnterlageVzKopfAVUVTyp object + ''' + ''' string to deserialize + ''' Output UnterlageVzKopfAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As UnterlageVzKopfAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, UnterlageVzKopfAVUVTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As UnterlageVzKopfAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As UnterlageVzKopfAVUVTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), UnterlageVzKopfAVUVTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As UnterlageVzKopfAVUVTyp + Return CType(SerializerXml.Deserialize(s), UnterlageVzKopfAVUVTyp) + End Function +#End Region + + ''' + ''' Serializes current UnterlageVzKopfAVUVTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an UnterlageVzKopfAVUVTyp object + ''' + ''' File to load and deserialize + ''' Output UnterlageVzKopfAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As UnterlageVzKopfAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, UnterlageVzKopfAVUVTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As UnterlageVzKopfAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As UnterlageVzKopfAVUVTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DV1KostenverteilungAVUVTyp + +#Region "Private fields" + Private _kostenart As String + + Private _kosten As String + + Private _kostenWaehrung As String + + Private _wechselkursArt As String + + Private _wechselkurs As String + + Private _wechselkursDatum As Date + + Private _verteilungsart As String + + Private _minimalbetrag As String + + Private _rabattProzent As String + + Private _skontoProzent As String + + Private _bemerkungen As String + + Private _versicherungBerechnenKz As String + + Private _prozentualerAnteil As String + + Private _imaginaererProfit As String + + Private _andereZahlung As String + + Private _summeRechnungManuell As String + + Private _summeFrachtManuell As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property Kostenart() As String + Get + Return Me._kostenart + End Get + Set + Me._kostenart = Value + End Set + End Property + + + Public Property Kosten() As String + Get + Return Me._kosten + End Get + Set + Me._kosten = Value + End Set + End Property + + + Public Property KostenWaehrung() As String + Get + Return Me._kostenWaehrung + End Get + Set + Me._kostenWaehrung = Value + End Set + End Property + + + Public Property WechselkursArt() As String + Get + Return Me._wechselkursArt + End Get + Set + Me._wechselkursArt = Value + End Set + End Property + + + Public Property Wechselkurs() As String + Get + Return Me._wechselkurs + End Get + Set + Me._wechselkurs = Value + End Set + End Property + + + Public Property WechselkursDatum() As Date + Get + Return Me._wechselkursDatum + End Get + Set + Me._wechselkursDatum = Value + End Set + End Property + + + Public Property Verteilungsart() As String + Get + Return Me._verteilungsart + End Get + Set + Me._verteilungsart = Value + End Set + End Property + + + Public Property Minimalbetrag() As String + Get + Return Me._minimalbetrag + End Get + Set + Me._minimalbetrag = Value + End Set + End Property + + + Public Property RabattProzent() As String + Get + Return Me._rabattProzent + End Get + Set + Me._rabattProzent = Value + End Set + End Property + + + Public Property SkontoProzent() As String + Get + Return Me._skontoProzent + End Get + Set + Me._skontoProzent = Value + End Set + End Property + + + Public Property Bemerkungen() As String + Get + Return Me._bemerkungen + End Get + Set + Me._bemerkungen = Value + End Set + End Property + + + Public Property VersicherungBerechnenKz() As String + Get + Return Me._versicherungBerechnenKz + End Get + Set + Me._versicherungBerechnenKz = Value + End Set + End Property + + + Public Property ProzentualerAnteil() As String + Get + Return Me._prozentualerAnteil + End Get + Set + Me._prozentualerAnteil = Value + End Set + End Property + + + Public Property ImaginaererProfit() As String + Get + Return Me._imaginaererProfit + End Get + Set + Me._imaginaererProfit = Value + End Set + End Property + + + Public Property AndereZahlung() As String + Get + Return Me._andereZahlung + End Get + Set + Me._andereZahlung = Value + End Set + End Property + + + Public Property SummeRechnungManuell() As String + Get + Return Me._summeRechnungManuell + End Get + Set + Me._summeRechnungManuell = Value + End Set + End Property + + + Public Property SummeFrachtManuell() As String + Get + Return Me._summeFrachtManuell + End Get + Set + Me._summeFrachtManuell = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DV1KostenverteilungAVUVTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DV1KostenverteilungAVUVTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DV1KostenverteilungAVUVTyp object + ''' + ''' string to deserialize + ''' Output DV1KostenverteilungAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DV1KostenverteilungAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DV1KostenverteilungAVUVTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DV1KostenverteilungAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DV1KostenverteilungAVUVTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DV1KostenverteilungAVUVTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DV1KostenverteilungAVUVTyp + Return CType(SerializerXml.Deserialize(s), DV1KostenverteilungAVUVTyp) + End Function +#End Region + + ''' + ''' Serializes current DV1KostenverteilungAVUVTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DV1KostenverteilungAVUVTyp object + ''' + ''' File to load and deserialize + ''' Output DV1KostenverteilungAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DV1KostenverteilungAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DV1KostenverteilungAVUVTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DV1KostenverteilungAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DV1KostenverteilungAVUVTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DV1AngabenAVUVTyp + +#Region "Private fields" + Private _dV1Kz As String + + Private _vertretungsverhaeltnis As String + + Private _fruehereEntscheidungen As String + + Private _verbundenheit As String + + Private _verbundenheitEinzelheiten As String + + Private _einschraenkungenKz As String + + Private _bedingungenLeistungenKz As String + + Private _bedingungenLeistungenArt As String + + Private _lizenzgebuehrenKz As String + + Private _lizenzgebuehrenUmstand As String + + Private _spezielleVereinbarungKz As String + + Private _spezielleVereinbarungUmstand As String + + Private _iATAAbflughafen As String + + Private Shared _serializerXml As XmlSerializer +#End Region + + + Public Property DV1Kz() As String + Get + Return Me._dV1Kz + End Get + Set + Me._dV1Kz = Value + End Set + End Property + + + Public Property Vertretungsverhaeltnis() As String + Get + Return Me._vertretungsverhaeltnis + End Get + Set + Me._vertretungsverhaeltnis = Value + End Set + End Property + + + Public Property FruehereEntscheidungen() As String + Get + Return Me._fruehereEntscheidungen + End Get + Set + Me._fruehereEntscheidungen = Value + End Set + End Property + + + Public Property Verbundenheit() As String + Get + Return Me._verbundenheit + End Get + Set + Me._verbundenheit = Value + End Set + End Property + + + Public Property VerbundenheitEinzelheiten() As String + Get + Return Me._verbundenheitEinzelheiten + End Get + Set + Me._verbundenheitEinzelheiten = Value + End Set + End Property + + + Public Property EinschraenkungenKz() As String + Get + Return Me._einschraenkungenKz + End Get + Set + Me._einschraenkungenKz = Value + End Set + End Property + + + Public Property BedingungenLeistungenKz() As String + Get + Return Me._bedingungenLeistungenKz + End Get + Set + Me._bedingungenLeistungenKz = Value + End Set + End Property + + + Public Property BedingungenLeistungenArt() As String + Get + Return Me._bedingungenLeistungenArt + End Get + Set + Me._bedingungenLeistungenArt = Value + End Set + End Property + + + Public Property LizenzgebuehrenKz() As String + Get + Return Me._lizenzgebuehrenKz + End Get + Set + Me._lizenzgebuehrenKz = Value + End Set + End Property + + + Public Property LizenzgebuehrenUmstand() As String + Get + Return Me._lizenzgebuehrenUmstand + End Get + Set + Me._lizenzgebuehrenUmstand = Value + End Set + End Property + + + Public Property SpezielleVereinbarungKz() As String + Get + Return Me._spezielleVereinbarungKz + End Get + Set + Me._spezielleVereinbarungKz = Value + End Set + End Property + + + Public Property SpezielleVereinbarungUmstand() As String + Get + Return Me._spezielleVereinbarungUmstand + End Get + Set + Me._spezielleVereinbarungUmstand = Value + End Set + End Property + + + Public Property IATAAbflughafen() As String + Get + Return Me._iATAAbflughafen + End Get + Set + Me._iATAAbflughafen = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DV1AngabenAVUVTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DV1AngabenAVUVTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DV1AngabenAVUVTyp object + ''' + ''' string to deserialize + ''' Output DV1AngabenAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DV1AngabenAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DV1AngabenAVUVTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DV1AngabenAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DV1AngabenAVUVTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DV1AngabenAVUVTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DV1AngabenAVUVTyp + Return CType(SerializerXml.Deserialize(s), DV1AngabenAVUVTyp) + End Function +#End Region + + ''' + ''' Serializes current DV1AngabenAVUVTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DV1AngabenAVUVTyp object + ''' + ''' File to load and deserialize + ''' Output DV1AngabenAVUVTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DV1AngabenAVUVTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DV1AngabenAVUVTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DV1AngabenAVUVTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DV1AngabenAVUVTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class KopfDatenEinfuhrUnvollstaendigeAnmeldungTyp + +#Region "Private fields" + Private _adressierteZollstelle As String + + Private _anmelderIstEmpfaenger As String + + Private _vertretungsverhaeltnisCode As String + + Private _vorsteuerabzug As String + + Private _nameAnmeldenderBearbeiter As String + + Private _telefonnummerAnmeldenderBearbeiter As String + + Private _stellungAnmeldenderBearbeiter As String + + Private _emailAdresseAnmeldenderBearbeiter As String + + Private _fiskalvertretungKz As String + + Private _zusammenfassendeMeldungKzStdKto As String + + Private _zusammenfassendeMeldungMelderkto As String + + Private _intrastatKzStdKto As String + + Private _intrastatMelderkto As String + + Private _ausstellungsort As String + + Private _zollrechtlicherStatus As String + + Private _gesamtRohMasse As String + + Private _verfahrenBeantragtCode As String + + Private _verkehrszweigInland As String + + Private _verkehrszweigGrenze As String + + Private _versendungslandCode As String + + Private _bestimmungsbundesland As String + + Private _bestimmungsland As String + + Private _kennzeichenNameBefoerderungsmittelAnkunft As String + + Private _befoerderungsmittelGrenzeStaatszugehoerigkeitCode As String + + Private _befoerderungsmittelGrenzeArt As String + + Private _befoerderungsmittelGrenze As String + + Private _lieferbedingungCode As String + + Private _lieferbedingungText As String + + Private _lieferbedingungSchluessel As String + + Private _lieferbedingungOrt As String + + Private _vorpapierArtCode As String + + Private _vorpapierNr As String + + Private _artGeschaeftCode As String + + Private _statistikStatus As String + + Private _warenort As String + + Private _rechnungspreis As String + + Private _rechnungswaehrung As String + + Private _dV1Angaben As DV1AngabenAVUVTyp + + Private _dV1Kostenverteilung As List(Of DV1KostenverteilungAVUVTyp) + + Private _unterlage As List(Of UnterlageVzKopfAVUVTyp) + + Private _zusatzAngabenAnmeldung As String + + Private _kzAutoBestaetigung As String + + Private _anschreibungDatum As Date + + Private _vereinfachterBewilligungsantragKzAV As String + + Private _eingangszollstelle As String + + Private _zahlungsart As String + + Private _aufschub As List(Of AufschubAVUVTyp) + + Private _sumABeendigungsAnteil As List(Of SumABeendigungsAnteilAVUVTyp) + + Private _containerNr As List(Of String) + + Private _beendigungsAnteilArtCode As String + + Private _bewilligungsIDZLAVUV As String + + Private _bezugsnummerBEAnteilZL As String + + Private _bEAnteilZLAVUV As List(Of BEAnteilZLAVUVPositionAVUVTyp) + + Private _kzVereinfBewillAntrgBEAnteilAV As String + + Private _deutschesUeHZAbeiAV As String + + Private _erledigungsfristAV As String + + Private _bemEinfuhrabgKz As String + + Private _zusatzAngabenAV As String + + Private _einzelheitenVeredelung As String + + Private _aVBuchhaltVeredelung As List(Of AVBuchhaltVeredelungTyp) + + Private _aVErledZollstelle As List(Of String) + + Private _zusaetzlicheSteuerlicheVerweise As List(Of ZusaetzlicheSteuerlicheVerweiseTyp) + + Private _adressen As List(Of AdressenVzImportAVUVTyp) + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._adressen = New List(Of AdressenVzImportAVUVTyp)() + Me._zusaetzlicheSteuerlicheVerweise = New List(Of ZusaetzlicheSteuerlicheVerweiseTyp)() + Me._aVErledZollstelle = New List(Of String)() + Me._aVBuchhaltVeredelung = New List(Of AVBuchhaltVeredelungTyp)() + Me._bEAnteilZLAVUV = New List(Of BEAnteilZLAVUVPositionAVUVTyp)() + Me._containerNr = New List(Of String)() + Me._sumABeendigungsAnteil = New List(Of SumABeendigungsAnteilAVUVTyp)() + Me._aufschub = New List(Of AufschubAVUVTyp)() + Me._unterlage = New List(Of UnterlageVzKopfAVUVTyp)() + Me._dV1Kostenverteilung = New List(Of DV1KostenverteilungAVUVTyp)() + Me._dV1Angaben = New DV1AngabenAVUVTyp() + End Sub + + + Public Property AdressierteZollstelle() As String + Get + Return Me._adressierteZollstelle + End Get + Set + Me._adressierteZollstelle = Value + End Set + End Property + + + Public Property AnmelderIstEmpfaenger() As String + Get + Return Me._anmelderIstEmpfaenger + End Get + Set + Me._anmelderIstEmpfaenger = Value + End Set + End Property + + + Public Property VertretungsverhaeltnisCode() As String + Get + Return Me._vertretungsverhaeltnisCode + End Get + Set + Me._vertretungsverhaeltnisCode = Value + End Set + End Property + + + Public Property Vorsteuerabzug() As String + Get + Return Me._vorsteuerabzug + End Get + Set + Me._vorsteuerabzug = Value + End Set + End Property + + + Public Property NameAnmeldenderBearbeiter() As String + Get + Return Me._nameAnmeldenderBearbeiter + End Get + Set + Me._nameAnmeldenderBearbeiter = Value + End Set + End Property + + + Public Property TelefonnummerAnmeldenderBearbeiter() As String + Get + Return Me._telefonnummerAnmeldenderBearbeiter + End Get + Set + Me._telefonnummerAnmeldenderBearbeiter = Value + End Set + End Property + + + Public Property StellungAnmeldenderBearbeiter() As String + Get + Return Me._stellungAnmeldenderBearbeiter + End Get + Set + Me._stellungAnmeldenderBearbeiter = Value + End Set + End Property + + + Public Property EmailAdresseAnmeldenderBearbeiter() As String + Get + Return Me._emailAdresseAnmeldenderBearbeiter + End Get + Set + Me._emailAdresseAnmeldenderBearbeiter = Value + End Set + End Property + + + Public Property FiskalvertretungKz() As String + Get + Return Me._fiskalvertretungKz + End Get + Set + Me._fiskalvertretungKz = Value + End Set + End Property + + + Public Property ZusammenfassendeMeldungKzStdKto() As String + Get + Return Me._zusammenfassendeMeldungKzStdKto + End Get + Set + Me._zusammenfassendeMeldungKzStdKto = Value + End Set + End Property + + + Public Property ZusammenfassendeMeldungMelderkto() As String + Get + Return Me._zusammenfassendeMeldungMelderkto + End Get + Set + Me._zusammenfassendeMeldungMelderkto = Value + End Set + End Property + + + Public Property IntrastatKzStdKto() As String + Get + Return Me._intrastatKzStdKto + End Get + Set + Me._intrastatKzStdKto = Value + End Set + End Property + + + Public Property IntrastatMelderkto() As String + Get + Return Me._intrastatMelderkto + End Get + Set + Me._intrastatMelderkto = Value + End Set + End Property + + + Public Property Ausstellungsort() As String + Get + Return Me._ausstellungsort + End Get + Set + Me._ausstellungsort = Value + End Set + End Property + + + Public Property ZollrechtlicherStatus() As String + Get + Return Me._zollrechtlicherStatus + End Get + Set + Me._zollrechtlicherStatus = Value + End Set + End Property + + + Public Property GesamtRohMasse() As String + Get + Return Me._gesamtRohMasse + End Get + Set + Me._gesamtRohMasse = Value + End Set + End Property + + + Public Property VerfahrenBeantragtCode() As String + Get + Return Me._verfahrenBeantragtCode + End Get + Set + Me._verfahrenBeantragtCode = Value + End Set + End Property + + + Public Property VerkehrszweigInland() As String + Get + Return Me._verkehrszweigInland + End Get + Set + Me._verkehrszweigInland = Value + End Set + End Property + + + Public Property VerkehrszweigGrenze() As String + Get + Return Me._verkehrszweigGrenze + End Get + Set + Me._verkehrszweigGrenze = Value + End Set + End Property + + + Public Property VersendungslandCode() As String + Get + Return Me._versendungslandCode + End Get + Set + Me._versendungslandCode = Value + End Set + End Property + + + Public Property Bestimmungsbundesland() As String + Get + Return Me._bestimmungsbundesland + End Get + Set + Me._bestimmungsbundesland = 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 KennzeichenNameBefoerderungsmittelAnkunft() As String + Get + Return Me._kennzeichenNameBefoerderungsmittelAnkunft + End Get + Set + Me._kennzeichenNameBefoerderungsmittelAnkunft = Value + End Set + End Property + + + Public Property BefoerderungsmittelGrenzeStaatszugehoerigkeitCode() As String + Get + Return Me._befoerderungsmittelGrenzeStaatszugehoerigkeitCode + End Get + Set + Me._befoerderungsmittelGrenzeStaatszugehoerigkeitCode = Value + End Set + End Property + + + Public Property BefoerderungsmittelGrenzeArt() As String + Get + Return Me._befoerderungsmittelGrenzeArt + End Get + Set + Me._befoerderungsmittelGrenzeArt = Value + End Set + End Property + + + Public Property BefoerderungsmittelGrenze() As String + Get + Return Me._befoerderungsmittelGrenze + End Get + Set + Me._befoerderungsmittelGrenze = Value + End Set + End Property + + + Public Property LieferbedingungCode() As String + Get + Return Me._lieferbedingungCode + End Get + Set + Me._lieferbedingungCode = Value + End Set + End Property + + + Public Property LieferbedingungText() As String + Get + Return Me._lieferbedingungText + End Get + Set + Me._lieferbedingungText = Value + End Set + End Property + + + Public Property LieferbedingungSchluessel() As String + Get + Return Me._lieferbedingungSchluessel + End Get + Set + Me._lieferbedingungSchluessel = Value + End Set + End Property + + + Public Property LieferbedingungOrt() As String + Get + Return Me._lieferbedingungOrt + End Get + Set + Me._lieferbedingungOrt = Value + End Set + End Property + + + Public Property VorpapierArtCode() As String + Get + Return Me._vorpapierArtCode + End Get + Set + Me._vorpapierArtCode = Value + End Set + End Property + + + Public Property VorpapierNr() As String + Get + Return Me._vorpapierNr + End Get + Set + Me._vorpapierNr = Value + End Set + End Property + + + Public Property ArtGeschaeftCode() As String + Get + Return Me._artGeschaeftCode + End Get + Set + Me._artGeschaeftCode = Value + End Set + End Property + + + Public Property StatistikStatus() As String + Get + Return Me._statistikStatus + End Get + Set + Me._statistikStatus = Value + End Set + End Property + + + Public Property Warenort() As String + Get + Return Me._warenort + End Get + Set + Me._warenort = Value + End Set + End Property + + + Public Property Rechnungspreis() As String + Get + Return Me._rechnungspreis + End Get + Set + Me._rechnungspreis = Value + End Set + End Property + + + Public Property Rechnungswaehrung() As String + Get + Return Me._rechnungswaehrung + End Get + Set + Me._rechnungswaehrung = Value + End Set + End Property + + + Public Property DV1Angaben() As DV1AngabenAVUVTyp + Get + Return Me._dV1Angaben + End Get + Set + Me._dV1Angaben = Value + End Set + End Property + + + Public Property DV1Kostenverteilung() As List(Of DV1KostenverteilungAVUVTyp) + Get + Return Me._dV1Kostenverteilung + End Get + Set + Me._dV1Kostenverteilung = Value + End Set + End Property + + + Public Property Unterlage() As List(Of UnterlageVzKopfAVUVTyp) + Get + Return Me._unterlage + End Get + Set + Me._unterlage = Value + End Set + End Property + + + Public Property ZusatzAngabenAnmeldung() As String + Get + Return Me._zusatzAngabenAnmeldung + End Get + Set + Me._zusatzAngabenAnmeldung = Value + End Set + End Property + + + Public Property KzAutoBestaetigung() As String + Get + Return Me._kzAutoBestaetigung + End Get + Set + Me._kzAutoBestaetigung = Value + End Set + End Property + + + Public Property AnschreibungDatum() As Date + Get + Return Me._anschreibungDatum + End Get + Set + Me._anschreibungDatum = Value + End Set + End Property + + + Public Property VereinfachterBewilligungsantragKzAV() As String + Get + Return Me._vereinfachterBewilligungsantragKzAV + End Get + Set + Me._vereinfachterBewilligungsantragKzAV = Value + End Set + End Property + + + Public Property Eingangszollstelle() As String + Get + Return Me._eingangszollstelle + End Get + Set + Me._eingangszollstelle = Value + End Set + End Property + + + Public Property Zahlungsart() As String + Get + Return Me._zahlungsart + End Get + Set + Me._zahlungsart = Value + End Set + End Property + + + Public Property Aufschub() As List(Of AufschubAVUVTyp) + Get + Return Me._aufschub + End Get + Set + Me._aufschub = Value + End Set + End Property + + + Public Property SumABeendigungsAnteil() As List(Of SumABeendigungsAnteilAVUVTyp) + Get + Return Me._sumABeendigungsAnteil + End Get + Set + Me._sumABeendigungsAnteil = Value + End Set + End Property + + + Public Property ContainerNr() As List(Of String) + Get + Return Me._containerNr + End Get + Set + Me._containerNr = Value + End Set + End Property + + + Public Property BeendigungsAnteilArtCode() As String + Get + Return Me._beendigungsAnteilArtCode + End Get + Set + Me._beendigungsAnteilArtCode = Value + End Set + End Property + + + Public Property BewilligungsIDZLAVUV() As String + Get + Return Me._bewilligungsIDZLAVUV + End Get + Set + Me._bewilligungsIDZLAVUV = Value + End Set + End Property + + + Public Property BezugsnummerBEAnteilZL() As String + Get + Return Me._bezugsnummerBEAnteilZL + End Get + Set + Me._bezugsnummerBEAnteilZL = Value + End Set + End Property + + + Public Property BEAnteilZLAVUV() As List(Of BEAnteilZLAVUVPositionAVUVTyp) + Get + Return Me._bEAnteilZLAVUV + End Get + Set + Me._bEAnteilZLAVUV = Value + End Set + End Property + + + Public Property KzVereinfBewillAntrgBEAnteilAV() As String + Get + Return Me._kzVereinfBewillAntrgBEAnteilAV + End Get + Set + Me._kzVereinfBewillAntrgBEAnteilAV = 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 ErledigungsfristAV() As String + Get + Return Me._erledigungsfristAV + End Get + Set + Me._erledigungsfristAV = Value + End Set + End Property + + + Public Property BemEinfuhrabgKz() As String + Get + Return Me._bemEinfuhrabgKz + End Get + Set + Me._bemEinfuhrabgKz = Value + End Set + End Property + + + Public Property ZusatzAngabenAV() As String + Get + Return Me._zusatzAngabenAV + End Get + Set + Me._zusatzAngabenAV = Value + End Set + End Property + + + Public Property EinzelheitenVeredelung() As String + Get + Return Me._einzelheitenVeredelung + End Get + Set + Me._einzelheitenVeredelung = Value + End Set + End Property + + + Public Property AVBuchhaltVeredelung() As List(Of AVBuchhaltVeredelungTyp) + Get + Return Me._aVBuchhaltVeredelung + End Get + Set + Me._aVBuchhaltVeredelung = Value + End Set + End Property + + + Public Property AVErledZollstelle() As List(Of String) + Get + Return Me._aVErledZollstelle + End Get + Set + Me._aVErledZollstelle = Value + End Set + End Property + + + Public Property ZusaetzlicheSteuerlicheVerweise() As List(Of ZusaetzlicheSteuerlicheVerweiseTyp) + Get + Return Me._zusaetzlicheSteuerlicheVerweise + End Get + Set + Me._zusaetzlicheSteuerlicheVerweise = Value + End Set + End Property + + + Public Property Adressen() As List(Of AdressenVzImportAVUVTyp) + Get + Return Me._adressen + End Get + Set + Me._adressen = Value + End Set + End Property + + Private Shared ReadOnly Property SerializerXml() As XmlSerializer + Get + If (_serializerXml Is Nothing) Then + _serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(KopfDatenEinfuhrUnvollstaendigeAnmeldungTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize KopfDatenEinfuhrUnvollstaendigeAnmeldungTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes KopfDatenEinfuhrUnvollstaendigeAnmeldungTyp object + ''' + ''' string to deserialize + ''' Output KopfDatenEinfuhrUnvollstaendigeAnmeldungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As KopfDatenEinfuhrUnvollstaendigeAnmeldungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, KopfDatenEinfuhrUnvollstaendigeAnmeldungTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As KopfDatenEinfuhrUnvollstaendigeAnmeldungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As KopfDatenEinfuhrUnvollstaendigeAnmeldungTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), KopfDatenEinfuhrUnvollstaendigeAnmeldungTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As KopfDatenEinfuhrUnvollstaendigeAnmeldungTyp + Return CType(SerializerXml.Deserialize(s), KopfDatenEinfuhrUnvollstaendigeAnmeldungTyp) + End Function +#End Region + + ''' + ''' Serializes current KopfDatenEinfuhrUnvollstaendigeAnmeldungTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an KopfDatenEinfuhrUnvollstaendigeAnmeldungTyp object + ''' + ''' File to load and deserialize + ''' Output KopfDatenEinfuhrUnvollstaendigeAnmeldungTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As KopfDatenEinfuhrUnvollstaendigeAnmeldungTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, KopfDatenEinfuhrUnvollstaendigeAnmeldungTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As KopfDatenEinfuhrUnvollstaendigeAnmeldungTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As KopfDatenEinfuhrUnvollstaendigeAnmeldungTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class TransaktionFreierVerkehrTyp + +#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(TransaktionFreierVerkehrTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize TransaktionFreierVerkehrTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes TransaktionFreierVerkehrTyp object + ''' + ''' string to deserialize + ''' Output TransaktionFreierVerkehrTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransaktionFreierVerkehrTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransaktionFreierVerkehrTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransaktionFreierVerkehrTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As TransaktionFreierVerkehrTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransaktionFreierVerkehrTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransaktionFreierVerkehrTyp + Return CType(SerializerXml.Deserialize(s), TransaktionFreierVerkehrTyp) + End Function +#End Region + + ''' + ''' Serializes current TransaktionFreierVerkehrTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an TransaktionFreierVerkehrTyp object + ''' + ''' File to load and deserialize + ''' Output TransaktionFreierVerkehrTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransaktionFreierVerkehrTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, TransaktionFreierVerkehrTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransaktionFreierVerkehrTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransaktionFreierVerkehrTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (file) Is Nothing) Then + file.Dispose() + End If + If (Not (sr) Is Nothing) Then + sr.Dispose() + End If + End Try + End Function + End Class + + + Partial Public Class DatenaustauschFreierVerkehrTyp + +#Region "Private fields" + Private _transaktion As TransaktionFreierVerkehrTyp + + Private Shared _serializerXml As XmlSerializer +#End Region + + Public Sub New() + MyBase.New + Me._transaktion = New TransaktionFreierVerkehrTyp() + End Sub + + + Public Property Transaktion() As TransaktionFreierVerkehrTyp + 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(DatenaustauschFreierVerkehrTyp)) + End If + Return _serializerXml + End Get + End Property + +#Region "Serialize/Deserialize" + ''' + ''' Serialize DatenaustauschFreierVerkehrTyp object + ''' + ''' XML value + Public Overridable Function Serialize() As String + Dim streamReader As StreamReader = Nothing + Dim memoryStream As MemoryStream = Nothing + Try + memoryStream = New MemoryStream() + Dim xmlWriterSettings As System.Xml.XmlWriterSettings = New System.Xml.XmlWriterSettings() + xmlWriterSettings.Indent = True + xmlWriterSettings.IndentChars = " " + Dim xmlWriter As System.Xml.XmlWriter = XmlWriter.Create(memoryStream, xmlWriterSettings) + SerializerXml.Serialize(xmlWriter, Me) + memoryStream.Seek(0, SeekOrigin.Begin) + streamReader = New StreamReader(memoryStream) + Return streamReader.ReadToEnd + Finally + If (Not (streamReader) Is Nothing) Then + streamReader.Dispose() + End If + If (Not (memoryStream) Is Nothing) Then + memoryStream.Dispose() + End If + End Try + End Function + + ''' + ''' Deserializes DatenaustauschFreierVerkehrTyp object + ''' + ''' string to deserialize + ''' Output DatenaustauschFreierVerkehrTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DatenaustauschFreierVerkehrTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DatenaustauschFreierVerkehrTyp) + Try + obj = Deserialize(input) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DatenaustauschFreierVerkehrTyp) As Boolean + Dim exception As System.Exception = Nothing + Return Deserialize(input, obj, exception) + End Function + + Public Overloads Shared Function Deserialize(ByVal input As String) As DatenaustauschFreierVerkehrTyp + Dim stringReader As StringReader = Nothing + Try + stringReader = New StringReader(input) + Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DatenaustauschFreierVerkehrTyp) + Finally + If (Not (stringReader) Is Nothing) Then + stringReader.Dispose() + End If + End Try + End Function + + Public Overloads Shared Function Deserialize(ByVal s As Stream) As DatenaustauschFreierVerkehrTyp + Return CType(SerializerXml.Deserialize(s), DatenaustauschFreierVerkehrTyp) + End Function +#End Region + + ''' + ''' Serializes current DatenaustauschFreierVerkehrTyp object into file + ''' + ''' full path of outupt xml file + ''' output Exception value if failed + ''' true if can serialize and save into file; otherwise, false + Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean + exception = Nothing + Try + SaveToFile(fileName) + Return True + Catch e As System.Exception + exception = e + Return False + End Try + End Function + + Public Overridable Overloads Sub SaveToFile(ByVal fileName As String) + Dim streamWriter As StreamWriter = Nothing + Try + Dim dataString As String = Serialize() + Dim outputFile As FileInfo = New FileInfo(fileName) + streamWriter = outputFile.CreateText + streamWriter.WriteLine(dataString) + streamWriter.Close() + Finally + If (Not (streamWriter) Is Nothing) Then + streamWriter.Dispose() + End If + End Try + End Sub + + ''' + ''' Deserializes xml markup from file into an DatenaustauschFreierVerkehrTyp object + ''' + ''' File to load and deserialize + ''' Output DatenaustauschFreierVerkehrTyp object + ''' output Exception value if deserialize failed + ''' true if this Serializer can deserialize the object; otherwise, false + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DatenaustauschFreierVerkehrTyp, ByRef exception As System.Exception) As Boolean + exception = Nothing + obj = CType(Nothing, DatenaustauschFreierVerkehrTyp) + Try + obj = LoadFromFile(fileName) + Return True + Catch ex As System.Exception + exception = ex + Return False + End Try + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DatenaustauschFreierVerkehrTyp) As Boolean + Dim exception As System.Exception = Nothing + Return LoadFromFile(fileName, obj, exception) + End Function + + Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DatenaustauschFreierVerkehrTyp + Dim file As FileStream = Nothing + Dim sr As StreamReader = Nothing + Try + file = New FileStream(fileName, FileMode.Open, FileAccess.Read) + sr = New StreamReader(file) + Dim dataString As String = sr.ReadToEnd + sr.Close() + file.Close() + Return Deserialize(dataString) + Finally + If (Not (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/EZA/FreierVerkehr/FreierVerkehrAktVeredelUmwandlung_004.xsd b/DAKOSY_Worker/DAKOSY/ATLAS/EZA/FreierVerkehr/FreierVerkehrAktVeredelUmwandlung_004.xsd index 36f32c4..ea7f9ac 100644 --- a/DAKOSY_Worker/DAKOSY/ATLAS/EZA/FreierVerkehr/FreierVerkehrAktVeredelUmwandlung_004.xsd +++ b/DAKOSY_Worker/DAKOSY/ATLAS/EZA/FreierVerkehr/FreierVerkehrAktVeredelUmwandlung_004.xsd @@ -279,6 +279,28 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -349,6 +371,7 @@ + @@ -371,6 +394,7 @@ + @@ -440,6 +464,12 @@ + + + + + + @@ -471,7 +501,7 @@ - + @@ -482,6 +512,7 @@ + @@ -549,6 +580,12 @@ + + + + + + @@ -570,7 +607,7 @@ - + @@ -616,4 +653,16 @@ + + + + + + + + + + + + diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/EZA/FreierVerkehr/FreierVerkehrAktVeredelUmwandlung_004_V2022.designer.vb b/DAKOSY_Worker/DAKOSY/ATLAS/EZA/FreierVerkehr/FreierVerkehrAktVeredelUmwandlung_004_V2022.designer.vb index e880d86..4b413a0 100644 --- a/DAKOSY_Worker/DAKOSY/ATLAS/EZA/FreierVerkehr/FreierVerkehrAktVeredelUmwandlung_004_V2022.designer.vb +++ b/DAKOSY_Worker/DAKOSY/ATLAS/EZA/FreierVerkehr/FreierVerkehrAktVeredelUmwandlung_004_V2022.designer.vb @@ -17,7 +17,7 @@ Imports System.IO Imports System.Text Imports System.Collections.Generic -Namespace FreierVerkehrAktVeredelUmwandlung_004 +Namespace _OLD2022_FreierVerkehrAktVeredelUmwandlung_004 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/cDakosyNCTSOut004.vb b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/cDakosyNCTSOut004.vb index 5168c8d..fc025d2 100644 --- a/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/cDakosyNCTSOut004.vb +++ b/DAKOSY_Worker/DAKOSY/ATLAS/NCTS/cDakosyNCTSOut004.vb @@ -1057,7 +1057,7 @@ Public Class cDakosyNCTSOut004 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) + Using cmd As New SqlCommand("SELECT * FROM tblDakosy_NCTSOut004_HouseConsignment WHERE nctsHC_NctsId=@ncts_Id ", conn) cmd.Parameters.AddWithValue("@ncts_Id", Me.ncts_Id) Dim dr = cmd.ExecuteReader() While dr.Read @@ -1155,7 +1155,7 @@ Public Class cDakosyNCTSOut004 ' 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 + ' p.nctsHC_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) @@ -1948,7 +1948,7 @@ Public Class cDakosy_NCTSOut004_HouseConsignment Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL Sub New() - ' Me.nctsWP_NctsId = nctsWP_NctsId + ' Me.nctsHC_NctsId = nctsHC_NctsId End Sub 'Sub New(nctsSA_Id) @@ -2402,7 +2402,7 @@ Public Class cDakosy_NCTSOut004_HouseConsignment_ConsignmentItem Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL Sub New() - ' Me.nctsWP_NctsId = nctsWP_NctsId + ' Me.nctsHC_NctsId = nctsHC_NctsId End Sub 'Sub New(nctsSA_Id) diff --git a/DAKOSY_Worker/DAKOSY_Worker_lib.vbproj b/DAKOSY_Worker/DAKOSY_Worker_lib.vbproj index 15a8ec0..e79045d 100644 --- a/DAKOSY_Worker/DAKOSY_Worker_lib.vbproj +++ b/DAKOSY_Worker/DAKOSY_Worker_lib.vbproj @@ -77,12 +77,16 @@ + + + + @@ -91,6 +95,7 @@ + @@ -105,6 +110,7 @@ + @@ -182,9 +188,18 @@ + + Designer + Designer + + Designer + + + Designer + Designer @@ -203,6 +218,9 @@ Designer + + Designer + Designer @@ -227,6 +245,9 @@ Designer + + Designer + Designer @@ -270,6 +291,9 @@ Designer + + Designer + Designer diff --git a/DAKOSY_Worker/cZollsysteme_Aktenbeschriftung.vb b/DAKOSY_Worker/cZollsysteme_Aktenbeschriftung.vb index 96f2eba..95aab5f 100644 --- a/DAKOSY_Worker/cZollsysteme_Aktenbeschriftung.vb +++ b/DAKOSY_Worker/cZollsysteme_Aktenbeschriftung.vb @@ -59,7 +59,10 @@ Public Class cZollsysteme_Aktenbeschriftung Select Case Abfertigungsart Case 38, 26 'AT ' getADFrom_EZOLL - getATAMRNBezugsnummer = load_NCTS_MRN_FromDAKOSY(BezugsNr, True) 'Ü-T1 + getATAMRNBezugsnummer = load_NCTS004_MRN_FromDAKOSY(BezugsNr, True) 'Neues NCTS Format! + If getATAMRNBezugsnummer = "" Then 'Falls doch nicht + getATAMRNBezugsnummer = load_NCTS_MRN_FromDAKOSY(BezugsNr, True) 'Ü-T1 + End If isUeT1 = (getATAMRNBezugsnummer <> "") Sachbearbeiter = "" ' Bei Ü-T1 soll der SB leer sein, sonst wird dieser evtl. beim Austragen herangezogen... Case 1, 2, 3, 28, 39 @@ -67,7 +70,10 @@ Public Class cZollsysteme_Aktenbeschriftung '... and Systeme Case Else - getATAMRNBezugsnummer = load_NCTS_MRN_FromDAKOSY(BezugsNr, True) + getATAMRNBezugsnummer = load_NCTS004_MRN_FromDAKOSY(BezugsNr, True) 'Neues NCTS Format! + If getATAMRNBezugsnummer = "" Then 'Falls doch nicht + getATAMRNBezugsnummer = load_NCTS_MRN_FromDAKOSY(BezugsNr, True) 'Ü-T1 + End If If getATAMRNBezugsnummer = "" Then 'Falls doch nicht getATAMRNBezugsnummer = load_EZA_ATA_FromDAKOSY(BezugsNr, True) End If @@ -156,6 +162,14 @@ Public Class cZollsysteme_Aktenbeschriftung Return If(NCTS.ncts_MRN, If(NCTS.ncts_ANR, "")) End Function + Function load_NCTS004_MRN_FromDAKOSY(BezugsNr, Optional checkValidStatus = False) As String + Dim NCTS = DAKOSY_Worker.cDakosyNCTSOut004.LOADByBezugsNr(BezugsNr, True, checkValidStatus) + If NCTS Is Nothing Then Return "" + load_NCTS004_MRN_FromDAKOSY = If(NCTS.ncts_MRN, If(NCTS.ncts_ANR, "")) + If load_NCTS004_MRN_FromDAKOSY = "" Then load_NCTS004_MRN_FromDAKOSY = NCTS.ncts_ObjectName + + End Function + Function load_EZA_FromDAKOSY(BezugsNr As String, Optional checkValidStatus As Boolean = False) As Boolean @@ -404,6 +418,7 @@ Public Class cZollsysteme_Aktenbeschriftung Function load_NCTS004_FromDAKOSY(NCTS As DAKOSY_Worker.cDakosyNCTSOut004, PosNrAngeben As Boolean) As Boolean Try + ' VERAG_PROG_ALLGEMEIN.cErrorHandler.sendERRORperMail("004", "004", "", "al@verag.ag", "", "") If NCTS Is Nothing Then Return Nothing NCTS.LOAD_HouseConsignment() @@ -471,6 +486,7 @@ Public Class cZollsysteme_Aktenbeschriftung ATCMRN = If(If(NCTS.ncts_MRN, "") = "", If(NCTS.ncts_ANR, ""), If(NCTS.ncts_MRN, "")) + If ATCMRN = "" Then ATCMRN = If(NCTS.ncts_ObjectName, "") VerBestLandZst = If(NCTS.ncts_CountryOfDispatch, "") & " --> " If VerBestLandZst.Trim.StartsWith("-->") Then VerBestLandZst = VerBestLandZst.Replace("-->", "") diff --git a/VERAGMonitoring/cSqlDb.vb b/VERAGMonitoring/cSqlDb.vb index 652a295..d8f31da 100644 --- a/VERAGMonitoring/cSqlDb.vb +++ b/VERAGMonitoring/cSqlDb.vb @@ -314,6 +314,33 @@ Public Class cBrgDb End Function + Public Function loadDgvBySqlFromBrgKtoDAKOSY004(ByVal datumVon As DateTime, ByVal datumBis As DateTime, ByVal statusVon As String, ByVal statusBis As String, ByVal buergschaft As String, Optional where As String = "") As DataTable + Dim sql As String = "SELECT ncts_MRN, ([nctsGRT_AmountToBeCovered]), ncts_dyaAnmID, ncts_Declarationtype ncts_ArtAnmeldung,ncts_Declarationtype,nctsGRT_GRN nctsSA_GRN,nctsGRT_GRN" + sql &= " from tblDakosy_NCTSOut004_Guarantee inner join [tblDakosy_NCTSOut004] on ncts_Id = nctsGRT_NctsId" + sql &= " where ncts_Status between '" & statusVon & "' and '" & statusBis & "' AND [nctsGRT_GRN]='" & buergschaft & "' " & where + 'MsgBox(sql) + While True 'Endlosschleife; wird verlassen durch Return oder Application.Exit() + Try + Dim myTable = New DataTable() + Using conn As SqlConnection = VERAG_PROG_ALLGEMEIN.SQL.GetNewOpenConnectionFMZOLL() + Using cmd As New SqlCommand(sql, conn) + Dim dr As SqlDataReader = cmd.ExecuteReader() + myTable.Load(dr) + dr.Close() + End Using + conn.Close() + End Using + Return myTable 'While Schleife wird hier verlassen + Catch ex As Exception + Dim antwort As MsgBoxResult = MsgBox(ex.Message, CType(MsgBoxStyle.RetryCancel + MsgBoxStyle.Exclamation, MsgBoxStyle), + "Problem in Function 'loadDgvBySqlZOLARIS'") + End Try + End While + + Return Nothing + End Function + + Public Function loadDgvBySqlFromBrgKtoDAKOSYDetails(ByVal datumVon As DateTime, ByVal datumBis As DateTime, ByVal statusVon As String, ByVal statusBis As String, ByVal buergschaft As String, Optional where As String = "") As DataTable Dim sql As String = "SELECT ncts_MRN,ncts_Status,(nctsSA_AbgabenBetrag), ncts_dyaAnmID, ncts_ArtAnmeldung,nctsSA_GRN,ncts_Empfaenger_eori,ncts_Empfaenger_NLNR,ncts_Empfaenger_Name,ncts_Bearbeiter" @@ -342,6 +369,33 @@ Public Class cBrgDb Return Nothing End Function + Public Function loadDgvBySqlFromBrgKtoDAKOSYDetails004(ByVal datumVon As DateTime, ByVal datumBis As DateTime, ByVal statusVon As String, ByVal statusBis As String, ByVal buergschaft As String, Optional where As String = "") As DataTable + Dim sql As String = "SELECT ncts_MRN,ncts_Status,[nctsGRT_AmountToBeCovered]nctsSA_AbgabenBetrag,[nctsGRT_AmountToBeCovered], ncts_dyaAnmID, ncts_Declarationtype ncts_ArtAnmeldung,ncts_ArtAnmeldung,[nctsGRT_GRN] nctsSA_GRN,ncts_Consignee_IdentificationNumber ncts_Empfaenger_eori,ncts_Consignee_SubsidiaryNumber ncts_Empfaenger_NLNR,ncts_Empfaenger_Name,ncts_Bearbeiter" + sql &= " ,[ncts_ObjectName],[ncts_Trans_DatumZeit] as Transaktionsdatum,[ncts_dyaArt],[ncts_ANR],[ncts_MRN],[ncts_ObjectAlias],ncts_GrossMass ncts_GesamtRohmasse,0 As ncts_GesamtAnzahlPackstuecke " + sql &= " from tblDakosy_NCTSOut004_Guarantee inner join [tblDakosy_NCTSOut004] on ncts_Id = nctsGRT_NctsId" + sql &= " where ncts_Status between '" & statusVon & "' and '" & statusBis & "' AND nctsSA_GRN='" & buergschaft & "' " & where + 'MsgBox(sql) + While True 'Endlosschleife; wird verlassen durch Return oder Application.Exit() + Try + Dim myTable = New DataTable() + Using conn As SqlConnection = VERAG_PROG_ALLGEMEIN.SQL.GetNewOpenConnectionFMZOLL() + Using cmd As New SqlCommand(sql, conn) + Dim dr As SqlDataReader = cmd.ExecuteReader() + myTable.Load(dr) + dr.Close() + End Using + conn.Close() + End Using + Return myTable 'While Schleife wird hier verlassen + Catch ex As Exception + Dim antwort As MsgBoxResult = MsgBox(ex.Message, CType(MsgBoxStyle.RetryCancel + MsgBoxStyle.Exclamation, MsgBoxStyle), + "Problem in Function 'loadDgvBySqlZOLARIS'") + End Try + End While + + Return Nothing + End Function + Public Function loadDgvBySqlFromBrgKt_NCTS_TR_Details(ByVal datumVon As DateTime, ByVal datumBis As DateTime, ByVal statusVon As String, ByVal statusBis As String, ByVal buergschaft As String, Optional where As String = "") As DataTable @@ -542,8 +596,9 @@ Public Class cBrgDb Dim tmp_sub As String = 0 'getBrgSumFromFMZOLL_Zabis_SUBEN(datumVon, datumBis, statusVon, statusBis, buergschaft, where) Dim tmp_sbg As String = 0 ' getBrgSumFromFMZOLL_Zabis_SALZBURG(datumVon, datumBis, statusVon, statusBis, buergschaft, where) Dim tmp_DY As String = getBrgSumFrom_DAKOSY(datumVon, datumBis, statusVon, statusBis, buergschaft, where) + Dim tmp_DY004 As String = getBrgSumFrom_DAKOSY_NCTS004(datumVon, datumBis, statusVon, statusBis, buergschaft, where) 'Dim tmp_nctsTR As String = getBrgSumFrom_NCTS_TR(datumVon, datumBis, statusVon, statusBis, buergschaft, where) - Return CDbl(tmp_sub) + CDbl(tmp_sbg) + CDbl(tmp_DY) ' + CDbl(tmp_nctsTR) + Return CDbl(tmp_sub) + CDbl(tmp_sbg) + CDbl(tmp_DY) + CDbl(tmp_DY004) ' + CDbl(tmp_nctsTR) End Function @@ -628,6 +683,39 @@ Public Class cBrgDb End Function + Public Function getBrgSumFrom_DAKOSY_NCTS004(ByVal datumVon As DateTime, ByVal datumBis As DateTime, ByVal statusVon As String, ByVal statusBis As String, ByVal buergschaft As String, Optional where As String = "") As String + 'Return Nothing + + Dim sql As String = "SELECT sum([nctsGRT_AmountToBeCovered])" + sql &= " from tblDakosy_NCTSOut004_Guarantee inner join [tblDakosy_NCTSOut004] on ncts_Id = nctsGRT_NctsId" + sql &= " where ncts_Trans_DatumZeit BETWEEN '" & datumVon.ToShortDateString & " 00:00:00' AND '" & datumBis.ToShortDateString & " 23:23:59' AND ncts_Status BETWEEN '" & statusVon & "' AND '" & statusBis & "' AND [nctsGRT_GRN] = '" & buergschaft & "' " & where + 'MsgBox(sql) + Dim dr As SqlDataReader + Dim daten As New List(Of cBuergschaft) + Using conn As SqlConnection = VERAG_PROG_ALLGEMEIN.SQL.GetNewOpenConnectionFMZOLL() + Using cmd As New SqlCommand(sql, conn) + dr = cmd.ExecuteReader() + Try + Dim cnt As Integer = 0 + If dr.Read Then + If Not dr.GetValue(0) Is DBNull.Value Then + ' MsgBox(dr.GetValue(0)) + Return dr.GetValue(0) + + End If + End If + Return "0" + Catch ex As Exception + MsgBox(System.Reflection.MethodInfo.GetCurrentMethod.Name & ": Fehler mit der Datenbankverbindung:" & vbCrLf & vbCrLf & ex.Message, vbExclamation, "Datenbankfehler") + Finally + dr.Close() + End Try + End Using + End Using + Return Nothing + End Function + + Public Function getBrgSumFrom_NCTS_TR(ByVal datumVon As DateTime, ByVal datumBis As DateTime, ByVal statusVon As String, ByVal statusBis As String, ByVal buergschaft As String, Optional where As String = "") As String 'Return Nothing Dim sql As String = "SELECT sum(nctsSA_AbgabenBetrag)" diff --git a/initATLASAufschubkonten/cGetMsgType.vb b/initATLASAufschubkonten/cGetMsgType.vb index 6dada27..f977818 100644 --- a/initATLASAufschubkonten/cGetMsgType.vb +++ b/initATLASAufschubkonten/cGetMsgType.vb @@ -504,6 +504,23 @@ Public Class cGetMsgType End If Return False End Function + + + Shared Function isAES_DEXPDF(doc As XmlDocument) As Boolean + If doc.HasChildNodes Then + ' If doc.GetElementsByTagName("DakosyMessageInternal").Count > 0 Then + Dim sw = New StringWriter() + Dim xw = New XmlTextWriter(sw) + doc.WriteTo(xw) + Dim XmlString = sw.ToString() + If XmlString.Contains("") Then + + Return True + End If + 'End If + End If + Return False + End Function Shared Function isAES_DEXPDD(doc As XmlDocument) As Boolean If doc.HasChildNodes Then ' If doc.GetElementsByTagName("DakosyMessageInternal").Count > 0 Then diff --git a/initATLASAufschubkonten/cWorker_NCTS.vb b/initATLASAufschubkonten/cWorker_NCTS.vb index 8f48a0b..c23ad8e 100644 --- a/initATLASAufschubkonten/cWorker_NCTS.vb +++ b/initATLASAufschubkonten/cWorker_NCTS.vb @@ -678,15 +678,15 @@ Public Class cWorker_NCTS 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)) + If cntTmp = 0 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_1_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_1_ArravialDateTime = (getDatumXMLNothing(CST.arrivalDateAndTimeEstimated)) + If cntTmp = 1 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_2_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_2_ArravialDateTime = (getDatumXMLNothing(CST.arrivalDateAndTimeEstimated)) + If cntTmp = 2 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_3_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_3_ArravialDateTime = (getDatumXMLNothing(CST.arrivalDateAndTimeEstimated)) + If cntTmp = 3 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_4_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_4_ArravialDateTime = (getDatumXMLNothing(CST.arrivalDateAndTimeEstimated)) + If cntTmp = 4 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_5_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_5_ArravialDateTime = (getDatumXMLNothing(CST.arrivalDateAndTimeEstimated)) + If cntTmp = 5 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_6_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_6_ArravialDateTime = (getDatumXMLNothing(CST.arrivalDateAndTimeEstimated)) + If cntTmp = 6 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_7_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_7_ArravialDateTime = (getDatumXMLNothing(CST.arrivalDateAndTimeEstimated)) + If cntTmp = 7 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_8_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_8_ArravialDateTime = (getDatumXMLNothing(CST.arrivalDateAndTimeEstimated)) + If cntTmp = 8 Then NCTS.ncts_CustomsOfficeOfTransitDeclared_9_RefNumber = CST.referenceNumber : NCTS.ncts_CustomsOfficeOfTransitDeclared_9_ArravialDateTime = (getDatumXMLNothing(CST.arrivalDateAndTimeEstimated)) cntTmp += 1 Next @@ -947,7 +947,7 @@ Public Class cWorker_NCTS 'WP.nctsWP_PositionsNummer = GOODSITEM.SequenceNumber If HCCI.Commodity IsNot Nothing Then - NCTS_HCCI.nctsHCCI_CommodityCode = HCCI.Commodity.CommodityCode + If HCCI.Commodity.CommodityCode IsNot Nothing AndAlso HCCI.Commodity.CommodityCode.harmonizedSystemSubHeadingCode IsNot Nothing Then NCTS_HCCI.nctsHCCI_CommodityCode = HCCI.Commodity.CommodityCode.harmonizedSystemSubHeadingCode If HCCI.Commodity.GoodsMeasure IsNot Nothing Then NCTS_HCCI.nctsHCCI_NetMass = HCCI.Commodity.GoodsMeasure.netMass NCTS_HCCI.nctsHCCI_GrossMass = HCCI.Commodity.GoodsMeasure.grossMass @@ -1100,6 +1100,10 @@ Public Class cWorker_NCTS ' 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 diff --git a/initATLASAufschubkonten/frmDYNachrichtenVerarbeitung.vb b/initATLASAufschubkonten/frmDYNachrichtenVerarbeitung.vb index 380e7ac..8ab4321 100644 --- a/initATLASAufschubkonten/frmDYNachrichtenVerarbeitung.vb +++ b/initATLASAufschubkonten/frmDYNachrichtenVerarbeitung.vb @@ -305,7 +305,7 @@ Public Class frmDYNachrichtenVerarbeitung Select Case VERSION Case "002" If cWorker_NCTS.readNCTS004_Versandbestaetigung002(Me, d) <> "" Then found = True 'NEU - If Not found Then If cWorker_NCTS.readNCTS_Versandbestaetigung002(Me, d) <> "" Then found = True 'WENN NOCH ALT + 'If Not found Then If cWorker_NCTS.readNCTS_Versandbestaetigung002(Me, d) <> "" Then found = True 'WENN NOCH ALT Case Else : If cWorker_NCTS.readNCTS_Versandbestaetigung(Me, d) <> "" Then found = True End Select ' If bezugsNr <> "" Then addDGVEinarbeitung("NCTS: Versandbestätigung", bezugsNr) : found = True @@ -316,7 +316,7 @@ Public Class frmDYNachrichtenVerarbeitung Select Case VERSION Case "008" If cWorker_NCTS.readNCTS004_Ueberlassungsmeldung008(Me, d, statusTMP) <> "" Then found = True 'NEU - If Not found Then If cWorker_NCTS.readNCTS_Ueberlassungsmeldung008(Me, d, statusTMP) <> "" Then found = True + ' If Not found Then If cWorker_NCTS.readNCTS_Ueberlassungsmeldung008(Me, d, statusTMP) <> "" Then found = True 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!") @@ -329,7 +329,7 @@ Public Class frmDYNachrichtenVerarbeitung Select Case VERSION Case "002" If cWorker_NCTS.readNCTS004_AnrechnungReferenzbetraege002(Me, d) <> "" Then found = True 'NEU - If Not found Then If cWorker_NCTS.readNCTS_AnrechnungReferenzbetraege002(Me, d) <> "" Then found = True + ' If Not found Then 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 @@ -339,7 +339,7 @@ Public Class frmDYNachrichtenVerarbeitung Select Case VERSION Case "003" If cWorker_NCTS.readNCTS004_Erledigungsmeldung003(Me, d) <> "" Then found = True 'NEU - If Not found Then If cWorker_NCTS.readNCTS_Erledigungsmeldung003(Me, d) <> "" Then found = True + ' If Not found Then 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 @@ -356,7 +356,7 @@ Public Class frmDYNachrichtenVerarbeitung Select Case VERSION Case "003" If cWorker_NCTS.readNCTS004_StatusmeldungNCTSDE003(Me, d) <> "" Then found = True 'NEU - If Not found Then If cWorker_NCTS.readNCTS_StatusmeldungNCTSDE003(Me, d) <> "" Then found = True + ' If Not found Then 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 @@ -366,7 +366,7 @@ Public Class frmDYNachrichtenVerarbeitung Select Case VERSION Case "004" If cWorker_NCTS.readNCTS004_UngueltigkeitSicherheitenNCTSDE004(Me, d) <> "" Then found = True 'NEU - If Not found Then If cWorker_NCTS.readNCTS_UngueltigkeitSicherheitenNCTSDE004(Me, d) <> "" Then found = True ': MsgBox("005!") + ' If Not found Then 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 @@ -430,6 +430,7 @@ Public Class frmDYNachrichtenVerarbeitung 'EZA: Abgabenbescheid If Not found And cGetMsgType.isEZA_Abgabenbescheid(doc, VERSION) Then Select Case VERSION + Case "011" : If readEZA_Abgabenbescheid011(d, statusTMP) <> "" Then found = True Case "010" : If readEZA_Abgabenbescheid010(d, statusTMP) <> "" Then found = True Case "009" : If readEZA_Abgabenbescheid009(d, statusTMP) <> "" Then found = True Case "008" : If readEZA_Abgabenbescheid008(d) <> "" Then found = True @@ -510,6 +511,11 @@ Public Class frmDYNachrichtenVerarbeitung If readAES_DEXPDE(doc2) <> "" Then found = True End If + 'AES: VollstaendigeAusfuhr 2023 ATLAS 9.1 + If Not found And cGetMsgType.isAES_DEXPDF(doc2) Then + If readAES_DEXPDF(doc2) <> "" Then found = True + End If + 'AES: Statusmeldung If Not found And cGetMsgType.isAES_DEXPSD(doc2) Then If readAES_DEXPSD(doc2) <> "" Then found = True @@ -542,6 +548,7 @@ Public Class frmDYNachrichtenVerarbeitung 'AES: UeberlassungAusfuhr If Not found And cGetMsgType.isAES_UeberlassungAusfuhr(doc, VERSION) Then Select Case VERSION + Case "007" : If readAES_UeberlassungAusfuhr_007(d) <> "" Then found = True Case "006" : If readAES_UeberlassungAusfuhr_006(d) <> "" Then found = True End Select End If @@ -550,6 +557,7 @@ Public Class frmDYNachrichtenVerarbeitung 'AES: BestaetigungAusfuhr If Not found And cGetMsgType.isAES_BestaetigungAusfuhr(doc, VERSION) Then Select Case VERSION + Case "07" : If readAES_BestaetigungAusfuhr_007(d) <> "" Then found = True Case "006" : If readAES_BestaetigungAusfuhr_006(d) <> "" Then found = True End Select End If @@ -1922,6 +1930,452 @@ Public Class frmDYNachrichtenVerarbeitung readAES_DEXPDE = "" End Try End Function + Function readAES_DEXPDF(doc As XmlDocument) As String + Try + readAES_DEXPDF = "" + Dim sw = New StringWriter() + Dim xw = New XmlTextWriter(sw) + doc.WriteTo(xw) + Dim XmlString = sw.ToString() + If XmlString.Contains("") Then + Dim xmlDEXPDF = XmlString.Substring(XmlString.IndexOf(""), XmlString.IndexOf("") + 9 - XmlString.IndexOf("")) + ' MsgBox(xmlDEXPDF) + Dim p = Path.GetTempFileName + + Using outputFile As New StreamWriter(p) ', False, System.Text.Encoding.Default) + outputFile.Write(xmlDEXPDF) + outputFile.Close() + + + + Dim DEXPDF As DAKOSY_Worker.DEXPDF.DEXPDF = DAKOSY_Worker.DEXPDF.DEXPDF.LoadFromFile(p) + + + ' Dim AES As New DAKOSY_Worker.cDakosyAES + + + + If DEXPDF IsNot Nothing And DEXPDF.ExportOperation IsNot Nothing And DEXPDF.ExportOperation.LRN IsNot Nothing Then + readAES_DEXPDF = DEXPDF.ExportOperation.LRN + Else + Return "" 'Keine Bezugsnummer + End If + + Dim DY_TMP As DAKOSY_Worker.cDakosy_Zollanmeldungen = saveDY_ZA(readAES_DEXPDF, "AES") + + Dim AES As DAKOSY_Worker.cDakosyAES = DAKOSY_Worker.cDakosyAES.LOADByBezugsNr(readAES_DEXPDF, False) ' Falls schon ein DS mit dieser Bezugsnummer vorhanden ist. + If AES Is Nothing Then AES = New DAKOSY_Worker.cDakosyAES + If DY_TMP IsNot Nothing Then AES.aes_dyaAnmID = DY_TMP.dy_Id + + If DY_TMP.dy_AvisoId Is Nothing Then + DY_TMP.tryFindAviso() + DY_TMP.SAVE() + End If + + + If DEXPDF IsNot Nothing Then + + 'Kopfdaten + If DEXPDF.ExportOperation IsNot Nothing Then + + If DEXPDF.ExportOperation.declarationType IsNot Nothing Then AES.aes_AnmeldeArtAusfuhrCode = DEXPDF.ExportOperation.declarationType + + If DEXPDF.ExportOperation.LRN IsNot Nothing Then + ' readAES_DEXPDF = DEXPDF.Header.LocalReferenceNumber + AES.aes_ObjectName = DEXPDF.ExportOperation.LRN + End If + End If + + + 'Kopfdaten + 'If DEXPDF.ExportOperation IsNot Nothing Then + + ' If DEXPDF.ExportOperation.declarationType IsNot Nothing Then AES.aes_AnmeldeArtAusfuhrCode = DEXPDF.ExportOperation.declarationType + + ' If DEXPDF.ExportOperation.LRN IsNot Nothing Then + ' ' readAES_DEXPDF = DEXPDF.Header.LocalReferenceNumber + ' AES.aes_ObjectName = DEXPDF.ExportOperation.LRN + ' End If + + ' ' If DEXPDF.ExportOperation.Declaration.Variant IsNot Nothing Then AES.aes_AnmeldeArtUeberfuehrungCode = DEXPDF.ExportOperation.Declaration.Variant + + + ' 'If DEXPDF.Header.MessageVersion IsNot Nothing Then AES.aes_Trans_Version = DEXPDF. + ' If DEXPDF.ExportOperation.expo.ExportCountry IsNot Nothing Then AES.aes_Ausfuhrland = DEXPDF.Header.ExportCountry + ' If DEXPDF.Header.DestinationCountry IsNot Nothing Then AES.aes_BestimmungslandCode = DEXPDF.Header.DestinationCountry + ' AES.aes_AnmeldedatumZeit = cEDI.isValidDateElseNothing(DEXPDF.Header.DeclarationDateTime) + ' AES.aes_MassgeblichesDatum = cEDI.isValidDateElseNothing(DEXPDF.Header.DecisiveDate) + ' AES.aes_DatumAusgang = cEDI.isValidDateElseNothing(DEXPDF.Header.ExitDate) + ' If DEXPDF.Header.SpecificCircumstanceIndicator IsNot Nothing Then AES.aes_BesondereUmstaende = DEXPDF.Header.SpecificCircumstanceIndicator + ' If DEXPDF.Header.TransportChargesPaymentMethod IsNot Nothing Then AES.aes_Zahlungsweisebefoerderungskosten = DEXPDF.Header.TransportChargesPaymentMethod + + ' AES.aes_AdressdatenKonstellation = DEXPDF.Header.PartyConstellation ' PROBLEME? + + ' AES.aes_ContainerIndikator = DEXPDF.Header.ContainerFlag ' ? + ' AES.aes_GesamtRohmasse = DEXPDF.Header.TotalGrossMassMeasure + ' 'If DEXPDF.Header.RegistrationNumber IsNot Nothing Then AES.aes_RegistriernummerFremdsystem = DEXPDF.Header.RegistrationNumber + ' 'If DEXPDF.Header.Annotation IsNot Nothing Then AES.aes_Vermerk = DEXPDF.Header.Annotation + ' 'If DEXPDF.Header.CommercialReferenceNumber IsNot Nothing Then AES.aes_KennnummerSendung = DEXPDF.Header.CommercialReferenceNumber + + + ' If DEXPDF.Header.GoodsItemQuantity IsNot Nothing Then AES.aes_AnzahlPositionen = DEXPDF.Header.GoodsItemQuantity + ' If DEXPDF.Header.CustomsAuthorization IsNot Nothing Then + ' If DEXPDF.Header.CustomsAuthorization.LocalClearanceOutwardProcessing IsNot Nothing Then AES.aes_BewiligungsnummerAnschreibeverfahren = DEXPDF.Header.CustomsAuthorization.LocalClearanceOutwardProcessing + ' If DEXPDF.Header.CustomsAuthorization.OutwardProcessing IsNot Nothing Then AES.aes_BewiligungsnummerPassiveVeredelung = DEXPDF.Header.CustomsAuthorization.OutwardProcessing + ' ' If DEXPDF.Header.CustomsAuthorization.TrustedExporter IsNot Nothing Then AES.aes_BewiligungsnummerVertrausenswuerdigerAusfuehrer = DEXPDF.Header.CustomsAuthorization.TrustedExporter + ' If DEXPDF.Header.CustomsAuthorization.AccreditedExporter IsNot Nothing Then AES.aes_BewiligungsnummerAusfuhr = DEXPDF.Header.CustomsAuthorization.AccreditedExporter + ' End If + + ' If DEXPDF.Header.InlandTransportMeans IsNot Nothing Then + ' If DEXPDF.Header.InlandTransportMeans.Mode IsNot Nothing Then AES.aes_VerkehrszweigInland = DEXPDF.Header.InlandTransportMeans.Mode + ' End If + + ' If DEXPDF.Header.DepartureTransportMeans IsNot Nothing Then + ' AES.aes_BefoerderungsmittelAbgangArtCode = DEXPDF.Header.DepartureTransportMeans.Type + ' If DEXPDF.Header.DepartureTransportMeans.Identity IsNot Nothing Then AES.aes_BefoerderungsmittelAbgangKennzeichen = DEXPDF.Header.DepartureTransportMeans.Identity + ' If DEXPDF.Header.DepartureTransportMeans.Nationality IsNot Nothing Then AES.aes_BefoerderungsmittelAbgangStaatCode = DEXPDF.Header.DepartureTransportMeans.Nationality + ' End If + + ' If DEXPDF.Header.BorderTransportMeans IsNot Nothing Then + ' AES.aes_BefoerderungsmittelGrenzeArtCode = DEXPDF.Header.BorderTransportMeans.Type + ' If DEXPDF.Header.BorderTransportMeans.Mode IsNot Nothing Then AES.aes_VerkehrszweigGrenze = DEXPDF.Header.BorderTransportMeans.Mode + ' If DEXPDF.Header.BorderTransportMeans.Identity IsNot Nothing Then AES.aes_BefoerderungsmittelGrenzeKennzeichen = DEXPDF.Header.BorderTransportMeans.Identity + ' If DEXPDF.Header.BorderTransportMeans.Nationality IsNot Nothing Then AES.aes_BefoerderungsmittelGrenzeStaatCode = DEXPDF.Header.BorderTransportMeans.Nationality + ' If DEXPDF.Header.BorderTransportMeans.Nationality IsNot Nothing Then AES.aes_BefoerderungsmittelGrenzeStaatCode = DEXPDF.Header.BorderTransportMeans.Nationality + ' End If + + ' End If + + ' If True Then + + + ' 'Ladeort + ' If DEXPDF.GoodsLoadingPlace IsNot Nothing Then + ' If DEXPDF.GoodsLoadingPlace.Identification IsNot Nothing Then + ' If DEXPDF.GoodsLoadingPlace.Identification.ReferenceNumber IsNot Nothing Then AES.aes_LadeortOrtId = DEXPDF.GoodsLoadingPlace.Identification.ReferenceNumber + ' End If + ' If DEXPDF.GoodsLoadingPlace.Address IsNot Nothing Then + ' If DEXPDF.GoodsLoadingPlace.Address.Line IsNot Nothing Then AES.aes_LadeortStrasse = DEXPDF.GoodsLoadingPlace.Address.Line + ' If DEXPDF.GoodsLoadingPlace.Address.Postcode IsNot Nothing Then AES.aes_LadeortPLZ = DEXPDF.GoodsLoadingPlace.Address.Postcode + ' If DEXPDF.GoodsLoadingPlace.Address.City IsNot Nothing Then AES.aes_LadeortOrt = DEXPDF.GoodsLoadingPlace.Address.City + ' If DEXPDF.GoodsLoadingPlace.Address.Complement IsNot Nothing Then AES.aes_LadeortZusatz = DEXPDF.GoodsLoadingPlace.Address.Complement + ' End If + ' End If + + ' If DEXPDF.ExportCustomsOffice IsNot Nothing Then + ' If DEXPDF.ExportCustomsOffice.ReferenceNumber IsNot Nothing Then AES.aes_AusfuhrZollstelleID = DEXPDF.ExportCustomsOffice.ReferenceNumber + ' End If + ' 'If DEXPDF.SupplementaryDeclarationCustomsOffice IsNot Nothing Then + ' 'If DEXPDF.SupplementaryDeclarationCustomsOffice.ReferenceNumber IsNot Nothing Then AES.aes_AusgangszollstelleID = DEXPDF.SupplementaryDeclarationCustomsOffice.ReferenceNumber + ' 'End If + ' If DEXPDF.IntendedExitCustomsOffice IsNot Nothing Then + ' If DEXPDF.IntendedExitCustomsOffice.ReferenceNumber IsNot Nothing Then AES.aes_AusgangszollstelleID = DEXPDF.IntendedExitCustomsOffice.ReferenceNumber + ' End If + ' If DEXPDF.ActualExitCustomsOffice IsNot Nothing Then + ' If DEXPDF.ActualExitCustomsOffice.ReferenceNumber IsNot Nothing Then AES.aes_TatsaechlicheAusgangZollstelleID = DEXPDF.ActualExitCustomsOffice.ReferenceNumber + ' End If + ' If DEXPDF.Transaction IsNot Nothing Then + ' AES.aes_GeschaeftartCode = DEXPDF.Transaction.Type + ' AES.aes_Rechnungspreis = DEXPDF.Transaction.Type + ' If DEXPDF.Transaction.Currency IsNot Nothing Then AES.aes_Rechnungwaehrung = DEXPDF.Transaction.Currency + ' End If + ' If DEXPDF.SpecialFact IsNot Nothing Then + ' If DEXPDF.SpecialFact.Count > 0 Then AES.aes_BesondererTatbestand = DEXPDF.SpecialFact(0).Indicator 'Könnenn mehrere auftretetn + ' End If + + ' If DEXPDF.Itinerary IsNot Nothing Then + ' If DEXPDF.Itinerary.Count > 0 Then AES.aes_BefoerderungsrouteLand1 = DEXPDF.Itinerary(0).Country + ' If DEXPDF.Itinerary.Count > 1 Then AES.aes_BefoerderungsrouteLand2 = DEXPDF.Itinerary(1).Country + ' If DEXPDF.Itinerary.Count > 2 Then AES.aes_BefoerderungsrouteLand3 = DEXPDF.Itinerary(2).Country + ' If DEXPDF.Itinerary.Count > 3 Then AES.aes_BefoerderungsrouteLand4 = DEXPDF.Itinerary(3).Country + ' If DEXPDF.Itinerary.Count > 4 Then AES.aes_BefoerderungsrouteLand5 = DEXPDF.Itinerary(4).Country + ' If DEXPDF.Itinerary.Count > 5 Then AES.aes_BefoerderungsrouteLand6 = DEXPDF.Itinerary(5).Country + ' If DEXPDF.Itinerary.Count > 6 Then AES.aes_BefoerderungsrouteLand7 = DEXPDF.Itinerary(6).Country + ' If DEXPDF.Itinerary.Count > 7 Then AES.aes_BefoerderungsrouteLand8 = DEXPDF.Itinerary(7).Country + ' If DEXPDF.Itinerary.Count > 8 Then AES.aes_BefoerderungsrouteLand9 = DEXPDF.Itinerary(8).Country + ' If DEXPDF.Itinerary.Count > 9 Then AES.aes_BefoerderungsrouteLand10 = DEXPDF.Itinerary(9).Country + ' If DEXPDF.Itinerary.Count > 10 Then AES.aes_BefoerderungsrouteLand11 = DEXPDF.Itinerary(10).Country + ' If DEXPDF.Itinerary.Count > 11 Then AES.aes_BefoerderungsrouteLand12 = DEXPDF.Itinerary(11).Country + ' End If + + ' If DEXPDF.Seals IsNot Nothing Then + ' AES.aes_VerschlussArtCode = DEXPDF.Seals.Type + ' If DEXPDF.Seals.Number IsNot Nothing Then AES.aes_VerschlussAnzahl = DEXPDF.Seals.Number + ' If DEXPDF.Seals.Seal IsNot Nothing Then + ' If DEXPDF.Seals.Seal.Count > 0 Then AES.aes_VerschlussZeichen1 = DEXPDF.Seals.Seal(0).Identity + ' If DEXPDF.Seals.Seal.Count > 1 Then AES.aes_VerschlussZeichen2 = DEXPDF.Seals.Seal(1).Identity + ' If DEXPDF.Seals.Seal.Count > 2 Then AES.aes_VerschlussZeichen3 = DEXPDF.Seals.Seal(2).Identity + ' If DEXPDF.Seals.Seal.Count > 3 Then AES.aes_VerschlussZeichen4 = DEXPDF.Seals.Seal(3).Identity + ' If DEXPDF.Seals.Seal.Count > 4 Then AES.aes_VerschlussZeichen5 = DEXPDF.Seals.Seal(4).Identity + ' If DEXPDF.Seals.Seal.Count > 5 Then AES.aes_VerschlussZeichen6 = DEXPDF.Seals.Seal(5).Identity + ' If DEXPDF.Seals.Seal.Count > 6 Then AES.aes_VerschlussZeichen7 = DEXPDF.Seals.Seal(6).Identity + ' If DEXPDF.Seals.Seal.Count > 7 Then AES.aes_VerschlussZeichen8 = DEXPDF.Seals.Seal(7).Identity + ' If DEXPDF.Seals.Seal.Count > 8 Then AES.aes_VerschlussZeichen9 = DEXPDF.Seals.Seal(8).Identity + ' If DEXPDF.Seals.Seal.Count > 9 Then AES.aes_VerschlussZeichen10 = DEXPDF.Seals.Seal(9).Identity + ' If DEXPDF.Seals.Seal.Count > 10 Then AES.aes_VerschlussZeichen11 = DEXPDF.Seals.Seal(10).Identity + ' If DEXPDF.Seals.Seal.Count > 11 Then AES.aes_VerschlussZeichen12 = DEXPDF.Seals.Seal(11).Identity + ' End If + ' End If + + ' If DEXPDF.PresentationPackingLoading IsNot Nothing Then + ' AES.aes_GestellungsfristAnfangDatumZeit = cEDI.isValidDateElseNothing(DEXPDF.PresentationPackingLoading.StartDateTime) + ' AES.aes_GestellungsfristEndeDatumZeit = cEDI.isValidDateElseNothing(DEXPDF.PresentationPackingLoading.EndDateTime) + ' End If + + + + ' 'Ausführer + ' If DEXPDF.Exporter IsNot Nothing Then + ' ' AES.Ausfuehrert = DEXPDF.Exporter.Class + ' If DEXPDF.Exporter.Identification IsNot Nothing Then + ' If DEXPDF.Exporter.Identification.ReferenceNumber IsNot Nothing Then AES.aes_AusfuehrerTeilnehmerEORI = DEXPDF.Exporter.Identification.ReferenceNumber + ' If DEXPDF.Exporter.Identification.SubsidiaryNumber IsNot Nothing Then AES.aes_AusfuehrerTeilnehmerNLNR = DEXPDF.Exporter.Identification.SubsidiaryNumber + ' End If + ' If DEXPDF.Exporter.name IsNot Nothing Then AES.aes_AusfuehrerTeilnehmerName = DEXPDF.Exporter.name + ' If DEXPDF.Exporter.Address IsNot Nothing Then + ' If DEXPDF.Exporter.Address.Line IsNot Nothing Then AES.aes_AusfuehrerTeilnehmerStrasse = DEXPDF.Exporter.Address.Line + ' If DEXPDF.Exporter.Address.city IsNot Nothing Then AES.aes_AusfuehrerTeilnehmerOrt = DEXPDF.Exporter.Address.city + ' If DEXPDF.Exporter.Address.postcode IsNot Nothing Then AES.aes_AusfuehrerTeilnehmerPLZ = DEXPDF.Exporter.Address.postcode + ' If DEXPDF.Exporter.Address.country IsNot Nothing Then AES.aes_AusfuehrerTeilnehmerLandCode = DEXPDF.Exporter.Address.country + ' End If + ' If DEXPDF.Exporter.ContactPerson IsNot Nothing Then + ' If DEXPDF.Exporter.ContactPerson.Position IsNot Nothing Then AES.aes_AusfuehrerTeilnehmerAnsprechpartnerStellung = DEXPDF.Exporter.ContactPerson.Position + ' If DEXPDF.Exporter.ContactPerson.Name IsNot Nothing Then AES.aes_AusfuehrerTeilnehmerAnsprechpartnerSachbearbeiter = DEXPDF.Exporter.ContactPerson.Name + ' If DEXPDF.Exporter.ContactPerson.PhoneNumber IsNot Nothing Then AES.aes_AusfuehrerTeilnehmerAnsprechpartnerTelefonnummer = DEXPDF.Exporter.ContactPerson.PhoneNumber + ' If DEXPDF.Exporter.ContactPerson.FacsimileNumber IsNot Nothing Then AES.aes_AusfuehrerTeilnehmerAnsprechpartnerTelefax = DEXPDF.Exporter.ContactPerson.FacsimileNumber + ' If DEXPDF.Exporter.ContactPerson.MailAddress IsNot Nothing Then AES.aes_AusfuehrerTeilnehmerAnsprechpartnerEmail = DEXPDF.Exporter.ContactPerson.MailAddress + ' End If + ' End If + + + ' 'Anmelder + ' If DEXPDF.Declarant IsNot Nothing Then + ' ' AES.anmeldert = DEXPDF.Declarant.Class + ' If DEXPDF.Declarant.Identification IsNot Nothing Then + ' If DEXPDF.Declarant.Identification.ReferenceNumber IsNot Nothing Then AES.aes_AnmelderTeilnehmerEORI = DEXPDF.Declarant.Identification.ReferenceNumber + ' If DEXPDF.Declarant.Identification.SubsidiaryNumber IsNot Nothing Then AES.aes_AnmelderTeilnehmerNLNR = DEXPDF.Declarant.Identification.SubsidiaryNumber + ' End If + ' If DEXPDF.Declarant.name IsNot Nothing Then AES.aes_AnmelderTeilnehmerName = DEXPDF.Declarant.name + ' If DEXPDF.Declarant.Address IsNot Nothing Then + ' If DEXPDF.Declarant.Address.Line IsNot Nothing Then AES.aes_AnmelderTeilnehmerStrasse = DEXPDF.Declarant.Address.Line + ' If DEXPDF.Declarant.Address.city IsNot Nothing Then AES.aes_AnmelderTeilnehmerOrt = DEXPDF.Declarant.Address.city + ' If DEXPDF.Declarant.Address.postcode IsNot Nothing Then AES.aes_AnmelderTeilnehmerPLZ = DEXPDF.Declarant.Address.postcode + ' If DEXPDF.Declarant.Address.country IsNot Nothing Then AES.aes_AnmelderTeilnehmerLandCode = DEXPDF.Declarant.Address.country + ' End If + ' If DEXPDF.Declarant.ContactPerson IsNot Nothing Then + ' If DEXPDF.Declarant.ContactPerson.Position IsNot Nothing Then AES.aes_AnmelderTeilnehmerAnsprechpartnerStellung = DEXPDF.Declarant.ContactPerson.Position + ' If DEXPDF.Declarant.ContactPerson.name IsNot Nothing Then AES.aes_AnmelderTeilnehmerAnsprechpartnerSachbearbeiter = DEXPDF.Declarant.ContactPerson.name + ' If DEXPDF.Declarant.ContactPerson.phoneNumber IsNot Nothing Then AES.aes_AnmelderTeilnehmerAnsprechpartnerTelefonnummer = DEXPDF.Declarant.ContactPerson.phoneNumber + ' If DEXPDF.Declarant.ContactPerson.FacsimileNumber IsNot Nothing Then AES.aes_AnmelderTeilnehmerAnsprechpartnerTelefax = DEXPDF.Declarant.ContactPerson.FacsimileNumber + ' If DEXPDF.Declarant.ContactPerson.MailAddress IsNot Nothing Then AES.aes_AnmelderTeilnehmerAnsprechpartnerEmail = DEXPDF.Declarant.ContactPerson.MailAddress + ' End If + ' End If + + + ' 'Vertreter Anmelder + ' If DEXPDF.Representative IsNot Nothing Then + ' ' AES.anmeldert = DEXPDF.Representative.Class + ' If DEXPDF.Representative.Identification IsNot Nothing Then + ' If DEXPDF.Representative.Identification.ReferenceNumber IsNot Nothing Then AES.aes_VertreterAnmelderTeilnehmerEORI = DEXPDF.Representative.Identification.ReferenceNumber + ' If DEXPDF.Representative.Identification.SubsidiaryNumber IsNot Nothing Then AES.aes_VertreterAnmelderTeilnehmerNLNR = DEXPDF.Representative.Identification.SubsidiaryNumber + ' End If + ' If DEXPDF.Representative.Name IsNot Nothing Then AES.aes_VertreterAnmelderTeilnehmerName = DEXPDF.Representative.Name + ' If DEXPDF.Representative.Address IsNot Nothing Then + ' If DEXPDF.Representative.Address.Line IsNot Nothing Then AES.aes_VertreterAnmelderTeilnehmerStrasse = DEXPDF.Representative.Address.Line + ' If DEXPDF.Representative.Address.City IsNot Nothing Then AES.aes_VertreterAnmelderTeilnehmerOrt = DEXPDF.Representative.Address.City + ' If DEXPDF.Representative.Address.Postcode IsNot Nothing Then AES.aes_VertreterAnmelderTeilnehmerPLZ = DEXPDF.Representative.Address.Postcode + ' If DEXPDF.Representative.Address.Country IsNot Nothing Then AES.aes_VertreterAnmelderTeilnehmerLandCode = DEXPDF.Representative.Address.Country + ' End If + ' If DEXPDF.Representative.ContactPerson IsNot Nothing Then + ' If DEXPDF.Representative.ContactPerson.Position IsNot Nothing Then AES.aes_VertreterAnmelderTeilnehmerAnsprechpartnerStellung = DEXPDF.Representative.ContactPerson.Position + ' If DEXPDF.Representative.ContactPerson.name IsNot Nothing Then AES.aes_VertreterAnmelderTeilnehmerAnsprechpartnerSachbearbeiter = DEXPDF.Representative.ContactPerson.name + ' If DEXPDF.Representative.ContactPerson.phoneNumber IsNot Nothing Then AES.aes_VertreterAnmelderTeilnehmerAnsprechpartnerTelefonnummer = DEXPDF.Representative.ContactPerson.phoneNumber + ' If DEXPDF.Representative.ContactPerson.FacsimileNumber IsNot Nothing Then AES.aes_VertreterAnmelderTeilnehmerAnsprechpartnerTelefax = DEXPDF.Representative.ContactPerson.FacsimileNumber + ' If DEXPDF.Representative.ContactPerson.MailAddress IsNot Nothing Then AES.aes_VertreterAnmelderTeilnehmerAnsprechpartnerEmail = DEXPDF.Representative.ContactPerson.MailAddress + ' End If + ' End If + + + ' 'Subunternehmer + ' If DEXPDF.Contractor IsNot Nothing Then + ' ' AES.anmeldert = DEXPDF.Contractor.Class + ' If DEXPDF.Contractor.Identification IsNot Nothing Then + ' If DEXPDF.Contractor.Identification.ReferenceNumber IsNot Nothing Then AES.aes_SubunternehmerTeilnehmerEORI = DEXPDF.Contractor.Identification.ReferenceNumber + ' If DEXPDF.Contractor.Identification.SubsidiaryNumber IsNot Nothing Then AES.aes_SubunternehmerTeilnehmerNLNR = DEXPDF.Contractor.Identification.SubsidiaryNumber + ' End If + ' If DEXPDF.Contractor.Name IsNot Nothing Then AES.aes_SubunternehmerTeilnehmerName = DEXPDF.Contractor.Name + ' If DEXPDF.Contractor.Address IsNot Nothing Then + ' If DEXPDF.Contractor.Address.Line IsNot Nothing Then AES.aes_SubunternehmerTeilnehmerStrasse = DEXPDF.Contractor.Address.Line + ' If DEXPDF.Contractor.Address.City IsNot Nothing Then AES.aes_SubunternehmerTeilnehmerOrt = DEXPDF.Contractor.Address.City + ' If DEXPDF.Contractor.Address.Postcode IsNot Nothing Then AES.aes_SubunternehmerTeilnehmerPLZ = DEXPDF.Contractor.Address.Postcode + ' If DEXPDF.Contractor.Address.Country IsNot Nothing Then AES.aes_SubunternehmerTeilnehmerLandCode = DEXPDF.Contractor.Address.Country + ' End If + ' If DEXPDF.Contractor.ContactPerson IsNot Nothing Then + ' If DEXPDF.Contractor.ContactPerson.Position IsNot Nothing Then AES.aes_SubunternehmerTeilnehmerAnsprechpartnerStellung = DEXPDF.Contractor.ContactPerson.Position + ' If DEXPDF.Contractor.ContactPerson.Name IsNot Nothing Then AES.aes_SubunternehmerTeilnehmerAnsprechpartnerSachbearbeiter = DEXPDF.Contractor.ContactPerson.Name + ' If DEXPDF.Contractor.ContactPerson.PhoneNumber IsNot Nothing Then AES.aes_SubunternehmerTeilnehmerAnsprechpartnerTelefonnummer = DEXPDF.Contractor.ContactPerson.PhoneNumber + ' If DEXPDF.Contractor.ContactPerson.FacsimileNumber IsNot Nothing Then AES.aes_SubunternehmerTeilnehmerAnsprechpartnerTelefax = DEXPDF.Contractor.ContactPerson.FacsimileNumber + ' If DEXPDF.Contractor.ContactPerson.MailAddress IsNot Nothing Then AES.aes_SubunternehmerTeilnehmerAnsprechpartnerEmail = DEXPDF.Contractor.ContactPerson.MailAddress + ' End If + ' End If + + ' 'Verfahrensinhaber + ' If DEXPDF.OutwardProcessingOwner IsNot Nothing Then + ' ' AES.anmeldert = DEXPDF.OutwardProcessingOwner.Class + ' If DEXPDF.OutwardProcessingOwner.Identification IsNot Nothing Then + ' If DEXPDF.OutwardProcessingOwner.Identification.ReferenceNumber IsNot Nothing Then AES.aes_VerfahrensinhaberPVTeilnehmerEORI = DEXPDF.OutwardProcessingOwner.Identification.ReferenceNumber + ' AES.aes_VerfahrensinhaberPVTeilnehmerNLNR = DEXPDF.OutwardProcessingOwner.Identification.SubsidiaryNumber + ' End If + + ' If DEXPDF.OutwardProcessingOwner.ContactPerson IsNot Nothing Then + ' If DEXPDF.OutwardProcessingOwner.ContactPerson.Position IsNot Nothing Then AES.aes_VerfahrensinhaberPVTeilnehmerAnsprechpartnerStellung = DEXPDF.OutwardProcessingOwner.ContactPerson.Position + ' If DEXPDF.OutwardProcessingOwner.ContactPerson.Name IsNot Nothing Then AES.aes_VerfahrensinhaberPVTeilnehmerAnsprechpartnerSachbearbeiter = DEXPDF.OutwardProcessingOwner.ContactPerson.Name + ' If DEXPDF.OutwardProcessingOwner.ContactPerson.PhoneNumber IsNot Nothing Then AES.aes_VerfahrensinhaberPVTeilnehmerAnsprechpartnerTelefonnummer = DEXPDF.OutwardProcessingOwner.ContactPerson.PhoneNumber + ' If DEXPDF.OutwardProcessingOwner.ContactPerson.FacsimileNumber IsNot Nothing Then AES.aes_VerfahrensinhaberPVTeilnehmerAnsprechpartnerTelefax = DEXPDF.OutwardProcessingOwner.ContactPerson.FacsimileNumber + ' If DEXPDF.OutwardProcessingOwner.ContactPerson.MailAddress IsNot Nothing Then AES.aes_VerfahrensinhaberPVTeilnehmerAnsprechpartnerEmail = DEXPDF.OutwardProcessingOwner.ContactPerson.MailAddress + ' End If + ' End If + + ' 'Empfaenger + ' If DEXPDF.Consignee IsNot Nothing Then + ' ' AES.anmeldert = DEXPDF.Consignee.Class + ' If DEXPDF.Consignee.Identification IsNot Nothing Then + ' If DEXPDF.Consignee.Identification.ReferenceNumber IsNot Nothing Then AES.aes_EmpfaengerTeilnehmerEORI = DEXPDF.Consignee.Identification.ReferenceNumber + ' If DEXPDF.Consignee.Identification.SubsidiaryNumber IsNot Nothing Then AES.aes_EmpfaengerTeilnehmerNLNR = DEXPDF.Consignee.Identification.SubsidiaryNumber + ' End If + ' If DEXPDF.Consignee.Name IsNot Nothing Then AES.aes_EmpfaengerTeilnehmerName = DEXPDF.Consignee.Name + ' If DEXPDF.Consignee.Address IsNot Nothing Then + ' If DEXPDF.Consignee.Address.Line IsNot Nothing Then AES.aes_EmpfaengerTeilnehmerStrasse = DEXPDF.Consignee.Address.Line + ' If DEXPDF.Consignee.Address.City IsNot Nothing Then AES.aes_EmpfaengerTeilnehmerOrt = DEXPDF.Consignee.Address.City + ' If DEXPDF.Consignee.Address.Postcode IsNot Nothing Then AES.aes_EmpfaengerTeilnehmerPLZ = DEXPDF.Consignee.Address.Postcode + ' If DEXPDF.Consignee.Address.Country IsNot Nothing Then AES.aes_EmpfaengerTeilnehmerLandCode = DEXPDF.Consignee.Address.Country + ' End If + ' End If + + + ' 'WAREN + ' AES.aes_WARENPOS.Clear() + ' If DEXPDF.GoodsItem IsNot Nothing Then + ' If DEXPDF.GoodsItem.Count > 0 Then + ' For Each WP In DEXPDF.GoodsItem + ' Dim AES_WP = New DAKOSY_Worker.cDakosy_AES_Warenposition + ' If WP.SequenceNumber IsNot Nothing Then AES_WP.aesWP_PositionsNummer = WP.SequenceNumber + ' If WP.GoodsDescription IsNot Nothing Then AES_WP.aesWP_Warenbezeichnung = WP.GoodsDescription + ' If WP.CommercialReferenceNumber IsNot Nothing Then AES_WP.aesWP_KennungSendung = WP.CommercialReferenceNumber + ' If WP.RegistrationNumber IsNot Nothing Then AES_WP.aesWP_RegisternummerFremdsystem = WP.RegistrationNumber + ' If WP.Annotation IsNot Nothing Then AES_WP.aesWP_Vermerk = WP.Annotation + ' AES_WP.aesWP_UrsprungsbundeslandCode = WP.OriginFederalState + ' AES_WP.aesWP_Eigenmasse = WP.NetMass + ' AES_WP.aesWP_Rohmasse = WP.GrossMass + ' If WP.DangerousGoodsCode IsNot Nothing Then AES_WP.aesWP_Gefahrgutnummer = WP.DangerousGoodsCode + ' If WP.TransportChargesPaymentMethod IsNot Nothing Then AES_WP.aesWP_ZahlungsweiseBefoerderungskosten = WP.TransportChargesPaymentMethod + ' If WP.CommodityCode IsNot Nothing Then + ' If WP.CommodityCode.CombinedNomenclatureCode IsNot Nothing Then AES_WP.aesWP_WarennummerKN8 = WP.CommodityCode.CombinedNomenclatureCode + ' If WP.CommodityCode.TaricCode IsNot Nothing Then AES_WP.aesWP_WarennummerTARIC = WP.CommodityCode.TaricCode + ' If WP.CommodityCode.TaricFirstAdditionalCode IsNot Nothing Then AES_WP.aesWP_WarennummerZusatz1 = WP.CommodityCode.TaricFirstAdditionalCode + ' If WP.CommodityCode.TaricSecondAdditionalCode IsNot Nothing Then AES_WP.aesWP_WarennummerZusatz2 = WP.CommodityCode.TaricSecondAdditionalCode + ' If WP.CommodityCode.NationalAdditionalCode IsNot Nothing Then AES_WP.aesWP_WarennummerNational = WP.CommodityCode.NationalAdditionalCode + ' End If + ' If WP.Procedure IsNot Nothing Then + ' If WP.Procedure.RequestedProcedure IsNot Nothing Then AES_WP.aesWP_VerfahrenAngemeldetCode = WP.Procedure.RequestedProcedure + ' If WP.Procedure.PreviousProcedure IsNot Nothing Then AES_WP.aesWP_VerfahrenVorangegangenCode = WP.Procedure.PreviousProcedure + ' If WP.Procedure.AdditionalProcedure IsNot Nothing Then AES_WP.aesWP_VerfahrenNationalCode = WP.Procedure.AdditionalProcedure + ' AES_WP.aesWP_AusfuhrerstattungVerfahrensCode = WP.Procedure.ExportRefundProcedure + ' End If + ' If WP.ForeignTradeStatistics IsNot Nothing Then + ' AES_WP.aesWP_Menge = WP.ForeignTradeStatistics.SpecialUnitQuantity + ' If WP.ForeignTradeStatistics.StatisticalValue IsNot Nothing Then AES_WP.aesWP_Wert = WP.ForeignTradeStatistics.StatisticalValue + ' End If + + + ' 'Empfaenger + ' If WP.Consignee IsNot Nothing Then + ' ' AES_WP.anmeldert = WP.Consignee.Class + ' If WP.Consignee.Identification IsNot Nothing Then + ' If WP.Consignee.Identification.ReferenceNumber IsNot Nothing Then AES_WP.aesWP_EmpfaengerTeilnehmerEORI = WP.Consignee.Identification.ReferenceNumber + ' If WP.Consignee.Identification.SubsidiaryNumber IsNot Nothing Then AES_WP.aesWP_EmpfaengerTeilnehmerNLNR = WP.Consignee.Identification.SubsidiaryNumber + ' End If + ' If WP.Consignee.Name IsNot Nothing Then AES_WP.aesWP_EmpfaengerTeilnehmerName = WP.Consignee.Name + ' If WP.Consignee.Address IsNot Nothing Then + ' If WP.Consignee.Address.Line IsNot Nothing Then AES_WP.aesWP_EmpfaengerTeilnehmerStrasse = WP.Consignee.Address.Line + ' If WP.Consignee.Address.City IsNot Nothing Then AES_WP.aesWP_EmpfaengerTeilnehmerOrt = WP.Consignee.Address.City + ' If WP.Consignee.Address.Postcode IsNot Nothing Then AES_WP.aesWP_EmpfaengerTeilnehmerPLZ = WP.Consignee.Address.Postcode + ' If WP.Consignee.Address.Country IsNot Nothing Then AES_WP.aesWP_EmpfaengerTeilnehmerLandCode = WP.Consignee.Address.Country + ' End If + ' End If + + ' If WP.Container IsNot Nothing Then + ' If WP.Container.Count > 0 Then AES_WP.aesWP_Containernummer1 = WP.Container(0).IdentificationNumber + ' If WP.Container.Count > 1 Then AES_WP.aesWP_Containernummer2 = WP.Container(1).IdentificationNumber + ' If WP.Container.Count > 2 Then AES_WP.aesWP_Containernummer3 = WP.Container(2).IdentificationNumber + ' If WP.Container.Count > 3 Then AES_WP.aesWP_Containernummer4 = WP.Container(3).IdentificationNumber + ' End If + + ' 'PACKSTÜCKE + ' AES_WP.aesWP_PACKSTUECKE.Clear() + ' If WP.Package IsNot Nothing Then + ' For Each PKST In WP.Package + ' Dim AES_PKST = New DAKOSY_Worker.cDakosy_AES_WarenpositionPackstuecke + ' If PKST.Quantity IsNot Nothing Then AES_PKST.aesWpPk_PackstueckeAnzahl = PKST.Quantity + ' ' If PKST.SequenceNumber IsNot Nothing Then AES_PKST.nu = PKST.SequenceNumber + ' If PKST.Kind IsNot Nothing Then AES_PKST.aesWpPk_Verpackungsart = PKST.Kind + ' If PKST.MarksNumbers IsNot Nothing Then AES_PKST.aesWpPk_Kennzeichnung = PKST.MarksNumbers + ' AES_WP.aesWP_PACKSTUECKE.Add(AES_PKST) + ' Next + ' End If + + + ' 'UNTERLAGEN + ' AES_WP.aesWP_UNTERLAGEN.Clear() + ' If WP.Document IsNot Nothing Then + ' For Each UNT In WP.Document + ' Dim AES_UNT = New DAKOSY_Worker.cDakosy_AES_WarenpositionUnterlagen + ' If UNT.Qualifier IsNot Nothing Then AES_UNT.aesWpUl_QualifierCode = UNT.Qualifier + ' If UNT.Type IsNot Nothing Then AES_UNT.aesWpUl_Typ = UNT.Type + ' If UNT.ReferenceNumber IsNot Nothing Then AES_UNT.aesWpUl_ReferenzID = UNT.ReferenceNumber + ' If UNT.Complement IsNot Nothing Then AES_UNT.aesWpUl_Zusatz = UNT.Complement + ' If UNT.Detail IsNot Nothing Then AES_UNT.aesWpUl_Detail = UNT.Detail + ' AES_UNT.aesWpUl_DatumAusstellung = cEDI.isValidDateElseNothing(UNT.IssuingDate) + ' AES_UNT.aesWpUl_DatumEndeGueltigkeit = cEDI.isValidDateElseNothing(UNT.ExpiryDate) + ' If UNT.WriteOffValue IsNot Nothing Then AES_UNT.aesWpUl_Wert = UNT.WriteOffValue + ' AES_UNT.aesWpUl_Masseinheit = UNT.MeasurementUnit + ' AES_UNT.aesWpUl_Abschreibungsmenge = UNT.WriteOffQuantity + ' AES_WP.aesWP_UNTERLAGEN.Add(AES_UNT) + ' Next + ' End If + ' AES.aes_WARENPOS.Add(AES_WP) + ' Next + + ' End If + ' End If + + ' End If + AES.aes_Status = DAKOSY_Worker.cDY_Statusliste.S_05 + AES.aes_Status_KEWILL_Equivalent = DAKOSY_Worker.cDY_Statusliste.S_05 + If AES.SAVE_ALL() Then + DAKOSY_Worker.cDakosy_Statusmeldungen.InsertStatusMeldung(DY_TMP, DAKOSY_Worker.cDY_Statusliste.S_05) + End If + + 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 + + addDGVEinarbeitung("AES: AnmeldungAusfuhr", readAES_DEXPDF) + + End Using + + End If + + Catch ex As Exception + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, Path.GetTempFileName & vbNewLine & ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) + readAES_DEXPDF = "" + End Try + End Function Function readAES_DEXPSD(doc As XmlDocument) As String Try @@ -2267,6 +2721,79 @@ Public Class frmDYNachrichtenVerarbeitung End Try End Function + + Function readAES_UeberlassungAusfuhr_007(d) As String + Try + + Dim AES As DAKOSY_Worker.UeberlassungAusfuhr_007.UeberlassungAusfuhrERTyp = DAKOSY_Worker.UeberlassungAusfuhr_007.UeberlassungAusfuhrERTyp.LoadFromFile(d) + Dim ART = "" + ' Dim details = "" + + Dim zp As Object = Nothing + Dim regNR = "" + Dim division = "" + + readAES_UeberlassungAusfuhr_007 = "" + If AES IsNot Nothing Then + + If AES.Transaktion IsNot Nothing Then + If AES.Transaktion.IODivision3 IsNot Nothing Then + division = AES.Transaktion.IODivision3 + End If + End If + + If AES.EinzelUeberlassung IsNot Nothing AndAlso AES.EinzelUeberlassung.Count > 0 Then + If AES.EinzelUeberlassung(0).ObjektIdentifizierung IsNot Nothing Then + If AES.EinzelUeberlassung(0).ObjektIdentifizierung.ObjektName IsNot Nothing Then + readAES_UeberlassungAusfuhr_007 = AES.EinzelUeberlassung(0).ObjektIdentifizierung.ObjektName + End If + zp = AES.EinzelUeberlassung(0).ObjektIdentifizierung.ZeitpunktEingang + End If + If AES.EinzelUeberlassung(0).KopfDaten IsNot Nothing Then + ' If AES.EinzelNichtAbschliessendeFestsetzung.KopfDaten.ArtErledigung IsNot Nothing Then + 'ART = AES.EinzelNichtAbschliessendeFestsetzung.KopfDaten.ArtErledigung + ' End If + If AES.EinzelUeberlassung(0).KopfDaten.MovementReferenceNumber IsNot Nothing Then + regNR = AES.EinzelUeberlassung(0).KopfDaten.MovementReferenceNumber + End If + End If + End If + End If + ' AES.LOADByBezugsNr(bezugsNr, False) ' Falls schon ein DS mit dieser Bezugsnummer vorhanden ist. + + If readAES_UeberlassungAusfuhr_007 <> "" And regNR <> "" Then 'BEZUGSNR vorhanden + + Dim STATUS As DAKOSY_Worker.cDakosy_Statusmeldungen = getStatusCheckTransID(AES.Transaktion.IOReferenz, If(zp, AES.Transaktion.IODatumZeit)) + STATUS.dySt_BezugsNr = readAES_UeberlassungAusfuhr_007 + STATUS.dySt_artMitteilung = "UEA" + STATUS.dySt_dyArt = "AES" + + STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_60 + STATUS.dySt_ergCode = "TSTMP" + ' STATUS.dySt_ergMitteilung = Reason + ' If tstmp IsNot Nothing Then STATUS.dySt_ergZeitpunkt = tstmp + 'EINTRAG IN tblDakosy_Zollanmeldungen + Dim DY_TMP As DAKOSY_Worker.cDakosy_Zollanmeldungen = saveDY_ZA(STATUS, AES.Transaktion.IOReferenz, If(zp, AES.Transaktion.IODatumZeit), "AES") + ' Dim NCTS_TMP As DAKOSY_Worker.cDakosyNCTSOut = saveDY_NCTS(STATUS, DY_TMP, messageID, messageTstmp, , regNR) + + Dim AES_TMP As DAKOSY_Worker.cDakosyAES = saveDY_AES(STATUS, DY_TMP, AES.Transaktion.IOReferenz, If(zp, AES.Transaktion.IODatumZeit), , regNR) + + 'SaveAES_FirmaNL(AES_TMP, "") 'KEINE NIEDERLASSUNG + AES_TMP.insertIntoSpedBuch(DY_TMP) + + If DY_TMP IsNot Nothing Then STATUS.dySt_dyId = DY_TMP.dy_Id + STATUS.SAVE() + + addDGVEinarbeitung("AES: Überlassung", 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) + readAES_UeberlassungAusfuhr_007 = "" + End Try + End Function + Function readAES_BestaetigungAusfuhr_006(d) As String Try @@ -2338,6 +2865,77 @@ Public Class frmDYNachrichtenVerarbeitung readAES_BestaetigungAusfuhr_006 = "" End Try End Function + Function readAES_BestaetigungAusfuhr_007(d) As String + Try + + Dim AES As DAKOSY_Worker.BestaetigungAusfuhr_007.BestaetigungAusfuhrENTyp = DAKOSY_Worker.BestaetigungAusfuhr_007.BestaetigungAusfuhrENTyp.LoadFromFile(d) + Dim ART = "" + ' Dim details = "" + + Dim zp As Object = Nothing + Dim regNR = "" + Dim division = "" + + readAES_BestaetigungAusfuhr_007 = "" + If AES IsNot Nothing Then + + If AES.Transaktion IsNot Nothing Then + If AES.Transaktion.IODivision3 IsNot Nothing Then + division = AES.Transaktion.IODivision3 + End If + End If + + If AES.EinzelBestaetigung IsNot Nothing AndAlso AES.EinzelBestaetigung.Count > 0 Then + If AES.EinzelBestaetigung(0).ObjektIdentifizierung IsNot Nothing Then + If AES.EinzelBestaetigung(0).ObjektIdentifizierung.ObjektName IsNot Nothing Then + readAES_BestaetigungAusfuhr_007 = AES.EinzelBestaetigung(0).ObjektIdentifizierung.ObjektName + End If + zp = AES.EinzelBestaetigung(0).ObjektIdentifizierung.ZeitpunktEingang + End If + If AES.EinzelBestaetigung(0).KopfDaten IsNot Nothing Then + ' If AES.EinzelNichtAbschliessendeFestsetzung.KopfDaten.ArtErledigung IsNot Nothing Then + 'ART = AES.EinzelNichtAbschliessendeFestsetzung.KopfDaten.ArtErledigung + ' End If + If AES.EinzelBestaetigung(0).KopfDaten.MovementReferenceNumber IsNot Nothing Then + regNR = AES.EinzelBestaetigung(0).KopfDaten.MovementReferenceNumber + End If + End If + End If + End If + ' AES.LOADByBezugsNr(bezugsNr, False) ' Falls schon ein DS mit dieser Bezugsnummer vorhanden ist. + + If readAES_BestaetigungAusfuhr_007 <> "" And regNR <> "" Then 'BEZUGSNR vorhanden + + Dim STATUS As DAKOSY_Worker.cDakosy_Statusmeldungen = getStatusCheckTransID(AES.Transaktion.IOReferenz, If(zp, AES.Transaktion.IODatumZeit)) + STATUS.dySt_BezugsNr = readAES_BestaetigungAusfuhr_007 + STATUS.dySt_artMitteilung = "BST" + STATUS.dySt_dyArt = "AES" + + STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_60 + STATUS.dySt_ergCode = "TSTMP" + ' STATUS.dySt_ergMitteilung = Reason + ' If tstmp IsNot Nothing Then STATUS.dySt_ergZeitpunkt = tstmp + 'EINTRAG IN tblDakosy_Zollanmeldungen + Dim DY_TMP As DAKOSY_Worker.cDakosy_Zollanmeldungen = saveDY_ZA(STATUS, AES.Transaktion.IOReferenz, If(zp, AES.Transaktion.IODatumZeit), "AES") + ' Dim NCTS_TMP As DAKOSY_Worker.cDakosyNCTSOut = saveDY_NCTS(STATUS, DY_TMP, messageID, messageTstmp, , regNR) + + Dim AES_TMP As DAKOSY_Worker.cDakosyAES = saveDY_AES(STATUS, DY_TMP, AES.Transaktion.IOReferenz, If(zp, AES.Transaktion.IODatumZeit), , regNR) + + 'SaveAES_FirmaNL(AES_TMP, "") 'KEINE NIEDERLASSUNG + AES_TMP.insertIntoSpedBuch(DY_TMP) + + If DY_TMP IsNot Nothing Then STATUS.dySt_dyId = DY_TMP.dy_Id + STATUS.SAVE() + + addDGVEinarbeitung("AES: BestätigunAusfuhr", 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) + readAES_BestaetigungAusfuhr_007 = "" + End Try + End Function Function readAES_DEXPRE(doc As XmlDocument) As String Try readAES_DEXPRE = "" @@ -7944,6 +8542,199 @@ Public Class frmDYNachrichtenVerarbeitung End Function + Function readEZA_Abgabenbescheid011(d, ByRef statusTMP) As String + Try + 'VERAG_PROG_ALLGEMEIN.cAllgemein.ERR_OP_GLOBAL = VERAG_PROG_ALLGEMEIN.ERROR_OP.SHOW + + Dim EZA As DAKOSY_Worker.Abgabenbescheid_011.AbgabenbescheidEinfuhrTAXTyp = DAKOSY_Worker.Abgabenbescheid_011.AbgabenbescheidEinfuhrTAXTyp.LoadFromFile(d) + Dim regNr = "" + Dim regDat = "" + Dim details = "" + Dim zoellner = "" + Dim erledigung = "" + Dim zp As Object = Nothing + Dim EDIFACTNachrichtenNr = "" + Dim AUFSCHUB As List(Of DAKOSY_Worker.cDakosy_EZA_Aufschub) = Nothing + Dim division = "" + + readEZA_Abgabenbescheid011 = "" + If EZA IsNot Nothing Then + + If EZA.Transaktion IsNot Nothing Then + If EZA.Transaktion.IODivision3 IsNot Nothing Then + division = EZA.Transaktion.IODivision3 + End If + End If + + If EZA.EinzelAbgabenbescheid IsNot Nothing Then + + 'Vorgezogen, damit firma/NL erkannt wird + Dim STATUS As DAKOSY_Worker.cDakosy_Statusmeldungen = getStatusCheckTransID(EZA.Transaktion.IOReferenz, EZA.Transaktion.IODatumZeit) + + + If EZA.EinzelAbgabenbescheid.ObjektIdentifizierung IsNot Nothing Then + If EZA.EinzelAbgabenbescheid.ObjektIdentifizierung.ObjektName IsNot Nothing Then + readEZA_Abgabenbescheid011 = EZA.EinzelAbgabenbescheid.ObjektIdentifizierung.ObjektName + End If + zp = EZA.EinzelAbgabenbescheid.ObjektIdentifizierung.ZeitpunktEingang + If EZA.EinzelAbgabenbescheid.ObjektIdentifizierung.EDIFACTNachrichtenNr IsNot Nothing Then + EDIFACTNachrichtenNr = EZA.EinzelAbgabenbescheid.ObjektIdentifizierung.EDIFACTNachrichtenNr + End If + End If + + If EZA.EinzelAbgabenbescheid.KopfDaten IsNot Nothing Then + If EZA.EinzelAbgabenbescheid.KopfDaten.Bearbeiter IsNot Nothing Then + zoellner = EZA.EinzelAbgabenbescheid.KopfDaten.Bearbeiter + End If + + If EZA.EinzelAbgabenbescheid.KopfDaten.Registriernummer IsNot Nothing Then + regNr = EZA.EinzelAbgabenbescheid.KopfDaten.Registriernummer + End If + If EZA.EinzelAbgabenbescheid.KopfDaten.ErledigungKopfKz IsNot Nothing Then + erledigung = EZA.EinzelAbgabenbescheid.KopfDaten.ErledigungKopfKz + End If + ' If EZA.EinzelAbgabenbescheid.KopfDaten.Registrierdatum IsNot Nothing Then + regDat = EZA.EinzelAbgabenbescheid.KopfDaten.Registrierdatum + 'End If + + If EZA.EinzelAbgabenbescheid.KopfDaten.AbgabenNachArt IsNot Nothing AndAlso EZA.EinzelAbgabenbescheid.KopfDaten.AbgabenNachArt.Count > 0 Then + Dim a As New DAKOSY_Worker.cDakosy_EZA_Aufschub + AUFSCHUB = New List(Of DAKOSY_Worker.cDakosy_EZA_Aufschub) + For Each ABG In EZA.EinzelAbgabenbescheid.KopfDaten.AbgabenNachArt + a.ezaAfb_ArtAufschubantrag = ABG.ArtAufschubAntrag + a.ezaAfb_AufschubnehmerEORI = ABG.AufschubnehmerTIN + a.ezaAfb_HZA = ABG.KennBuchstabenAufschub + a.ezaAfb_KontoNr = ABG.AufschubkontoNr + If ABG.Faelligkeit > CDate("01.01.2000") Then a.ezaAfb_Faelligkeit = ABG.Faelligkeit + a.ezaAfb_Zahlungsart = ABG.Zahlungsart + a.ezaAfb_Abgabenbetrag = ABG.Abgabenbetrag + a.ezaAfb_AbgabeArt = ABG.AbgabeArt + a.AufschubnehmerName = ABG.AufschubnehmerName + 'Select Case AbgabeArt + ' Case "B0000" 'EUST + ' Case "B0000" 'EUST + 'End Select + Next + AUFSCHUB.Add(a) + End If + + + + End If + + If readEZA_Abgabenbescheid011 <> "" Then 'BEZUGSNR vorhanden + STATUS.dySt_BezugsNr = readEZA_Abgabenbescheid011 + STATUS.dySt_artMitteilung = "AB" + STATUS.dySt_dyArt = "EZA" '"EZA" 'T1/T2 + + Select Case erledigung + Case "0" : STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_69 'ungültig + Case "1" : STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_69 'ungültig + Case "2" : STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_69 'ungültig + Case "3" : STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_99 'unwirksam + Case "4" : STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_55 'nicht abschleißender Bescheid + Case "5" : STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_60 + Case "6" : STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_60 + Case "7" : STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_68 'Abgabe HZS + Case "8" : STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_61 'Erledigung außerhalb d. SB + End Select + + STATUS.dySt_ergCode = "REGNr" + STATUS.dySt_ergMitteilung = regNr + STATUS.dySt_ergZeitpunkt = zp + STATUS.dySt_ergZoellner = zoellner + STATUS.dySt_ergDetails = details + 'EINTRAG IN tblDakosy_Zollanmeldungen + + Dim EZA_TMP As DAKOSY_Worker.cDakosyEZA + + + + Dim DY_TMP As DAKOSY_Worker.cDakosy_Zollanmeldungen = saveDY_ZA(STATUS, EZA.Transaktion.IOReferenz, If(zp, EZA.Transaktion.IODatumZeit), "EZA") + + If regNr <> "" Then + EZA_TMP = saveDY_EZA(STATUS, DY_TMP, EZA.Transaktion.IOReferenz, If(zp, EZA.Transaktion.IODatumZeit), regNr) + Else + EZA_TMP = saveDY_EZA(STATUS, DY_TMP, EZA.Transaktion.IOReferenz, If(zp, EZA.Transaktion.IODatumZeit)) + End If + + + Dim firma = "" + Dim nl = "" + SaveEZA_FirmaNL(EZA_TMP, DY_TMP, division, firma, nl) + + If AUFSCHUB IsNot Nothing And EZA_TMP IsNot Nothing Then + EZA_TMP.eza_AUFSCHUB.Clear() + For Each a In AUFSCHUB + a.ezaAfb_EZAId = EZA_TMP.eza_Id + Next + EZA_TMP.eza_AUFSCHUB = AUFSCHUB + EZA_TMP.SAVE_Aufschub() + + cVERAG_out_eza.copyFileFTP_VERAGEZA_DY(EZA_TMP, DY_TMP) ' SCHNITTSTELLE FTP BEREITSTELLEN + 'RAISE-API-EVENT/TRIGGER ?? + End If + + ' ------------------------------------------------------------------------------ + ' wenn nicht abschliebender Abgabenbescheid --> Infomail an die Zollbüros! + Select Case erledigung + Case "4" + STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_55 'nicht abschleißender Bescheid + Dim MailTo = "eu@verag.ag" + Select Case EZA_TMP.eza_firma + Case "IMEX" : MailTo = "info@imex-group.at" + Case "ATILLA" : MailTo = "atilla@verag.ag" + Case "UNISPED" : MailTo = "office@unisped.at" + Case "VERAG" + Select Case EZA_TMP.eza_niederlassung + Case "WAI" : MailTo = "waidhaus@verag.com" + Case "SBG" : MailTo = "de@verag.ag" + End Select + End Select + VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(MailTo, "MITTEILUNG ZOLL: Nicht abschließender Abgebenbescheid - " & readEZA_Abgabenbescheid011, + "Meldung über nicht abschließenden Abgabenbescheid bei der Bezugsnummer: " & readEZA_Abgabenbescheid011 & "

Firma: " & EZA_TMP.eza_firma & "Niederlassung: " & EZA_TMP.eza_niederlassung & "

Automatisch generiertes E-Mail.", + , True, True) + 'Case "5" + ' STATUS.dySt_status = DAKOSY_Worker.cDY_Statusliste.S_55 'nicht abschleißender Bescheid + ' Dim MailTo = "al@verag.ag" + + ' VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(MailTo, "MITTEILUNG ZOLL: Nicht abschließender Abgebenbescheid - " & readEZA_Abgabenbescheid, + ' "Meldung über abschließenden Abgabenbescheid bei der Bezugsnummer: " & readEZA_Abgabenbescheid & "

Firma: " & EZA_TMP.eza_firma & "Niederlassung: " & EZA_TMP.eza_niederlassung & "

Automatisch generiertes E-Mail.", + ' , True, True) + + End Select + ' ------------------------------------------------------------------------------ + + If DY_TMP IsNot Nothing Then STATUS.dySt_dyId = DY_TMP.dy_Id + STATUS.SAVE() + + If EZA IsNot Nothing AndAlso EZA.EinzelAbgabenbescheid.KopfDaten IsNot Nothing Then + InsertAbgaben(EZA, division, STATUS, DY_TMP, regNr, readEZA_Abgabenbescheid011, regDat, firma, nl, EDIFACTNachrichtenNr) + End If + + + 'Status aktualisieren + saveDY_EZA(STATUS, DY_TMP, EZA.Transaktion.IOReferenz, If(zp, EZA.Transaktion.IODatumZeit), regNr) + statusTMP = STATUS + EZA_TMP.insertIntoSpedBuch(DY_TMP) + + + addDGVEinarbeitung("EZA: Abgabenbescheid", STATUS.dySt_BezugsNr) + End If + + + End If + End If + ' EZA.LOADByBezugsNr(bezugsNr, False) ' Falls schon ein DS mit dieser Bezugsnummer vorhanden ist. + + + Catch ex As Exception + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace & vbNewLine & "Datei: " & Dateiname, System.Reflection.MethodInfo.GetCurrentMethod.Name) + readEZA_Abgabenbescheid011 = "" + End Try + End Function + + Function InsertAbgaben(EZA, division, STATUS, DY_TMP, regNr, Bezugsnummer, regDat, firma, nl, EDIFACTNachrichtenNr) Dim EZA_TMP As DAKOSY_Worker.cDakosyEZA = saveDY_EZA(STATUS, DY_TMP, EZA.Transaktion.IOReferenz, EZA.Transaktion.IODatumZeit, regNr) If EZA.EinzelAbgabenbescheid.KopfDaten.AbgabenNachArt IsNot Nothing Then