19577 lines
792 KiB
VB.net
19577 lines
792 KiB
VB.net
'' ------------------------------------------------------------------------------
|
|
'' <auto-generated>
|
|
'' 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":{}}
|
|
'' </auto-generated>
|
|
'' ------------------------------------------------------------------------------
|
|
#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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True),
|
|
XmlRoot()>
|
|
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
|
|
|
|
<XmlElement("Authorisation")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDF object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDF object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDF object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDF object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDF object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDF object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
XmlType(AnonymousType:=True)>
|
|
Public Enum DEXPDFMessageGroup
|
|
|
|
EXP
|
|
End Enum
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
XmlType(AnonymousType:=True)>
|
|
Public Enum DEXPDFMessageType
|
|
|
|
DEXPDF
|
|
End Enum
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFMessageSender object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFMessageSender object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFMessageSender object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFMessageSender object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFMessageSender object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFMessageSender object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFMessageRecipient object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFMessageRecipient object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFMessageRecipient object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFMessageRecipient object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFMessageRecipient object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFMessageRecipient object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement(DataType:="date")>
|
|
Public Property decisiveDate() As Date
|
|
Get
|
|
Return Me._decisiveDate
|
|
End Get
|
|
Set
|
|
Me._decisiveDate = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(DataType:="date")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFExportOperation object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFExportOperation object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFExportOperation object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFExportOperation object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFExportOperation object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFExportOperation object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
XmlType(AnonymousType:=True)>
|
|
Public Enum DEXPDFExportOperationExportDeclarationType
|
|
|
|
<XmlEnum("00000100")>
|
|
Item00000100
|
|
|
|
<XmlEnum("00000110")>
|
|
Item00000110
|
|
|
|
<XmlEnum("00000200")>
|
|
Item00000200
|
|
|
|
<XmlEnum("00000210")>
|
|
Item00000210
|
|
|
|
<XmlEnum("00000400")>
|
|
Item00000400
|
|
|
|
<XmlEnum("00000901")>
|
|
Item00000901
|
|
|
|
<XmlEnum("00000902")>
|
|
Item00000902
|
|
|
|
<XmlEnum("00001300")>
|
|
Item00001300
|
|
|
|
<XmlEnum("00001310")>
|
|
Item00001310
|
|
|
|
<XmlEnum("00001410")>
|
|
Item00001410
|
|
|
|
<XmlEnum("00110100")>
|
|
Item00110100
|
|
|
|
<XmlEnum("00110110")>
|
|
Item00110110
|
|
|
|
<XmlEnum("00110200")>
|
|
Item00110200
|
|
|
|
<XmlEnum("00110210")>
|
|
Item00110210
|
|
|
|
<XmlEnum("00110400")>
|
|
Item00110400
|
|
|
|
<XmlEnum("00111300")>
|
|
Item00111300
|
|
|
|
<XmlEnum("00111310")>
|
|
Item00111310
|
|
|
|
<XmlEnum("00111410")>
|
|
Item00111410
|
|
|
|
<XmlEnum("00120100")>
|
|
Item00120100
|
|
|
|
<XmlEnum("00120110")>
|
|
Item00120110
|
|
|
|
<XmlEnum("00120200")>
|
|
Item00120200
|
|
|
|
<XmlEnum("00120210")>
|
|
Item00120210
|
|
|
|
<XmlEnum("00200100")>
|
|
Item00200100
|
|
|
|
<XmlEnum("00200110")>
|
|
Item00200110
|
|
|
|
<XmlEnum("00200200")>
|
|
Item00200200
|
|
|
|
<XmlEnum("00200210")>
|
|
Item00200210
|
|
|
|
<XmlEnum("00200400")>
|
|
Item00200400
|
|
|
|
<XmlEnum("00201300")>
|
|
Item00201300
|
|
|
|
<XmlEnum("00201310")>
|
|
Item00201310
|
|
|
|
<XmlEnum("00201410")>
|
|
Item00201410
|
|
|
|
<XmlEnum("10000000")>
|
|
Item10000000
|
|
|
|
<XmlEnum("10000400")>
|
|
Item10000400
|
|
|
|
<XmlEnum("10110000")>
|
|
Item10110000
|
|
|
|
<XmlEnum("10110400")>
|
|
Item10110400
|
|
|
|
<XmlEnum("10200000")>
|
|
Item10200000
|
|
|
|
<XmlEnum("10200400")>
|
|
Item10200400
|
|
|
|
<XmlEnum("11000000")>
|
|
Item11000000
|
|
|
|
<XmlEnum("11110000")>
|
|
Item11110000
|
|
|
|
<XmlEnum("11120000")>
|
|
Item11120000
|
|
|
|
<XmlEnum("11200000")>
|
|
Item11200000
|
|
|
|
<XmlEnum("12000000")>
|
|
Item12000000
|
|
|
|
<XmlEnum("12110000")>
|
|
Item12110000
|
|
|
|
<XmlEnum("12120000")>
|
|
Item12120000
|
|
|
|
<XmlEnum("12200000")>
|
|
Item12200000
|
|
|
|
<XmlEnum("13000000")>
|
|
Item13000000
|
|
|
|
<XmlEnum("20000000")>
|
|
Item20000000
|
|
End Enum
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
XmlType(AnonymousType:=True)>
|
|
Public Enum DEXPDFExportOperationPartyConstellation
|
|
|
|
<XmlEnum("0000")>
|
|
Item0000
|
|
|
|
<XmlEnum("0001")>
|
|
Item0001
|
|
|
|
<XmlEnum("0010")>
|
|
Item0010
|
|
|
|
<XmlEnum("0011")>
|
|
Item0011
|
|
|
|
<XmlEnum("0100")>
|
|
Item0100
|
|
|
|
<XmlEnum("0101")>
|
|
Item0101
|
|
|
|
<XmlEnum("0110")>
|
|
Item0110
|
|
|
|
<XmlEnum("0111")>
|
|
Item0111
|
|
|
|
<XmlEnum("1000")>
|
|
Item1000
|
|
|
|
<XmlEnum("1010")>
|
|
Item1010
|
|
|
|
<XmlEnum("1100")>
|
|
Item1100
|
|
|
|
<XmlEnum("1110")>
|
|
Item1110
|
|
End Enum
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFAuthorisation object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFAuthorisation object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFAuthorisation object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFAuthorisation object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFAuthorisation object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFAuthorisation object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
XmlType(AnonymousType:=True)>
|
|
Public Enum DEXPDFAuthorisationType
|
|
|
|
C019
|
|
|
|
C512
|
|
|
|
C513
|
|
|
|
C514
|
|
|
|
C517
|
|
|
|
C518
|
|
|
|
C519
|
|
End Enum
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFCustomsOfficeOfPresentation object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFCustomsOfficeOfPresentation object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFCustomsOfficeOfPresentation object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFCustomsOfficeOfPresentation object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFCustomsOfficeOfPresentation object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFCustomsOfficeOfPresentation object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFCustomsOfficeOfExport object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFCustomsOfficeOfExport object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFCustomsOfficeOfExport object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFCustomsOfficeOfExport object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFCustomsOfficeOfExport object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFCustomsOfficeOfExport object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFCustomsOfficeOfSupplement object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFCustomsOfficeOfSupplement object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFCustomsOfficeOfSupplement object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFCustomsOfficeOfSupplement object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFCustomsOfficeOfSupplement object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFCustomsOfficeOfSupplement object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFCustomsOfficeOfExitDeclared object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFCustomsOfficeOfExitDeclared object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFCustomsOfficeOfExitDeclared object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFCustomsOfficeOfExitDeclared object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFCustomsOfficeOfExitDeclared object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFCustomsOfficeOfExitDeclared object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFCustomsOfficeOfExitActual object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFCustomsOfficeOfExitActual object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFCustomsOfficeOfExitActual object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFCustomsOfficeOfExitActual object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFCustomsOfficeOfExitActual object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFCustomsOfficeOfExitActual object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFContractualPartner object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFContractualPartner object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFContractualPartner object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFContractualPartner object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFContractualPartner object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFContractualPartner object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFContractualPartnerAddress object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFContractualPartnerAddress object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFContractualPartnerAddress object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFContractualPartnerAddress object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFContractualPartnerAddress object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFContractualPartnerAddress object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFExporter object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFExporter object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFExporter object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFExporter object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFExporter object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFExporter object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFExporterAddress object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFExporterAddress object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFExporterAddress object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFExporterAddress object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFExporterAddress object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFExporterAddress object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFDeclarant object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFDeclarant object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFDeclarant object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFDeclarant object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFDeclarant object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFDeclarant object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFDeclarantAddress object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFDeclarantAddress object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFDeclarantAddress object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFDeclarantAddress object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFDeclarantAddress object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFDeclarantAddress object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFDeclarantContactPerson object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFDeclarantContactPerson object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFDeclarantContactPerson object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFDeclarantContactPerson object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFDeclarantContactPerson object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFDeclarantContactPerson object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFRepresentative object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFRepresentative object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFRepresentative object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFRepresentative object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFRepresentative object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFRepresentative object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFRepresentativeContactPerson object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFRepresentativeContactPerson object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFRepresentativeContactPerson object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFRepresentativeContactPerson object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFRepresentativeContactPerson object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFRepresentativeContactPerson object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFSubContractor object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFSubContractor object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFSubContractor object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFSubContractor object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFSubContractor object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFSubContractor object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFSubContractorAddress object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFSubContractorAddress object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFSubContractorAddress object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFSubContractorAddress object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFSubContractorAddress object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFSubContractorAddress object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement("AdditionalSupplyChainActor")>
|
|
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
|
|
|
|
<XmlElement("PreviousDocument")>
|
|
Public Property PreviousDocument() As List(Of DEXPDFGoodsShipmentPreviousDocument)
|
|
Get
|
|
Return Me._previousDocument
|
|
End Get
|
|
Set
|
|
Me._previousDocument = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("SupportingDocument")>
|
|
Public Property SupportingDocument() As List(Of DEXPDFGoodsShipmentSupportingDocument)
|
|
Get
|
|
Return Me._supportingDocument
|
|
End Get
|
|
Set
|
|
Me._supportingDocument = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("AdditionalReference")>
|
|
Public Property AdditionalReference() As List(Of DEXPDFGoodsShipmentAdditionalReference)
|
|
Get
|
|
Return Me._additionalReference
|
|
End Get
|
|
Set
|
|
Me._additionalReference = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("AdditionalInformation")>
|
|
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
|
|
|
|
<XmlElement("GoodsItem")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipment object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipment object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipment object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipment object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipment object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipment object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentAdditionalSupplyChainActor object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentAdditionalSupplyChainActor object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentAdditionalSupplyChainActor object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentAdditionalSupplyChainActor object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentAdditionalSupplyChainActor object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentAdditionalSupplyChainActor object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentDeliveryTerms object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentDeliveryTerms object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentDeliveryTerms object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentDeliveryTerms object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentDeliveryTerms object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentDeliveryTerms object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement("Reimport")>
|
|
Public Property Reimport() As List(Of DEXPDFGoodsShipmentOutwardProcessingReimport)
|
|
Get
|
|
Return Me._reimport
|
|
End Get
|
|
Set
|
|
Me._reimport = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("IdentificationMeans")>
|
|
Public Property IdentificationMeans() As List(Of DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans)
|
|
Get
|
|
Return Me._identificationMeans
|
|
End Get
|
|
Set
|
|
Me._identificationMeans = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("Product")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentOutwardProcessing object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentOutwardProcessing object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentOutwardProcessing object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentOutwardProcessing object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentOutwardProcessing object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentOutwardProcessing object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
Partial Public Class DEXPDFGoodsShipmentOutwardProcessingReimport
|
|
|
|
#Region "Private fields"
|
|
Private _sequenceNumber As String
|
|
|
|
Private _country As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentOutwardProcessingReimport object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentOutwardProcessingReimport object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentOutwardProcessingReimport object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentOutwardProcessingReimport object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentOutwardProcessingReimport object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentOutwardProcessingReimport object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentOutwardProcessingIdentificationMeans object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
XmlType(AnonymousType:=True)>
|
|
Public Enum DEXPDFGoodsShipmentOutwardProcessingIdentificationMeansType
|
|
|
|
A
|
|
|
|
B
|
|
|
|
N
|
|
|
|
O
|
|
|
|
P
|
|
|
|
S
|
|
|
|
T
|
|
|
|
Z
|
|
End Enum
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentOutwardProcessingProduct object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentOutwardProcessingProduct object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentOutwardProcessingProduct object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentOutwardProcessingProduct object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentOutwardProcessingProduct object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentOutwardProcessingProduct object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentOutwardProcessingProductCommodity object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentOutwardProcessingProductCommodity object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentOutwardProcessingProductCommodity object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentOutwardProcessingProductCommodity object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentOutwardProcessingProductCommodity object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentOutwardProcessingProductCommodity object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentOutwardProcessingProductCommodityCommodityCode object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentPreviousDocument object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentPreviousDocument object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentPreviousDocument object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentPreviousDocument object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentPreviousDocument object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentPreviousDocument object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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
|
|
|
|
<XmlElement(DataType:="date")>
|
|
Public Property issuingDate() As Date
|
|
Get
|
|
Return Me._issuingDate
|
|
End Get
|
|
Set
|
|
Me._issuingDate = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(DataType:="date")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentSupportingDocument object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentSupportingDocument object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentSupportingDocument object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentSupportingDocument object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentSupportingDocument object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentSupportingDocument object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentAdditionalReference object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentAdditionalReference object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentAdditionalReference object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentAdditionalReference object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentAdditionalReference object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentAdditionalReference object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentAdditionalInformation object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentAdditionalInformation object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentAdditionalInformation object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentAdditionalInformation object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentAdditionalInformation object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentAdditionalInformation object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement("TransportEquipment")>
|
|
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
|
|
|
|
<XmlElement("DepartureTransportMeans")>
|
|
Public Property DepartureTransportMeans() As List(Of DEXPDFGoodsShipmentConsignmentDepartureTransportMeans)
|
|
Get
|
|
Return Me._departureTransportMeans
|
|
End Get
|
|
Set
|
|
Me._departureTransportMeans = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("CountryOfRoutingOfConsignment")>
|
|
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
|
|
|
|
<XmlElement("TransportDocument")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentConsignment object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentConsignment object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignment object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentConsignment object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignment object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignment object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
XmlType(AnonymousType:=True)>
|
|
Public Enum DEXPDFGoodsShipmentConsignmentContainerIndicator
|
|
|
|
<XmlEnum("0")>
|
|
Item0
|
|
|
|
<XmlEnum("1")>
|
|
Item1
|
|
End Enum
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentConsignmentCarrier object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentConsignmentCarrier object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentCarrier object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentConsignmentCarrier object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentCarrier object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentCarrier object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentConsignmentConsignor object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentConsignmentConsignor object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentConsignor object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentConsignmentConsignor object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentConsignor object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentConsignor object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentConsignmentConsignorAddress object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentConsignmentConsignorAddress object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentConsignorAddress object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentConsignmentConsignorAddress object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentConsignorAddress object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentConsignorAddress object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentConsignmentConsignee object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentConsignmentConsignee object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentConsignee object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentConsignmentConsignee object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentConsignee object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentConsignee object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentConsignmentConsigneeAddress object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentConsignmentConsigneeAddress object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentConsigneeAddress object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentConsignmentConsigneeAddress object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentConsigneeAddress object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentConsigneeAddress object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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
|
|
|
|
<XmlElement("Seal")>
|
|
Public Property Seal() As List(Of DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal)
|
|
Get
|
|
Return Me._seal
|
|
End Get
|
|
Set
|
|
Me._seal = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("GoodsReference")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentConsignmentTransportEquipment object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentConsignmentTransportEquipment object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentTransportEquipment object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentConsignmentTransportEquipment object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentTransportEquipment object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentTransportEquipment object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
XmlType(AnonymousType:=True)>
|
|
Public Enum DEXPDFGoodsShipmentConsignmentTransportEquipmentNumberOfSeals
|
|
|
|
<XmlEnum("0")>
|
|
Item0
|
|
End Enum
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
Partial Public Class DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal
|
|
|
|
#Region "Private fields"
|
|
Private _sequenceNumber As String
|
|
|
|
Private _identifier As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentTransportEquipmentSeal object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
Partial Public Class DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference
|
|
|
|
#Region "Private fields"
|
|
Private _sequenceNumber As String
|
|
|
|
Private _declarationGoodsItemNumber As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
Public Property sequenceNumber() As String
|
|
Get
|
|
Return Me._sequenceNumber
|
|
End Get
|
|
Set
|
|
Me._sequenceNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentTransportEquipmentGoodsReference object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentConsignmentLocationOfGoods object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentConsignmentLocationOfGoods object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentLocationOfGoods object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentConsignmentLocationOfGoods object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentLocationOfGoods object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentLocationOfGoods object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
XmlType(AnonymousType:=True)>
|
|
Public Enum DEXPDFGoodsShipmentConsignmentLocationOfGoodsTypeOfLocation
|
|
|
|
A
|
|
|
|
B
|
|
|
|
D
|
|
End Enum
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
XmlType(AnonymousType:=True)>
|
|
Public Enum DEXPDFGoodsShipmentConsignmentLocationOfGoodsQualifierOfIdentification
|
|
|
|
U
|
|
|
|
V
|
|
|
|
W
|
|
|
|
Y
|
|
|
|
Z
|
|
End Enum
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentLocationOfGoodsGNSS object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentLocationOfGoodsAddress object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentLocationOfGoodsContactPerson object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentConsignmentDepartureTransportMeans object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentConsignmentDepartureTransportMeans object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentDepartureTransportMeans object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentConsignmentDepartureTransportMeans object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentDepartureTransportMeans object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentDepartureTransportMeans object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
Partial Public Class DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment
|
|
|
|
#Region "Private fields"
|
|
Private _sequenceNumber As String
|
|
|
|
Private _country As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentCountryOfRoutingOfConsignment object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentActiveBorderTransportMeans object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentConsignmentTransportDocument object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentConsignmentTransportDocument object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentTransportDocument object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentConsignmentTransportDocument object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentTransportDocument object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentTransportDocument object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentConsignmentTransportCharges object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentConsignmentTransportCharges object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentTransportCharges object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentConsignmentTransportCharges object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentConsignmentTransportCharges object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentConsignmentTransportCharges object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
Public Property sequenceNumber() As String
|
|
Get
|
|
Return Me._sequenceNumber
|
|
End Get
|
|
Set
|
|
Me._sequenceNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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
|
|
|
|
<XmlElement("Authorisation")>
|
|
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
|
|
|
|
<XmlElement("AdditionalSupplyChainActor")>
|
|
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
|
|
|
|
<XmlElement("Packaging")>
|
|
Public Property Packaging() As List(Of DEXPDFGoodsShipmentGoodsItemPackaging)
|
|
Get
|
|
Return Me._packaging
|
|
End Get
|
|
Set
|
|
Me._packaging = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("PreviousDocument")>
|
|
Public Property PreviousDocument() As List(Of DEXPDFGoodsShipmentGoodsItemPreviousDocument)
|
|
Get
|
|
Return Me._previousDocument
|
|
End Get
|
|
Set
|
|
Me._previousDocument = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("SupportingDocument")>
|
|
Public Property SupportingDocument() As List(Of DEXPDFGoodsShipmentGoodsItemSupportingDocument)
|
|
Get
|
|
Return Me._supportingDocument
|
|
End Get
|
|
Set
|
|
Me._supportingDocument = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("AdditionalReference")>
|
|
Public Property AdditionalReference() As List(Of DEXPDFGoodsShipmentGoodsItemAdditionalReference)
|
|
Get
|
|
Return Me._additionalReference
|
|
End Get
|
|
Set
|
|
Me._additionalReference = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("AdditionalInformation")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItem object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItem object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItem object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItem object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItem object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItem object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemAuthorisation object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemAuthorisation object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemAuthorisation object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemAuthorisation object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemAuthorisation object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemAuthorisation object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
XmlType(AnonymousType:=True)>
|
|
Public Enum DEXPDFGoodsShipmentGoodsItemAuthorisationType
|
|
|
|
C019
|
|
|
|
C516
|
|
|
|
C601
|
|
|
|
C626
|
|
|
|
C627
|
|
End Enum
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemProcedure object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedure object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedure object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedure object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedure object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedure object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedure object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
XmlType(AnonymousType:=True)>
|
|
Public Enum DEXPDFGoodsShipmentGoodsItemProcedureAdditionalProcedureSequenceNumber
|
|
|
|
<XmlEnum("1")>
|
|
Item1
|
|
End Enum
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemConsignor object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemConsignor object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemConsignor object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemConsignor object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemConsignor object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemConsignor object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemConsignorAddress object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemConsignorAddress object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemConsignorAddress object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemConsignorAddress object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemConsignorAddress object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemConsignorAddress object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemConsignee object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemConsignee object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemConsignee object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemConsignee object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemConsignee object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemConsignee object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemConsigneeAddress object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemConsigneeAddress object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemConsigneeAddress object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemConsigneeAddress object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemConsigneeAddress object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemConsigneeAddress object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemAdditionalSupplyChainActor object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemOrigin object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemOrigin object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemOrigin object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemOrigin object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemOrigin object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemOrigin object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement("DangerousGoods")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemCommodity object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemCommodity object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemCommodity object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemCommodity object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemCommodity object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemCommodity object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement("TARICAdditionalCode")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemCommodityCommodityCode object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
Partial Public Class DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode
|
|
|
|
#Region "Private fields"
|
|
Private _sequenceNumber As String
|
|
|
|
Private _taricAdditionalCode As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemCommodityCommodityCodeTARICAdditionalCode object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
Partial Public Class DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods
|
|
|
|
#Region "Private fields"
|
|
Private _sequenceNumber As String
|
|
|
|
Private _uNNumber As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemCommodityDangerousGoods object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemCommodityGoodsMeasure object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemPackaging object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemPackaging object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemPackaging object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemPackaging object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemPackaging object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemPackaging object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
Partial Public Class DEXPDFGoodsShipmentGoodsItemPackagingPackageReference
|
|
|
|
#Region "Private fields"
|
|
Private _declarationGoodsItemNumber As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemPackagingPackageReference object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemPackagingPackageReference object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemPackagingPackageReference object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemPackagingPackageReference object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemPackagingPackageReference object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemPackagingPackageReference object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemPreviousDocument object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemPreviousDocument object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemPreviousDocument object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemPreviousDocument object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemPreviousDocument object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemPreviousDocument object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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
|
|
|
|
<XmlElement(DataType:="date")>
|
|
Public Property issuingDate() As Date
|
|
Get
|
|
Return Me._issuingDate
|
|
End Get
|
|
Set
|
|
Me._issuingDate = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(DataType:="date")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemSupportingDocument object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemSupportingDocument object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemSupportingDocument object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemSupportingDocument object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemSupportingDocument object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemSupportingDocument object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemAdditionalReference object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemAdditionalReference object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemAdditionalReference object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemAdditionalReference object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemAdditionalReference object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemAdditionalReference object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemAdditionalInformation object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemAdditionalInformation object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemAdditionalInformation object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemAdditionalInformation object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemAdditionalInformation object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemAdditionalInformation object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemTransportCharges object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemTransportCharges object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemTransportCharges object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemTransportCharges object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemTransportCharges object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemTransportCharges object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement(DataType:="date")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemOutwardProcessing object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemOutwardProcessing object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemOutwardProcessing object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemOutwardProcessing object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemOutwardProcessing object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemOutwardProcessing object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
XmlType(AnonymousType:=True)>
|
|
Public Enum DEXPDFGoodsShipmentGoodsItemOutwardProcessingReplacement
|
|
|
|
<XmlEnum("0")>
|
|
Item0
|
|
|
|
<XmlEnum("1")>
|
|
Item1
|
|
End Enum
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransference object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransference object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureTransference object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransference object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransference object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureTransference object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement("GoodsReference")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousing object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisation object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
XmlType(AnonymousType:=True)>
|
|
Public Enum DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingAuthorisationType
|
|
|
|
C517
|
|
|
|
C518
|
|
|
|
C519
|
|
End Enum
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReference object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
XmlType(AnonymousType:=True)>
|
|
Public Enum DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceAccessViaATLAS
|
|
|
|
<XmlEnum("0")>
|
|
Item0
|
|
|
|
<XmlEnum("1")>
|
|
Item1
|
|
End Enum
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
XmlType(AnonymousType:=True)>
|
|
Public Enum DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceUsualTreatment
|
|
|
|
<XmlEnum("0")>
|
|
Item0
|
|
|
|
<XmlEnum("1")>
|
|
Item1
|
|
End Enum
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodity object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCode object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityCommodityCodeNationalAdditionalCode object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReduction object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceCustomsWarehousingGoodsReferenceCommodityGoodsReductionAfterTreatment object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement("GoodsReference")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessing object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
XmlType(AnonymousType:=True)>
|
|
Public Enum DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingSimplyGrantedAuthorisation
|
|
|
|
<XmlEnum("0")>
|
|
Item0
|
|
|
|
<XmlEnum("1")>
|
|
Item1
|
|
End Enum
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisation object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
XmlType(AnonymousType:=True)>
|
|
Public Enum DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingAuthorisationType
|
|
|
|
C601
|
|
End Enum
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingCustomsOfficeOfSupervision object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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
|
|
|
|
<XmlElement(DataType:="integer")>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReference object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
XmlType(AnonymousType:=True)>
|
|
Public Enum DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceAccessViaATLAS
|
|
|
|
<XmlEnum("0")>
|
|
Item0
|
|
|
|
<XmlEnum("1")>
|
|
Item1
|
|
End Enum
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlType(AnonymousType:=True)>
|
|
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"
|
|
''' <summary>
|
|
''' Serialize DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object
|
|
''' </summary>
|
|
''' <returns>XML value</returns>
|
|
Public Overridable Function Serialize() As String
|
|
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
|
|
|
|
''' <summary>
|
|
''' Deserializes DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|
|
|
|
''' <summary>
|
|
''' Serializes current DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object into file
|
|
''' </summary>
|
|
''' <param name="fileName">full path of outupt xml file</param>
|
|
''' <param name="exception">output Exception value if failed</param>
|
|
''' <returns>true if can serialize and save into file; otherwise, false</returns>
|
|
Public Overridable Overloads Function SaveToFile(ByVal fileName As String, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
Try
|
|
SaveToFile(fileName)
|
|
Return True
|
|
Catch e As System.Exception
|
|
exception = e
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overridable Overloads Sub SaveToFile(ByVal fileName As String)
|
|
Dim streamWriter As StreamWriter = Nothing
|
|
Try
|
|
Dim dataString As String = Serialize()
|
|
Dim outputFile As FileInfo = New FileInfo(fileName)
|
|
streamWriter = outputFile.CreateText
|
|
streamWriter.WriteLine(dataString)
|
|
streamWriter.Close()
|
|
Finally
|
|
If (Not (streamWriter) Is Nothing) Then
|
|
streamWriter.Dispose()
|
|
End If
|
|
End Try
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Deserializes xml markup from file into an DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DEXPDFGoodsShipmentGoodsItemProcedureTransferenceInwardProcessingGoodsReferenceCommodity object</param>
|
|
''' <param name="exception">output Exception value if deserialize failed</param>
|
|
''' <returns>true if this Serializer can deserialize the object; otherwise, false</returns>
|
|
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
|