10506 lines
406 KiB
VB.net
10506 lines
406 KiB
VB.net
'' ------------------------------------------------------------------------------
|
|
'' <auto-generated>
|
|
'' Generated by Xsd2Code++. Version 6.0.0.0. www.xsd2code.com
|
|
'' {"TargetFramework":"Net47","NameSpace":"AusfuhrAnmeldung_004","Language":"VisualBasic","ExcludeImportedTypes":true,"ExpandNestedAttributeGroup":true,"GenerateUnusedComplexType":true,"GenerateUnusedSimpleType":true,"Properties":{},"XmlAttribute":{"Enabled":true},"ClassParams":{},"Serialization":{"ShouldSerialize":{},"AdditionalSerializers":{},"XmlSerializerEvent":{},"XmlOutput":{"Formating":true},"JsonOutput":{},"Enabled":true},"Miscellaneous":{}}
|
|
'' </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 AusfuhrAnmeldung_004
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlRoot("AusfuhrAnmeldung", [Namespace]:="", IsNullable:=False)>
|
|
Partial Public Class AusfuhrAnmeldungEGTyp
|
|
Inherits DatenaustauschExportTyp
|
|
|
|
#Region "Private fields"
|
|
Private _einzelAnmeldung As EinzelAusfuhrAnmeldungTyp
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me._einzelAnmeldung = New EinzelAusfuhrAnmeldungTyp()
|
|
End Sub
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property EinzelAnmeldung() As EinzelAusfuhrAnmeldungTyp
|
|
Get
|
|
Return Me._einzelAnmeldung
|
|
End Get
|
|
Set
|
|
Me._einzelAnmeldung = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AusfuhrAnmeldungEGTyp))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize AusfuhrAnmeldungEGTyp 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 AusfuhrAnmeldungEGTyp object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output AusfuhrAnmeldungEGTyp 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 AusfuhrAnmeldungEGTyp, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, AusfuhrAnmeldungEGTyp)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AusfuhrAnmeldungEGTyp) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As AusfuhrAnmeldungEGTyp
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AusfuhrAnmeldungEGTyp)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As AusfuhrAnmeldungEGTyp
|
|
Return CType(SerializerXml.Deserialize(s), AusfuhrAnmeldungEGTyp)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current AusfuhrAnmeldungEGTyp 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 AusfuhrAnmeldungEGTyp object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output AusfuhrAnmeldungEGTyp 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 AusfuhrAnmeldungEGTyp, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, AusfuhrAnmeldungEGTyp)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AusfuhrAnmeldungEGTyp) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AusfuhrAnmeldungEGTyp
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class EinzelAusfuhrAnmeldungTyp
|
|
|
|
#Region "Private fields"
|
|
Private _objektIdentifizierung As ObjektIdentifizierungEGTyp
|
|
|
|
Private _exportOperation As ExportOperationEGType
|
|
|
|
Private _goodsItem As List(Of GoodsItemEGType)
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me._goodsItem = New List(Of GoodsItemEGType)()
|
|
Me._exportOperation = New ExportOperationEGType()
|
|
Me._objektIdentifizierung = New ObjektIdentifizierungEGTyp()
|
|
End Sub
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ObjektIdentifizierung() As ObjektIdentifizierungEGTyp
|
|
Get
|
|
Return Me._objektIdentifizierung
|
|
End Get
|
|
Set
|
|
Me._objektIdentifizierung = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ExportOperation() As ExportOperationEGType
|
|
Get
|
|
Return Me._exportOperation
|
|
End Get
|
|
Set
|
|
Me._exportOperation = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("GoodsItem", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property GoodsItem() As List(Of GoodsItemEGType)
|
|
Get
|
|
Return Me._goodsItem
|
|
End Get
|
|
Set
|
|
Me._goodsItem = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(EinzelAusfuhrAnmeldungTyp))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize EinzelAusfuhrAnmeldungTyp 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 EinzelAusfuhrAnmeldungTyp object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output EinzelAusfuhrAnmeldungTyp 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 EinzelAusfuhrAnmeldungTyp, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, EinzelAusfuhrAnmeldungTyp)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As EinzelAusfuhrAnmeldungTyp) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As EinzelAusfuhrAnmeldungTyp
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), EinzelAusfuhrAnmeldungTyp)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As EinzelAusfuhrAnmeldungTyp
|
|
Return CType(SerializerXml.Deserialize(s), EinzelAusfuhrAnmeldungTyp)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current EinzelAusfuhrAnmeldungTyp 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 EinzelAusfuhrAnmeldungTyp object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output EinzelAusfuhrAnmeldungTyp 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 EinzelAusfuhrAnmeldungTyp, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, EinzelAusfuhrAnmeldungTyp)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As EinzelAusfuhrAnmeldungTyp) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As EinzelAusfuhrAnmeldungTyp
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class ObjektIdentifizierungEGTyp
|
|
|
|
#Region "Private fields"
|
|
Private _objektName As String
|
|
|
|
Private _objektAliasname As String
|
|
|
|
Private _bezugsnummerVorblendung As String
|
|
|
|
Private _kopieVon As String
|
|
|
|
Private _objektAktion As List(Of String)
|
|
|
|
Private _compliancePruefung As String
|
|
|
|
Private _bearbeiter As String
|
|
|
|
Private _absenderSystemName As String
|
|
|
|
Private _shipmentReferenz As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me._objektAktion = New List(Of String)()
|
|
End Sub
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ObjektName() As String
|
|
Get
|
|
Return Me._objektName
|
|
End Get
|
|
Set
|
|
Me._objektName = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ObjektAliasname() As String
|
|
Get
|
|
Return Me._objektAliasname
|
|
End Get
|
|
Set
|
|
Me._objektAliasname = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property BezugsnummerVorblendung() As String
|
|
Get
|
|
Return Me._bezugsnummerVorblendung
|
|
End Get
|
|
Set
|
|
Me._bezugsnummerVorblendung = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property KopieVon() As String
|
|
Get
|
|
Return Me._kopieVon
|
|
End Get
|
|
Set
|
|
Me._kopieVon = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("ObjektAktion", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ObjektAktion() As List(Of String)
|
|
Get
|
|
Return Me._objektAktion
|
|
End Get
|
|
Set
|
|
Me._objektAktion = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property CompliancePruefung() As String
|
|
Get
|
|
Return Me._compliancePruefung
|
|
End Get
|
|
Set
|
|
Me._compliancePruefung = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Bearbeiter() As String
|
|
Get
|
|
Return Me._bearbeiter
|
|
End Get
|
|
Set
|
|
Me._bearbeiter = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property AbsenderSystemName() As String
|
|
Get
|
|
Return Me._absenderSystemName
|
|
End Get
|
|
Set
|
|
Me._absenderSystemName = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ShipmentReferenz() As String
|
|
Get
|
|
Return Me._shipmentReferenz
|
|
End Get
|
|
Set
|
|
Me._shipmentReferenz = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ObjektIdentifizierungEGTyp))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize ObjektIdentifizierungEGTyp 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 ObjektIdentifizierungEGTyp object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output ObjektIdentifizierungEGTyp 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 ObjektIdentifizierungEGTyp, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, ObjektIdentifizierungEGTyp)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ObjektIdentifizierungEGTyp) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As ObjektIdentifizierungEGTyp
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ObjektIdentifizierungEGTyp)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As ObjektIdentifizierungEGTyp
|
|
Return CType(SerializerXml.Deserialize(s), ObjektIdentifizierungEGTyp)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current ObjektIdentifizierungEGTyp 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 ObjektIdentifizierungEGTyp object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output ObjektIdentifizierungEGTyp 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 ObjektIdentifizierungEGTyp, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, ObjektIdentifizierungEGTyp)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ObjektIdentifizierungEGTyp) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ObjektIdentifizierungEGTyp
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class InwardProcessingGoodsReferenceEGType
|
|
|
|
#Region "Private fields"
|
|
Private _goodsItemNumber As String
|
|
|
|
Private _mRN As String
|
|
|
|
Private _registrationNumber As String
|
|
|
|
Private _accessViaATLAS As String
|
|
|
|
Private _goodsRelatedData As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property GoodsItemNumber() As String
|
|
Get
|
|
Return Me._goodsItemNumber
|
|
End Get
|
|
Set
|
|
Me._goodsItemNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property MRN() As String
|
|
Get
|
|
Return Me._mRN
|
|
End Get
|
|
Set
|
|
Me._mRN = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property RegistrationNumber() As String
|
|
Get
|
|
Return Me._registrationNumber
|
|
End Get
|
|
Set
|
|
Me._registrationNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property AccessViaATLAS() As String
|
|
Get
|
|
Return Me._accessViaATLAS
|
|
End Get
|
|
Set
|
|
Me._accessViaATLAS = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property GoodsRelatedData() As String
|
|
Get
|
|
Return Me._goodsRelatedData
|
|
End Get
|
|
Set
|
|
Me._goodsRelatedData = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(InwardProcessingGoodsReferenceEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize InwardProcessingGoodsReferenceEGType 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 InwardProcessingGoodsReferenceEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output InwardProcessingGoodsReferenceEGType 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 InwardProcessingGoodsReferenceEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, InwardProcessingGoodsReferenceEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As InwardProcessingGoodsReferenceEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As InwardProcessingGoodsReferenceEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), InwardProcessingGoodsReferenceEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As InwardProcessingGoodsReferenceEGType
|
|
Return CType(SerializerXml.Deserialize(s), InwardProcessingGoodsReferenceEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current InwardProcessingGoodsReferenceEGType 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 InwardProcessingGoodsReferenceEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output InwardProcessingGoodsReferenceEGType 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 InwardProcessingGoodsReferenceEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, InwardProcessingGoodsReferenceEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As InwardProcessingGoodsReferenceEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As InwardProcessingGoodsReferenceEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class InwardProcessingEGType
|
|
|
|
#Region "Private fields"
|
|
Private _simplyGrantedAuthorisation As String
|
|
|
|
Private _customsOfficeOfSupervision As String
|
|
|
|
Private _typeOfAuthorisation As String
|
|
|
|
Private _referenceNumber As String
|
|
|
|
Private _goodsReference As List(Of InwardProcessingGoodsReferenceEGType)
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me._goodsReference = New List(Of InwardProcessingGoodsReferenceEGType)()
|
|
End Sub
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property SimplyGrantedAuthorisation() As String
|
|
Get
|
|
Return Me._simplyGrantedAuthorisation
|
|
End Get
|
|
Set
|
|
Me._simplyGrantedAuthorisation = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property CustomsOfficeOfSupervision() As String
|
|
Get
|
|
Return Me._customsOfficeOfSupervision
|
|
End Get
|
|
Set
|
|
Me._customsOfficeOfSupervision = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property TypeOfAuthorisation() As String
|
|
Get
|
|
Return Me._typeOfAuthorisation
|
|
End Get
|
|
Set
|
|
Me._typeOfAuthorisation = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ReferenceNumber() As String
|
|
Get
|
|
Return Me._referenceNumber
|
|
End Get
|
|
Set
|
|
Me._referenceNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("GoodsReference", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property GoodsReference() As List(Of InwardProcessingGoodsReferenceEGType)
|
|
Get
|
|
Return Me._goodsReference
|
|
End Get
|
|
Set
|
|
Me._goodsReference = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(InwardProcessingEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize InwardProcessingEGType 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 InwardProcessingEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output InwardProcessingEGType 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 InwardProcessingEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, InwardProcessingEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As InwardProcessingEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As InwardProcessingEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), InwardProcessingEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As InwardProcessingEGType
|
|
Return CType(SerializerXml.Deserialize(s), InwardProcessingEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current InwardProcessingEGType 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 InwardProcessingEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output InwardProcessingEGType 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 InwardProcessingEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, InwardProcessingEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As InwardProcessingEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As InwardProcessingEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class GoodsReductionAfterTreatmentEGType
|
|
|
|
#Region "Private fields"
|
|
Private _quantity As String
|
|
|
|
Private _measurementUnit As String
|
|
|
|
Private _qualifier As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Quantity() As String
|
|
Get
|
|
Return Me._quantity
|
|
End Get
|
|
Set
|
|
Me._quantity = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property MeasurementUnit() As String
|
|
Get
|
|
Return Me._measurementUnit
|
|
End Get
|
|
Set
|
|
Me._measurementUnit = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Qualifier() As String
|
|
Get
|
|
Return Me._qualifier
|
|
End Get
|
|
Set
|
|
Me._qualifier = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(GoodsReductionAfterTreatmentEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize GoodsReductionAfterTreatmentEGType 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 GoodsReductionAfterTreatmentEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output GoodsReductionAfterTreatmentEGType 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 GoodsReductionAfterTreatmentEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, GoodsReductionAfterTreatmentEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GoodsReductionAfterTreatmentEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As GoodsReductionAfterTreatmentEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), GoodsReductionAfterTreatmentEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As GoodsReductionAfterTreatmentEGType
|
|
Return CType(SerializerXml.Deserialize(s), GoodsReductionAfterTreatmentEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current GoodsReductionAfterTreatmentEGType 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 GoodsReductionAfterTreatmentEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output GoodsReductionAfterTreatmentEGType 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 GoodsReductionAfterTreatmentEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, GoodsReductionAfterTreatmentEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GoodsReductionAfterTreatmentEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As GoodsReductionAfterTreatmentEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class GoodsReductionEGType
|
|
|
|
#Region "Private fields"
|
|
Private _quantity As String
|
|
|
|
Private _measurementUnit As String
|
|
|
|
Private _qualifier As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Quantity() As String
|
|
Get
|
|
Return Me._quantity
|
|
End Get
|
|
Set
|
|
Me._quantity = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property MeasurementUnit() As String
|
|
Get
|
|
Return Me._measurementUnit
|
|
End Get
|
|
Set
|
|
Me._measurementUnit = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Qualifier() As String
|
|
Get
|
|
Return Me._qualifier
|
|
End Get
|
|
Set
|
|
Me._qualifier = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(GoodsReductionEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize GoodsReductionEGType 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 GoodsReductionEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output GoodsReductionEGType 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 GoodsReductionEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, GoodsReductionEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GoodsReductionEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As GoodsReductionEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), GoodsReductionEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As GoodsReductionEGType
|
|
Return CType(SerializerXml.Deserialize(s), GoodsReductionEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current GoodsReductionEGType 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 GoodsReductionEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output GoodsReductionEGType 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 GoodsReductionEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, GoodsReductionEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GoodsReductionEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As GoodsReductionEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class CustomsWarehousingGoodsReferenceEGType
|
|
|
|
#Region "Private fields"
|
|
Private _goodsItemNumber As String
|
|
|
|
Private _mRN As String
|
|
|
|
Private _registrationNumber As String
|
|
|
|
Private _articleCode As String
|
|
|
|
Private _owner As String
|
|
|
|
Private _chargeNumber As String
|
|
|
|
Private _countryOfOrigin As String
|
|
|
|
Private _netMass As String
|
|
|
|
Private _statisticalValue As String
|
|
|
|
Private _quantity As String
|
|
|
|
Private _commodityCode As String
|
|
|
|
Private _usualTreatment As String
|
|
|
|
Private _accessViaATLAS As String
|
|
|
|
Private _complementOfInformation As String
|
|
|
|
Private _goodsReduction As GoodsReductionEGType
|
|
|
|
Private _goodsReductionAfterTreatment As GoodsReductionAfterTreatmentEGType
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me._goodsReductionAfterTreatment = New GoodsReductionAfterTreatmentEGType()
|
|
Me._goodsReduction = New GoodsReductionEGType()
|
|
End Sub
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property GoodsItemNumber() As String
|
|
Get
|
|
Return Me._goodsItemNumber
|
|
End Get
|
|
Set
|
|
Me._goodsItemNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property MRN() As String
|
|
Get
|
|
Return Me._mRN
|
|
End Get
|
|
Set
|
|
Me._mRN = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property RegistrationNumber() As String
|
|
Get
|
|
Return Me._registrationNumber
|
|
End Get
|
|
Set
|
|
Me._registrationNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ArticleCode() As String
|
|
Get
|
|
Return Me._articleCode
|
|
End Get
|
|
Set
|
|
Me._articleCode = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Owner() As String
|
|
Get
|
|
Return Me._owner
|
|
End Get
|
|
Set
|
|
Me._owner = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ChargeNumber() As String
|
|
Get
|
|
Return Me._chargeNumber
|
|
End Get
|
|
Set
|
|
Me._chargeNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property CountryOfOrigin() As String
|
|
Get
|
|
Return Me._countryOfOrigin
|
|
End Get
|
|
Set
|
|
Me._countryOfOrigin = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property NetMass() As String
|
|
Get
|
|
Return Me._netMass
|
|
End Get
|
|
Set
|
|
Me._netMass = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property StatisticalValue() As String
|
|
Get
|
|
Return Me._statisticalValue
|
|
End Get
|
|
Set
|
|
Me._statisticalValue = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Quantity() As String
|
|
Get
|
|
Return Me._quantity
|
|
End Get
|
|
Set
|
|
Me._quantity = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property CommodityCode() As String
|
|
Get
|
|
Return Me._commodityCode
|
|
End Get
|
|
Set
|
|
Me._commodityCode = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property UsualTreatment() As String
|
|
Get
|
|
Return Me._usualTreatment
|
|
End Get
|
|
Set
|
|
Me._usualTreatment = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property AccessViaATLAS() As String
|
|
Get
|
|
Return Me._accessViaATLAS
|
|
End Get
|
|
Set
|
|
Me._accessViaATLAS = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ComplementOfInformation() As String
|
|
Get
|
|
Return Me._complementOfInformation
|
|
End Get
|
|
Set
|
|
Me._complementOfInformation = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property GoodsReduction() As GoodsReductionEGType
|
|
Get
|
|
Return Me._goodsReduction
|
|
End Get
|
|
Set
|
|
Me._goodsReduction = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property GoodsReductionAfterTreatment() As GoodsReductionAfterTreatmentEGType
|
|
Get
|
|
Return Me._goodsReductionAfterTreatment
|
|
End Get
|
|
Set
|
|
Me._goodsReductionAfterTreatment = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(CustomsWarehousingGoodsReferenceEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize CustomsWarehousingGoodsReferenceEGType 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 CustomsWarehousingGoodsReferenceEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output CustomsWarehousingGoodsReferenceEGType 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 CustomsWarehousingGoodsReferenceEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, CustomsWarehousingGoodsReferenceEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CustomsWarehousingGoodsReferenceEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As CustomsWarehousingGoodsReferenceEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CustomsWarehousingGoodsReferenceEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As CustomsWarehousingGoodsReferenceEGType
|
|
Return CType(SerializerXml.Deserialize(s), CustomsWarehousingGoodsReferenceEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current CustomsWarehousingGoodsReferenceEGType 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 CustomsWarehousingGoodsReferenceEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output CustomsWarehousingGoodsReferenceEGType 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 CustomsWarehousingGoodsReferenceEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, CustomsWarehousingGoodsReferenceEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CustomsWarehousingGoodsReferenceEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As CustomsWarehousingGoodsReferenceEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class CustomsWarehousingEGType
|
|
|
|
#Region "Private fields"
|
|
Private _typeOfAuthorisation As String
|
|
|
|
Private _referenceNumber As String
|
|
|
|
Private _lRN As String
|
|
|
|
Private _goodsReference As List(Of CustomsWarehousingGoodsReferenceEGType)
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me._goodsReference = New List(Of CustomsWarehousingGoodsReferenceEGType)()
|
|
End Sub
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property TypeOfAuthorisation() As String
|
|
Get
|
|
Return Me._typeOfAuthorisation
|
|
End Get
|
|
Set
|
|
Me._typeOfAuthorisation = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ReferenceNumber() As String
|
|
Get
|
|
Return Me._referenceNumber
|
|
End Get
|
|
Set
|
|
Me._referenceNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property LRN() As String
|
|
Get
|
|
Return Me._lRN
|
|
End Get
|
|
Set
|
|
Me._lRN = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("GoodsReference", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property GoodsReference() As List(Of CustomsWarehousingGoodsReferenceEGType)
|
|
Get
|
|
Return Me._goodsReference
|
|
End Get
|
|
Set
|
|
Me._goodsReference = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(CustomsWarehousingEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize CustomsWarehousingEGType 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 CustomsWarehousingEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output CustomsWarehousingEGType 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 CustomsWarehousingEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, CustomsWarehousingEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CustomsWarehousingEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As CustomsWarehousingEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CustomsWarehousingEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As CustomsWarehousingEGType
|
|
Return CType(SerializerXml.Deserialize(s), CustomsWarehousingEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current CustomsWarehousingEGType 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 CustomsWarehousingEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output CustomsWarehousingEGType 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 CustomsWarehousingEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, CustomsWarehousingEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CustomsWarehousingEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As CustomsWarehousingEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class ProcedureTransferenceEGType
|
|
|
|
#Region "Private fields"
|
|
Private _customsWarehousing As CustomsWarehousingEGType
|
|
|
|
Private _inwardProcessing As InwardProcessingEGType
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me._inwardProcessing = New InwardProcessingEGType()
|
|
Me._customsWarehousing = New CustomsWarehousingEGType()
|
|
End Sub
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property CustomsWarehousing() As CustomsWarehousingEGType
|
|
Get
|
|
Return Me._customsWarehousing
|
|
End Get
|
|
Set
|
|
Me._customsWarehousing = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property InwardProcessing() As InwardProcessingEGType
|
|
Get
|
|
Return Me._inwardProcessing
|
|
End Get
|
|
Set
|
|
Me._inwardProcessing = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ProcedureTransferenceEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize ProcedureTransferenceEGType 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 ProcedureTransferenceEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output ProcedureTransferenceEGType 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 ProcedureTransferenceEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, ProcedureTransferenceEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ProcedureTransferenceEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As ProcedureTransferenceEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ProcedureTransferenceEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As ProcedureTransferenceEGType
|
|
Return CType(SerializerXml.Deserialize(s), ProcedureTransferenceEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current ProcedureTransferenceEGType 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 ProcedureTransferenceEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output ProcedureTransferenceEGType 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 ProcedureTransferenceEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, ProcedureTransferenceEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ProcedureTransferenceEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ProcedureTransferenceEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class SupportingDocumentGoodsItemEGType
|
|
|
|
#Region "Private fields"
|
|
Private _type As String
|
|
|
|
Private _qualifier As String
|
|
|
|
Private _referenceNumber As String
|
|
|
|
Private _documentLineItemNumber As String
|
|
|
|
Private _issuingAuthorityName As String
|
|
|
|
Private _complementOfInformation As String
|
|
|
|
Private _detail As String
|
|
|
|
Private _issuingDate As Date
|
|
|
|
Private _validityDate As Date
|
|
|
|
Private _amount As String
|
|
|
|
Private _currency As String
|
|
|
|
Private _quantity As String
|
|
|
|
Private _measurementUnitAndQualifier As String
|
|
|
|
Private _complementaryUnit As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Type() As String
|
|
Get
|
|
Return Me._type
|
|
End Get
|
|
Set
|
|
Me._type = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Qualifier() As String
|
|
Get
|
|
Return Me._qualifier
|
|
End Get
|
|
Set
|
|
Me._qualifier = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ReferenceNumber() As String
|
|
Get
|
|
Return Me._referenceNumber
|
|
End Get
|
|
Set
|
|
Me._referenceNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property DocumentLineItemNumber() As String
|
|
Get
|
|
Return Me._documentLineItemNumber
|
|
End Get
|
|
Set
|
|
Me._documentLineItemNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property IssuingAuthorityName() As String
|
|
Get
|
|
Return Me._issuingAuthorityName
|
|
End Get
|
|
Set
|
|
Me._issuingAuthorityName = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ComplementOfInformation() As String
|
|
Get
|
|
Return Me._complementOfInformation
|
|
End Get
|
|
Set
|
|
Me._complementOfInformation = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Detail() As String
|
|
Get
|
|
Return Me._detail
|
|
End Get
|
|
Set
|
|
Me._detail = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="date")>
|
|
Public Property IssuingDate() As Date
|
|
Get
|
|
Return Me._issuingDate
|
|
End Get
|
|
Set
|
|
Me._issuingDate = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="date")>
|
|
Public Property ValidityDate() As Date
|
|
Get
|
|
Return Me._validityDate
|
|
End Get
|
|
Set
|
|
Me._validityDate = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Amount() As String
|
|
Get
|
|
Return Me._amount
|
|
End Get
|
|
Set
|
|
Me._amount = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Currency() As String
|
|
Get
|
|
Return Me._currency
|
|
End Get
|
|
Set
|
|
Me._currency = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Quantity() As String
|
|
Get
|
|
Return Me._quantity
|
|
End Get
|
|
Set
|
|
Me._quantity = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property MeasurementUnitAndQualifier() As String
|
|
Get
|
|
Return Me._measurementUnitAndQualifier
|
|
End Get
|
|
Set
|
|
Me._measurementUnitAndQualifier = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ComplementaryUnit() As String
|
|
Get
|
|
Return Me._complementaryUnit
|
|
End Get
|
|
Set
|
|
Me._complementaryUnit = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(SupportingDocumentGoodsItemEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize SupportingDocumentGoodsItemEGType 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 SupportingDocumentGoodsItemEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output SupportingDocumentGoodsItemEGType 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 SupportingDocumentGoodsItemEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, SupportingDocumentGoodsItemEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SupportingDocumentGoodsItemEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As SupportingDocumentGoodsItemEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), SupportingDocumentGoodsItemEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As SupportingDocumentGoodsItemEGType
|
|
Return CType(SerializerXml.Deserialize(s), SupportingDocumentGoodsItemEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current SupportingDocumentGoodsItemEGType 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 SupportingDocumentGoodsItemEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output SupportingDocumentGoodsItemEGType 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 SupportingDocumentGoodsItemEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, SupportingDocumentGoodsItemEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SupportingDocumentGoodsItemEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As SupportingDocumentGoodsItemEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class OutwardProcessingGoodsItemEGType
|
|
|
|
#Region "Private fields"
|
|
Private _replacement As String
|
|
|
|
Private _reimportDate As Date
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Replacement() As String
|
|
Get
|
|
Return Me._replacement
|
|
End Get
|
|
Set
|
|
Me._replacement = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, 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(OutwardProcessingGoodsItemEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize OutwardProcessingGoodsItemEGType 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 OutwardProcessingGoodsItemEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output OutwardProcessingGoodsItemEGType 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 OutwardProcessingGoodsItemEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, OutwardProcessingGoodsItemEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As OutwardProcessingGoodsItemEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As OutwardProcessingGoodsItemEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), OutwardProcessingGoodsItemEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As OutwardProcessingGoodsItemEGType
|
|
Return CType(SerializerXml.Deserialize(s), OutwardProcessingGoodsItemEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current OutwardProcessingGoodsItemEGType 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 OutwardProcessingGoodsItemEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output OutwardProcessingGoodsItemEGType 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 OutwardProcessingGoodsItemEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, OutwardProcessingGoodsItemEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As OutwardProcessingGoodsItemEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As OutwardProcessingGoodsItemEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class PackagingEGType
|
|
|
|
#Region "Private fields"
|
|
Private _numberOfPackages As String
|
|
|
|
Private _typeOfPackages As String
|
|
|
|
Private _shippingMarks As String
|
|
|
|
Private _packageReference As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property NumberOfPackages() As String
|
|
Get
|
|
Return Me._numberOfPackages
|
|
End Get
|
|
Set
|
|
Me._numberOfPackages = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property TypeOfPackages() As String
|
|
Get
|
|
Return Me._typeOfPackages
|
|
End Get
|
|
Set
|
|
Me._typeOfPackages = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ShippingMarks() As String
|
|
Get
|
|
Return Me._shippingMarks
|
|
End Get
|
|
Set
|
|
Me._shippingMarks = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property PackageReference() As String
|
|
Get
|
|
Return Me._packageReference
|
|
End Get
|
|
Set
|
|
Me._packageReference = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PackagingEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize PackagingEGType 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 PackagingEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output PackagingEGType 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 PackagingEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, PackagingEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PackagingEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As PackagingEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PackagingEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As PackagingEGType
|
|
Return CType(SerializerXml.Deserialize(s), PackagingEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current PackagingEGType 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 PackagingEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output PackagingEGType 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 PackagingEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, PackagingEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PackagingEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PackagingEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class PreviousDocumentGoodsItemEGType
|
|
|
|
#Region "Private fields"
|
|
Private _type As String
|
|
|
|
Private _qualifier As String
|
|
|
|
Private _referenceNumber As String
|
|
|
|
Private _goodsItemNumber As String
|
|
|
|
Private _measurementUnitAndQualifier As String
|
|
|
|
Private _quantity As String
|
|
|
|
Private _complementOfInformation As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Type() As String
|
|
Get
|
|
Return Me._type
|
|
End Get
|
|
Set
|
|
Me._type = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Qualifier() As String
|
|
Get
|
|
Return Me._qualifier
|
|
End Get
|
|
Set
|
|
Me._qualifier = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ReferenceNumber() As String
|
|
Get
|
|
Return Me._referenceNumber
|
|
End Get
|
|
Set
|
|
Me._referenceNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property GoodsItemNumber() As String
|
|
Get
|
|
Return Me._goodsItemNumber
|
|
End Get
|
|
Set
|
|
Me._goodsItemNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property MeasurementUnitAndQualifier() As String
|
|
Get
|
|
Return Me._measurementUnitAndQualifier
|
|
End Get
|
|
Set
|
|
Me._measurementUnitAndQualifier = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Quantity() As String
|
|
Get
|
|
Return Me._quantity
|
|
End Get
|
|
Set
|
|
Me._quantity = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ComplementOfInformation() As String
|
|
Get
|
|
Return Me._complementOfInformation
|
|
End Get
|
|
Set
|
|
Me._complementOfInformation = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PreviousDocumentGoodsItemEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize PreviousDocumentGoodsItemEGType 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 PreviousDocumentGoodsItemEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output PreviousDocumentGoodsItemEGType 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 PreviousDocumentGoodsItemEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, PreviousDocumentGoodsItemEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PreviousDocumentGoodsItemEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As PreviousDocumentGoodsItemEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PreviousDocumentGoodsItemEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As PreviousDocumentGoodsItemEGType
|
|
Return CType(SerializerXml.Deserialize(s), PreviousDocumentGoodsItemEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current PreviousDocumentGoodsItemEGType 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 PreviousDocumentGoodsItemEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output PreviousDocumentGoodsItemEGType 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 PreviousDocumentGoodsItemEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, PreviousDocumentGoodsItemEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PreviousDocumentGoodsItemEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PreviousDocumentGoodsItemEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class GoodsItemEGType
|
|
|
|
#Region "Private fields"
|
|
Private _declarationGoodsItemNumber As String
|
|
|
|
Private _articleNumber As String
|
|
|
|
Private _commodityCode As String
|
|
|
|
Private _taricAdditionalCode As List(Of String)
|
|
|
|
Private _descriptionOfGoods As String
|
|
|
|
Private _cusCode As String
|
|
|
|
Private _registrationNumberExternal As String
|
|
|
|
Private _additionalInformation As List(Of AdditionalInformationEGType)
|
|
|
|
Private _referenceNumberUCR As String
|
|
|
|
Private _authorisation As List(Of AuthorisationGoodsItemEGType)
|
|
|
|
Private _additionalSupplyChainActor As List(Of AdditionalSupplyChainActorEGType)
|
|
|
|
Private _regionOfDispatch As String
|
|
|
|
Private _countryOfOrigin As String
|
|
|
|
Private _netMass As String
|
|
|
|
Private _grossMass As String
|
|
|
|
Private _uNNumber As List(Of String)
|
|
|
|
Private _transportCharges As String
|
|
|
|
Private _countryOfExport As String
|
|
|
|
Private _requestedProcedure As String
|
|
|
|
Private _previousProcedure As String
|
|
|
|
Private _additionalProcedure As String
|
|
|
|
Private _supplementaryUnits As String
|
|
|
|
Private _statisticalValue As String
|
|
|
|
Private _currencyStatisticalValue As String
|
|
|
|
Private _previousDocument As List(Of PreviousDocumentGoodsItemEGType)
|
|
|
|
Private _packaging As List(Of PackagingEGType)
|
|
|
|
Private _outwardProcessing As OutwardProcessingGoodsItemEGType
|
|
|
|
Private _supportingDocument As List(Of SupportingDocumentGoodsItemEGType)
|
|
|
|
Private _additionalReference As List(Of AdditionalReferenceGoodsItemEGType)
|
|
|
|
Private _consignee As AddressEGType
|
|
|
|
Private _consignor As AddressEGType
|
|
|
|
Private _procedureTransference As ProcedureTransferenceEGType
|
|
|
|
Private _natureOfTransaction As String
|
|
|
|
Private _applicationInternalData As ApplicationInternalDataType
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me._applicationInternalData = New ApplicationInternalDataType()
|
|
Me._procedureTransference = New ProcedureTransferenceEGType()
|
|
Me._consignor = New AddressEGType()
|
|
Me._consignee = New AddressEGType()
|
|
Me._additionalReference = New List(Of AdditionalReferenceGoodsItemEGType)()
|
|
Me._supportingDocument = New List(Of SupportingDocumentGoodsItemEGType)()
|
|
Me._outwardProcessing = New OutwardProcessingGoodsItemEGType()
|
|
Me._packaging = New List(Of PackagingEGType)()
|
|
Me._previousDocument = New List(Of PreviousDocumentGoodsItemEGType)()
|
|
Me._uNNumber = New List(Of String)()
|
|
Me._additionalSupplyChainActor = New List(Of AdditionalSupplyChainActorEGType)()
|
|
Me._authorisation = New List(Of AuthorisationGoodsItemEGType)()
|
|
Me._additionalInformation = New List(Of AdditionalInformationEGType)()
|
|
Me._taricAdditionalCode = New List(Of String)()
|
|
End Sub
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property DeclarationGoodsItemNumber() As String
|
|
Get
|
|
Return Me._declarationGoodsItemNumber
|
|
End Get
|
|
Set
|
|
Me._declarationGoodsItemNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ArticleNumber() As String
|
|
Get
|
|
Return Me._articleNumber
|
|
End Get
|
|
Set
|
|
Me._articleNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property CommodityCode() As String
|
|
Get
|
|
Return Me._commodityCode
|
|
End Get
|
|
Set
|
|
Me._commodityCode = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("TaricAdditionalCode", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property TaricAdditionalCode() As List(Of String)
|
|
Get
|
|
Return Me._taricAdditionalCode
|
|
End Get
|
|
Set
|
|
Me._taricAdditionalCode = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property DescriptionOfGoods() As String
|
|
Get
|
|
Return Me._descriptionOfGoods
|
|
End Get
|
|
Set
|
|
Me._descriptionOfGoods = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property CusCode() As String
|
|
Get
|
|
Return Me._cusCode
|
|
End Get
|
|
Set
|
|
Me._cusCode = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property RegistrationNumberExternal() As String
|
|
Get
|
|
Return Me._registrationNumberExternal
|
|
End Get
|
|
Set
|
|
Me._registrationNumberExternal = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("AdditionalInformation", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property AdditionalInformation() As List(Of AdditionalInformationEGType)
|
|
Get
|
|
Return Me._additionalInformation
|
|
End Get
|
|
Set
|
|
Me._additionalInformation = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ReferenceNumberUCR() As String
|
|
Get
|
|
Return Me._referenceNumberUCR
|
|
End Get
|
|
Set
|
|
Me._referenceNumberUCR = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("Authorisation", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Authorisation() As List(Of AuthorisationGoodsItemEGType)
|
|
Get
|
|
Return Me._authorisation
|
|
End Get
|
|
Set
|
|
Me._authorisation = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("AdditionalSupplyChainActor", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property AdditionalSupplyChainActor() As List(Of AdditionalSupplyChainActorEGType)
|
|
Get
|
|
Return Me._additionalSupplyChainActor
|
|
End Get
|
|
Set
|
|
Me._additionalSupplyChainActor = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property RegionOfDispatch() As String
|
|
Get
|
|
Return Me._regionOfDispatch
|
|
End Get
|
|
Set
|
|
Me._regionOfDispatch = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property CountryOfOrigin() As String
|
|
Get
|
|
Return Me._countryOfOrigin
|
|
End Get
|
|
Set
|
|
Me._countryOfOrigin = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property NetMass() As String
|
|
Get
|
|
Return Me._netMass
|
|
End Get
|
|
Set
|
|
Me._netMass = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property GrossMass() As String
|
|
Get
|
|
Return Me._grossMass
|
|
End Get
|
|
Set
|
|
Me._grossMass = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("UNNumber", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property UNNumber() As List(Of String)
|
|
Get
|
|
Return Me._uNNumber
|
|
End Get
|
|
Set
|
|
Me._uNNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property TransportCharges() As String
|
|
Get
|
|
Return Me._transportCharges
|
|
End Get
|
|
Set
|
|
Me._transportCharges = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property CountryOfExport() As String
|
|
Get
|
|
Return Me._countryOfExport
|
|
End Get
|
|
Set
|
|
Me._countryOfExport = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property RequestedProcedure() As String
|
|
Get
|
|
Return Me._requestedProcedure
|
|
End Get
|
|
Set
|
|
Me._requestedProcedure = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property PreviousProcedure() As String
|
|
Get
|
|
Return Me._previousProcedure
|
|
End Get
|
|
Set
|
|
Me._previousProcedure = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property AdditionalProcedure() As String
|
|
Get
|
|
Return Me._additionalProcedure
|
|
End Get
|
|
Set
|
|
Me._additionalProcedure = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property SupplementaryUnits() As String
|
|
Get
|
|
Return Me._supplementaryUnits
|
|
End Get
|
|
Set
|
|
Me._supplementaryUnits = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property StatisticalValue() As String
|
|
Get
|
|
Return Me._statisticalValue
|
|
End Get
|
|
Set
|
|
Me._statisticalValue = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property CurrencyStatisticalValue() As String
|
|
Get
|
|
Return Me._currencyStatisticalValue
|
|
End Get
|
|
Set
|
|
Me._currencyStatisticalValue = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("PreviousDocument", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property PreviousDocument() As List(Of PreviousDocumentGoodsItemEGType)
|
|
Get
|
|
Return Me._previousDocument
|
|
End Get
|
|
Set
|
|
Me._previousDocument = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("Packaging", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Packaging() As List(Of PackagingEGType)
|
|
Get
|
|
Return Me._packaging
|
|
End Get
|
|
Set
|
|
Me._packaging = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property OutwardProcessing() As OutwardProcessingGoodsItemEGType
|
|
Get
|
|
Return Me._outwardProcessing
|
|
End Get
|
|
Set
|
|
Me._outwardProcessing = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("SupportingDocument", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property SupportingDocument() As List(Of SupportingDocumentGoodsItemEGType)
|
|
Get
|
|
Return Me._supportingDocument
|
|
End Get
|
|
Set
|
|
Me._supportingDocument = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("AdditionalReference", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property AdditionalReference() As List(Of AdditionalReferenceGoodsItemEGType)
|
|
Get
|
|
Return Me._additionalReference
|
|
End Get
|
|
Set
|
|
Me._additionalReference = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Consignee() As AddressEGType
|
|
Get
|
|
Return Me._consignee
|
|
End Get
|
|
Set
|
|
Me._consignee = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Consignor() As AddressEGType
|
|
Get
|
|
Return Me._consignor
|
|
End Get
|
|
Set
|
|
Me._consignor = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ProcedureTransference() As ProcedureTransferenceEGType
|
|
Get
|
|
Return Me._procedureTransference
|
|
End Get
|
|
Set
|
|
Me._procedureTransference = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property NatureOfTransaction() As String
|
|
Get
|
|
Return Me._natureOfTransaction
|
|
End Get
|
|
Set
|
|
Me._natureOfTransaction = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ApplicationInternalData() As ApplicationInternalDataType
|
|
Get
|
|
Return Me._applicationInternalData
|
|
End Get
|
|
Set
|
|
Me._applicationInternalData = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(GoodsItemEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize GoodsItemEGType 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 GoodsItemEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output GoodsItemEGType 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 GoodsItemEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, GoodsItemEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As GoodsItemEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As GoodsItemEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), GoodsItemEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As GoodsItemEGType
|
|
Return CType(SerializerXml.Deserialize(s), GoodsItemEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current GoodsItemEGType 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 GoodsItemEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output GoodsItemEGType 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 GoodsItemEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, GoodsItemEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As GoodsItemEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As GoodsItemEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class AdditionalInformationEGType
|
|
|
|
#Region "Private fields"
|
|
Private _code As String
|
|
|
|
Private _text As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Code() As String
|
|
Get
|
|
Return Me._code
|
|
End Get
|
|
Set
|
|
Me._code = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Text() As String
|
|
Get
|
|
Return Me._text
|
|
End Get
|
|
Set
|
|
Me._text = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdditionalInformationEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize AdditionalInformationEGType 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 AdditionalInformationEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output AdditionalInformationEGType 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 AdditionalInformationEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, AdditionalInformationEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalInformationEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As AdditionalInformationEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalInformationEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdditionalInformationEGType
|
|
Return CType(SerializerXml.Deserialize(s), AdditionalInformationEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current AdditionalInformationEGType 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 AdditionalInformationEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output AdditionalInformationEGType 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 AdditionalInformationEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, AdditionalInformationEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalInformationEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdditionalInformationEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class AuthorisationGoodsItemEGType
|
|
Inherits AuthorisationEGType
|
|
|
|
#Region "Private fields"
|
|
Private _holderOfAuthorisation As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property HolderOfAuthorisation() As String
|
|
Get
|
|
Return Me._holderOfAuthorisation
|
|
End Get
|
|
Set
|
|
Me._holderOfAuthorisation = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AuthorisationGoodsItemEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize AuthorisationGoodsItemEGType 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 AuthorisationGoodsItemEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output AuthorisationGoodsItemEGType 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 AuthorisationGoodsItemEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, AuthorisationGoodsItemEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AuthorisationGoodsItemEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As AuthorisationGoodsItemEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AuthorisationGoodsItemEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As AuthorisationGoodsItemEGType
|
|
Return CType(SerializerXml.Deserialize(s), AuthorisationGoodsItemEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current AuthorisationGoodsItemEGType 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 AuthorisationGoodsItemEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output AuthorisationGoodsItemEGType 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 AuthorisationGoodsItemEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, AuthorisationGoodsItemEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AuthorisationGoodsItemEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AuthorisationGoodsItemEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<XmlIncludeAttribute(GetType(AuthorisationGoodsItemEGType)),
|
|
System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class AuthorisationEGType
|
|
|
|
#Region "Private fields"
|
|
Private _type As String
|
|
|
|
Private _referenceNumber As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Type() As String
|
|
Get
|
|
Return Me._type
|
|
End Get
|
|
Set
|
|
Me._type = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ReferenceNumber() As String
|
|
Get
|
|
Return Me._referenceNumber
|
|
End Get
|
|
Set
|
|
Me._referenceNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AuthorisationEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize AuthorisationEGType 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 AuthorisationEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output AuthorisationEGType 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 AuthorisationEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, AuthorisationEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AuthorisationEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As AuthorisationEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AuthorisationEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As AuthorisationEGType
|
|
Return CType(SerializerXml.Deserialize(s), AuthorisationEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current AuthorisationEGType 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 AuthorisationEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output AuthorisationEGType 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 AuthorisationEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, AuthorisationEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AuthorisationEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AuthorisationEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class AdditionalSupplyChainActorEGType
|
|
|
|
#Region "Private fields"
|
|
Private _role As String
|
|
|
|
Private _identificationNumber As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Role() As String
|
|
Get
|
|
Return Me._role
|
|
End Get
|
|
Set
|
|
Me._role = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property IdentificationNumber() As String
|
|
Get
|
|
Return Me._identificationNumber
|
|
End Get
|
|
Set
|
|
Me._identificationNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdditionalSupplyChainActorEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize AdditionalSupplyChainActorEGType 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 AdditionalSupplyChainActorEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output AdditionalSupplyChainActorEGType 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 AdditionalSupplyChainActorEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, AdditionalSupplyChainActorEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalSupplyChainActorEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As AdditionalSupplyChainActorEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalSupplyChainActorEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdditionalSupplyChainActorEGType
|
|
Return CType(SerializerXml.Deserialize(s), AdditionalSupplyChainActorEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current AdditionalSupplyChainActorEGType 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 AdditionalSupplyChainActorEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output AdditionalSupplyChainActorEGType 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 AdditionalSupplyChainActorEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, AdditionalSupplyChainActorEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalSupplyChainActorEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdditionalSupplyChainActorEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class AdditionalReferenceGoodsItemEGType
|
|
Inherits AdditionalReferenceEGType
|
|
|
|
#Region "Private fields"
|
|
Private _detail As String
|
|
|
|
Private _currency As String
|
|
|
|
Private _amount As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Detail() As String
|
|
Get
|
|
Return Me._detail
|
|
End Get
|
|
Set
|
|
Me._detail = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Currency() As String
|
|
Get
|
|
Return Me._currency
|
|
End Get
|
|
Set
|
|
Me._currency = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Amount() As String
|
|
Get
|
|
Return Me._amount
|
|
End Get
|
|
Set
|
|
Me._amount = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdditionalReferenceGoodsItemEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize AdditionalReferenceGoodsItemEGType 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 AdditionalReferenceGoodsItemEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output AdditionalReferenceGoodsItemEGType 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 AdditionalReferenceGoodsItemEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, AdditionalReferenceGoodsItemEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalReferenceGoodsItemEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As AdditionalReferenceGoodsItemEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalReferenceGoodsItemEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdditionalReferenceGoodsItemEGType
|
|
Return CType(SerializerXml.Deserialize(s), AdditionalReferenceGoodsItemEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current AdditionalReferenceGoodsItemEGType 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 AdditionalReferenceGoodsItemEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output AdditionalReferenceGoodsItemEGType 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 AdditionalReferenceGoodsItemEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, AdditionalReferenceGoodsItemEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalReferenceGoodsItemEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdditionalReferenceGoodsItemEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<XmlIncludeAttribute(GetType(AdditionalReferenceGoodsItemEGType)),
|
|
System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class AdditionalReferenceEGType
|
|
|
|
#Region "Private fields"
|
|
Private _type As String
|
|
|
|
Private _qualifier As String
|
|
|
|
Private _referenceNumber As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Type() As String
|
|
Get
|
|
Return Me._type
|
|
End Get
|
|
Set
|
|
Me._type = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Qualifier() As String
|
|
Get
|
|
Return Me._qualifier
|
|
End Get
|
|
Set
|
|
Me._qualifier = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ReferenceNumber() As String
|
|
Get
|
|
Return Me._referenceNumber
|
|
End Get
|
|
Set
|
|
Me._referenceNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AdditionalReferenceEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize AdditionalReferenceEGType 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 AdditionalReferenceEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output AdditionalReferenceEGType 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 AdditionalReferenceEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, AdditionalReferenceEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AdditionalReferenceEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As AdditionalReferenceEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AdditionalReferenceEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As AdditionalReferenceEGType
|
|
Return CType(SerializerXml.Deserialize(s), AdditionalReferenceEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current AdditionalReferenceEGType 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 AdditionalReferenceEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output AdditionalReferenceEGType 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 AdditionalReferenceEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, AdditionalReferenceEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AdditionalReferenceEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AdditionalReferenceEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<XmlIncludeAttribute(GetType(DeclarantEGType)),
|
|
System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class AddressEGType
|
|
|
|
#Region "Private fields"
|
|
Private _addressCode As String
|
|
|
|
Private _identificationNumber As String
|
|
|
|
Private _subsidiaryNumber As String
|
|
|
|
Private _name As String
|
|
|
|
Private _streetAndNumber As String
|
|
|
|
Private _city As String
|
|
|
|
Private _postcode As String
|
|
|
|
Private _country As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property AddressCode() As String
|
|
Get
|
|
Return Me._addressCode
|
|
End Get
|
|
Set
|
|
Me._addressCode = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property IdentificationNumber() As String
|
|
Get
|
|
Return Me._identificationNumber
|
|
End Get
|
|
Set
|
|
Me._identificationNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property SubsidiaryNumber() As String
|
|
Get
|
|
Return Me._subsidiaryNumber
|
|
End Get
|
|
Set
|
|
Me._subsidiaryNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Name() As String
|
|
Get
|
|
Return Me._name
|
|
End Get
|
|
Set
|
|
Me._name = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property StreetAndNumber() As String
|
|
Get
|
|
Return Me._streetAndNumber
|
|
End Get
|
|
Set
|
|
Me._streetAndNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property City() As String
|
|
Get
|
|
Return Me._city
|
|
End Get
|
|
Set
|
|
Me._city = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Postcode() As String
|
|
Get
|
|
Return Me._postcode
|
|
End Get
|
|
Set
|
|
Me._postcode = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Country() As String
|
|
Get
|
|
Return Me._country
|
|
End Get
|
|
Set
|
|
Me._country = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(AddressEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize AddressEGType 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 AddressEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output AddressEGType 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 AddressEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, AddressEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As AddressEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As AddressEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), AddressEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As AddressEGType
|
|
Return CType(SerializerXml.Deserialize(s), AddressEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current AddressEGType 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 AddressEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output AddressEGType 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 AddressEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, AddressEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As AddressEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As AddressEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class DeclarantEGType
|
|
Inherits AddressEGType
|
|
|
|
#Region "Private fields"
|
|
Private _contactPerson As ContactPersonEGType
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me._contactPerson = New ContactPersonEGType()
|
|
End Sub
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ContactPerson() As ContactPersonEGType
|
|
Get
|
|
Return Me._contactPerson
|
|
End Get
|
|
Set
|
|
Me._contactPerson = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DeclarantEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize DeclarantEGType 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 DeclarantEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DeclarantEGType 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 DeclarantEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, DeclarantEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DeclarantEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As DeclarantEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DeclarantEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As DeclarantEGType
|
|
Return CType(SerializerXml.Deserialize(s), DeclarantEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current DeclarantEGType 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 DeclarantEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DeclarantEGType 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 DeclarantEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, DeclarantEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DeclarantEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DeclarantEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class ContactPersonEGType
|
|
|
|
#Region "Private fields"
|
|
Private _name As String
|
|
|
|
Private _phoneNumber As String
|
|
|
|
Private _eMailAddress As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Name() As String
|
|
Get
|
|
Return Me._name
|
|
End Get
|
|
Set
|
|
Me._name = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property PhoneNumber() As String
|
|
Get
|
|
Return Me._phoneNumber
|
|
End Get
|
|
Set
|
|
Me._phoneNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property EMailAddress() As String
|
|
Get
|
|
Return Me._eMailAddress
|
|
End Get
|
|
Set
|
|
Me._eMailAddress = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ContactPersonEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize ContactPersonEGType 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 ContactPersonEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output ContactPersonEGType 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 ContactPersonEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, ContactPersonEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ContactPersonEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As ContactPersonEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ContactPersonEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As ContactPersonEGType
|
|
Return CType(SerializerXml.Deserialize(s), ContactPersonEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current ContactPersonEGType 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 ContactPersonEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output ContactPersonEGType 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 ContactPersonEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, ContactPersonEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ContactPersonEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ContactPersonEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class ApplicationInternalDataType
|
|
|
|
#Region "Private fields"
|
|
Private _additionalDetails As List(Of ApplicationInternalDataAdditionalDetailsDataType)
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me._additionalDetails = New List(Of ApplicationInternalDataAdditionalDetailsDataType)()
|
|
End Sub
|
|
|
|
<XmlArray(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified),
|
|
XmlArrayItem("Data", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable:=False)>
|
|
Public Property AdditionalDetails() As List(Of ApplicationInternalDataAdditionalDetailsDataType)
|
|
Get
|
|
Return Me._additionalDetails
|
|
End Get
|
|
Set
|
|
Me._additionalDetails = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ApplicationInternalDataType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize ApplicationInternalDataType 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 ApplicationInternalDataType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output ApplicationInternalDataType 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 ApplicationInternalDataType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, ApplicationInternalDataType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As ApplicationInternalDataType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ApplicationInternalDataType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As ApplicationInternalDataType
|
|
Return CType(SerializerXml.Deserialize(s), ApplicationInternalDataType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current ApplicationInternalDataType 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 ApplicationInternalDataType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output ApplicationInternalDataType 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 ApplicationInternalDataType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, ApplicationInternalDataType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ApplicationInternalDataType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class ApplicationInternalDataAdditionalDetailsDataType
|
|
|
|
#Region "Private fields"
|
|
Private _key As String
|
|
|
|
Private _value As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Key() As String
|
|
Get
|
|
Return Me._key
|
|
End Get
|
|
Set
|
|
Me._key = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Value() As String
|
|
Get
|
|
Return Me._value
|
|
End Get
|
|
Set
|
|
Me._value = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ApplicationInternalDataAdditionalDetailsDataType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize ApplicationInternalDataAdditionalDetailsDataType 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 ApplicationInternalDataAdditionalDetailsDataType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output ApplicationInternalDataAdditionalDetailsDataType 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 ApplicationInternalDataAdditionalDetailsDataType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsDataType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As ApplicationInternalDataAdditionalDetailsDataType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ApplicationInternalDataAdditionalDetailsDataType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As ApplicationInternalDataAdditionalDetailsDataType
|
|
Return CType(SerializerXml.Deserialize(s), ApplicationInternalDataAdditionalDetailsDataType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current ApplicationInternalDataAdditionalDetailsDataType 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 ApplicationInternalDataAdditionalDetailsDataType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output ApplicationInternalDataAdditionalDetailsDataType 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 ApplicationInternalDataAdditionalDetailsDataType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsDataType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataAdditionalDetailsDataType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ApplicationInternalDataAdditionalDetailsDataType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class SupportingDocumentEGType
|
|
|
|
#Region "Private fields"
|
|
Private _type As String
|
|
|
|
Private _qualifier As String
|
|
|
|
Private _referenceNumber As String
|
|
|
|
Private _documentLineItemNumber As String
|
|
|
|
Private _issuingAuthorityName As String
|
|
|
|
Private _issuingDate As Date
|
|
|
|
Private _validityDate As Date
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Type() As String
|
|
Get
|
|
Return Me._type
|
|
End Get
|
|
Set
|
|
Me._type = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Qualifier() As String
|
|
Get
|
|
Return Me._qualifier
|
|
End Get
|
|
Set
|
|
Me._qualifier = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ReferenceNumber() As String
|
|
Get
|
|
Return Me._referenceNumber
|
|
End Get
|
|
Set
|
|
Me._referenceNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property DocumentLineItemNumber() As String
|
|
Get
|
|
Return Me._documentLineItemNumber
|
|
End Get
|
|
Set
|
|
Me._documentLineItemNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property IssuingAuthorityName() As String
|
|
Get
|
|
Return Me._issuingAuthorityName
|
|
End Get
|
|
Set
|
|
Me._issuingAuthorityName = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="date")>
|
|
Public Property IssuingDate() As Date
|
|
Get
|
|
Return Me._issuingDate
|
|
End Get
|
|
Set
|
|
Me._issuingDate = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, 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(SupportingDocumentEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize SupportingDocumentEGType 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 SupportingDocumentEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output SupportingDocumentEGType 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 SupportingDocumentEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, SupportingDocumentEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As SupportingDocumentEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As SupportingDocumentEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), SupportingDocumentEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As SupportingDocumentEGType
|
|
Return CType(SerializerXml.Deserialize(s), SupportingDocumentEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current SupportingDocumentEGType 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 SupportingDocumentEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output SupportingDocumentEGType 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 SupportingDocumentEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, SupportingDocumentEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As SupportingDocumentEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As SupportingDocumentEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class PreviousDocumentEGType
|
|
|
|
#Region "Private fields"
|
|
Private _type As String
|
|
|
|
Private _qualifier As String
|
|
|
|
Private _referenceNumber As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Type() As String
|
|
Get
|
|
Return Me._type
|
|
End Get
|
|
Set
|
|
Me._type = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Qualifier() As String
|
|
Get
|
|
Return Me._qualifier
|
|
End Get
|
|
Set
|
|
Me._qualifier = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ReferenceNumber() As String
|
|
Get
|
|
Return Me._referenceNumber
|
|
End Get
|
|
Set
|
|
Me._referenceNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(PreviousDocumentEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize PreviousDocumentEGType 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 PreviousDocumentEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output PreviousDocumentEGType 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 PreviousDocumentEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, PreviousDocumentEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As PreviousDocumentEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As PreviousDocumentEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), PreviousDocumentEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As PreviousDocumentEGType
|
|
Return CType(SerializerXml.Deserialize(s), PreviousDocumentEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current PreviousDocumentEGType 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 PreviousDocumentEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output PreviousDocumentEGType 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 PreviousDocumentEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, PreviousDocumentEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As PreviousDocumentEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As PreviousDocumentEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class TransportDocumentEGType
|
|
|
|
#Region "Private fields"
|
|
Private _type As String
|
|
|
|
Private _qualifier As String
|
|
|
|
Private _referenceNumber As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Type() As String
|
|
Get
|
|
Return Me._type
|
|
End Get
|
|
Set
|
|
Me._type = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Qualifier() As String
|
|
Get
|
|
Return Me._qualifier
|
|
End Get
|
|
Set
|
|
Me._qualifier = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ReferenceNumber() As String
|
|
Get
|
|
Return Me._referenceNumber
|
|
End Get
|
|
Set
|
|
Me._referenceNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransportDocumentEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize TransportDocumentEGType 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 TransportDocumentEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output TransportDocumentEGType 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 TransportDocumentEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, TransportDocumentEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransportDocumentEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As TransportDocumentEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransportDocumentEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransportDocumentEGType
|
|
Return CType(SerializerXml.Deserialize(s), TransportDocumentEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current TransportDocumentEGType 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 TransportDocumentEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output TransportDocumentEGType 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 TransportDocumentEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, TransportDocumentEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransportDocumentEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransportDocumentEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class DeliveryTermsEGType
|
|
|
|
#Region "Private fields"
|
|
Private _incotermCode As String
|
|
|
|
Private _uNLocode As String
|
|
|
|
Private _text As String
|
|
|
|
Private _location As String
|
|
|
|
Private _country As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property IncotermCode() As String
|
|
Get
|
|
Return Me._incotermCode
|
|
End Get
|
|
Set
|
|
Me._incotermCode = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property UNLocode() As String
|
|
Get
|
|
Return Me._uNLocode
|
|
End Get
|
|
Set
|
|
Me._uNLocode = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Text() As String
|
|
Get
|
|
Return Me._text
|
|
End Get
|
|
Set
|
|
Me._text = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Location() As String
|
|
Get
|
|
Return Me._location
|
|
End Get
|
|
Set
|
|
Me._location = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Country() As String
|
|
Get
|
|
Return Me._country
|
|
End Get
|
|
Set
|
|
Me._country = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DeliveryTermsEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize DeliveryTermsEGType 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 DeliveryTermsEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DeliveryTermsEGType 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 DeliveryTermsEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, DeliveryTermsEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DeliveryTermsEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As DeliveryTermsEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DeliveryTermsEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As DeliveryTermsEGType
|
|
Return CType(SerializerXml.Deserialize(s), DeliveryTermsEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current DeliveryTermsEGType 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 DeliveryTermsEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DeliveryTermsEGType 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 DeliveryTermsEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, DeliveryTermsEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DeliveryTermsEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DeliveryTermsEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class ProductEGType
|
|
|
|
#Region "Private fields"
|
|
Private _commodityCode As String
|
|
|
|
Private _descriptionOfGoods As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property CommodityCode() As String
|
|
Get
|
|
Return Me._commodityCode
|
|
End Get
|
|
Set
|
|
Me._commodityCode = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property DescriptionOfGoods() As String
|
|
Get
|
|
Return Me._descriptionOfGoods
|
|
End Get
|
|
Set
|
|
Me._descriptionOfGoods = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ProductEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize ProductEGType 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 ProductEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output ProductEGType 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 ProductEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, ProductEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ProductEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As ProductEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ProductEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As ProductEGType
|
|
Return CType(SerializerXml.Deserialize(s), ProductEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current ProductEGType 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 ProductEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output ProductEGType 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 ProductEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, ProductEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ProductEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ProductEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class IdentificationMeansEGType
|
|
|
|
#Region "Private fields"
|
|
Private _type As String
|
|
|
|
Private _description As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Type() As String
|
|
Get
|
|
Return Me._type
|
|
End Get
|
|
Set
|
|
Me._type = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Description() As String
|
|
Get
|
|
Return Me._description
|
|
End Get
|
|
Set
|
|
Me._description = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(IdentificationMeansEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize IdentificationMeansEGType 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 IdentificationMeansEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output IdentificationMeansEGType 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 IdentificationMeansEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, IdentificationMeansEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As IdentificationMeansEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As IdentificationMeansEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), IdentificationMeansEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As IdentificationMeansEGType
|
|
Return CType(SerializerXml.Deserialize(s), IdentificationMeansEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current IdentificationMeansEGType 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 IdentificationMeansEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output IdentificationMeansEGType 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 IdentificationMeansEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, IdentificationMeansEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As IdentificationMeansEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As IdentificationMeansEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class OutwardProcessingEGType
|
|
|
|
#Region "Private fields"
|
|
Private _countryOfReimport As List(Of String)
|
|
|
|
Private _identificationMeans As List(Of IdentificationMeansEGType)
|
|
|
|
Private _product As List(Of ProductEGType)
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me._product = New List(Of ProductEGType)()
|
|
Me._identificationMeans = New List(Of IdentificationMeansEGType)()
|
|
Me._countryOfReimport = New List(Of String)()
|
|
End Sub
|
|
|
|
<XmlElement("CountryOfReimport", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property CountryOfReimport() As List(Of String)
|
|
Get
|
|
Return Me._countryOfReimport
|
|
End Get
|
|
Set
|
|
Me._countryOfReimport = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("IdentificationMeans", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property IdentificationMeans() As List(Of IdentificationMeansEGType)
|
|
Get
|
|
Return Me._identificationMeans
|
|
End Get
|
|
Set
|
|
Me._identificationMeans = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("Product", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Product() As List(Of ProductEGType)
|
|
Get
|
|
Return Me._product
|
|
End Get
|
|
Set
|
|
Me._product = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(OutwardProcessingEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize OutwardProcessingEGType 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 OutwardProcessingEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output OutwardProcessingEGType 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 OutwardProcessingEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, OutwardProcessingEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As OutwardProcessingEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As OutwardProcessingEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), OutwardProcessingEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As OutwardProcessingEGType
|
|
Return CType(SerializerXml.Deserialize(s), OutwardProcessingEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current OutwardProcessingEGType 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 OutwardProcessingEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output OutwardProcessingEGType 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 OutwardProcessingEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, OutwardProcessingEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As OutwardProcessingEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As OutwardProcessingEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class CarrierEGType
|
|
|
|
#Region "Private fields"
|
|
Private _addressCode As String
|
|
|
|
Private _identificationNumber As String
|
|
|
|
Private _subsidiaryNumber As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property AddressCode() As String
|
|
Get
|
|
Return Me._addressCode
|
|
End Get
|
|
Set
|
|
Me._addressCode = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property IdentificationNumber() As String
|
|
Get
|
|
Return Me._identificationNumber
|
|
End Get
|
|
Set
|
|
Me._identificationNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property SubsidiaryNumber() As String
|
|
Get
|
|
Return Me._subsidiaryNumber
|
|
End Get
|
|
Set
|
|
Me._subsidiaryNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(CarrierEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize CarrierEGType 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 CarrierEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output CarrierEGType 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 CarrierEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, CarrierEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As CarrierEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As CarrierEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), CarrierEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As CarrierEGType
|
|
Return CType(SerializerXml.Deserialize(s), CarrierEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current CarrierEGType 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 CarrierEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output CarrierEGType 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 CarrierEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, CarrierEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As CarrierEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As CarrierEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class RepresentativeEGType
|
|
|
|
#Region "Private fields"
|
|
Private _addressCode As String
|
|
|
|
Private _identificationNumber As String
|
|
|
|
Private _subsidiaryNumber As String
|
|
|
|
Private _contactPerson As ContactPersonEGType
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me._contactPerson = New ContactPersonEGType()
|
|
End Sub
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property AddressCode() As String
|
|
Get
|
|
Return Me._addressCode
|
|
End Get
|
|
Set
|
|
Me._addressCode = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property IdentificationNumber() As String
|
|
Get
|
|
Return Me._identificationNumber
|
|
End Get
|
|
Set
|
|
Me._identificationNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property SubsidiaryNumber() As String
|
|
Get
|
|
Return Me._subsidiaryNumber
|
|
End Get
|
|
Set
|
|
Me._subsidiaryNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ContactPerson() As ContactPersonEGType
|
|
Get
|
|
Return Me._contactPerson
|
|
End Get
|
|
Set
|
|
Me._contactPerson = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(RepresentativeEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize RepresentativeEGType 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 RepresentativeEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output RepresentativeEGType 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 RepresentativeEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, RepresentativeEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As RepresentativeEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As RepresentativeEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), RepresentativeEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As RepresentativeEGType
|
|
Return CType(SerializerXml.Deserialize(s), RepresentativeEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current RepresentativeEGType 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 RepresentativeEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output RepresentativeEGType 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 RepresentativeEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, RepresentativeEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As RepresentativeEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As RepresentativeEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class TransportEquipmentEGType
|
|
|
|
#Region "Private fields"
|
|
Private _numberOfSeals As String
|
|
|
|
Private _seal As List(Of String)
|
|
|
|
Private _containerIdentificationNumber As String
|
|
|
|
Private _goodsReference As List(Of String)
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me._goodsReference = New List(Of String)()
|
|
Me._seal = New List(Of String)()
|
|
End Sub
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property NumberOfSeals() As String
|
|
Get
|
|
Return Me._numberOfSeals
|
|
End Get
|
|
Set
|
|
Me._numberOfSeals = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("Seal", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Seal() As List(Of String)
|
|
Get
|
|
Return Me._seal
|
|
End Get
|
|
Set
|
|
Me._seal = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ContainerIdentificationNumber() As String
|
|
Get
|
|
Return Me._containerIdentificationNumber
|
|
End Get
|
|
Set
|
|
Me._containerIdentificationNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("GoodsReference", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property GoodsReference() As List(Of String)
|
|
Get
|
|
Return Me._goodsReference
|
|
End Get
|
|
Set
|
|
Me._goodsReference = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransportEquipmentEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize TransportEquipmentEGType 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 TransportEquipmentEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output TransportEquipmentEGType 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 TransportEquipmentEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, TransportEquipmentEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransportEquipmentEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As TransportEquipmentEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransportEquipmentEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransportEquipmentEGType
|
|
Return CType(SerializerXml.Deserialize(s), TransportEquipmentEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current TransportEquipmentEGType 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 TransportEquipmentEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output TransportEquipmentEGType 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 TransportEquipmentEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, TransportEquipmentEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransportEquipmentEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransportEquipmentEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class LocationOfGoodsAddressEGType
|
|
|
|
#Region "Private fields"
|
|
Private _streetAndNumber As String
|
|
|
|
Private _postcode As String
|
|
|
|
Private _city As String
|
|
|
|
Private _country As String
|
|
|
|
Private _complementOfInformation As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property StreetAndNumber() As String
|
|
Get
|
|
Return Me._streetAndNumber
|
|
End Get
|
|
Set
|
|
Me._streetAndNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Postcode() As String
|
|
Get
|
|
Return Me._postcode
|
|
End Get
|
|
Set
|
|
Me._postcode = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property City() As String
|
|
Get
|
|
Return Me._city
|
|
End Get
|
|
Set
|
|
Me._city = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Country() As String
|
|
Get
|
|
Return Me._country
|
|
End Get
|
|
Set
|
|
Me._country = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ComplementOfInformation() As String
|
|
Get
|
|
Return Me._complementOfInformation
|
|
End Get
|
|
Set
|
|
Me._complementOfInformation = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(LocationOfGoodsAddressEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize LocationOfGoodsAddressEGType 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 LocationOfGoodsAddressEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output LocationOfGoodsAddressEGType 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 LocationOfGoodsAddressEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, LocationOfGoodsAddressEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As LocationOfGoodsAddressEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As LocationOfGoodsAddressEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), LocationOfGoodsAddressEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As LocationOfGoodsAddressEGType
|
|
Return CType(SerializerXml.Deserialize(s), LocationOfGoodsAddressEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current LocationOfGoodsAddressEGType 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 LocationOfGoodsAddressEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output LocationOfGoodsAddressEGType 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 LocationOfGoodsAddressEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, LocationOfGoodsAddressEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As LocationOfGoodsAddressEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As LocationOfGoodsAddressEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class LocationOfGoodsEGType
|
|
|
|
#Region "Private fields"
|
|
Private _typeOfLocation As String
|
|
|
|
Private _qualifierOfIdentification As String
|
|
|
|
Private _additionalIdentifier As String
|
|
|
|
Private _authorisationNumber As String
|
|
|
|
Private _uNLocode As String
|
|
|
|
Private _latitude As String
|
|
|
|
Private _longitude As String
|
|
|
|
Private _address As LocationOfGoodsAddressEGType
|
|
|
|
Private _contactPerson As ContactPersonEGType
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me._contactPerson = New ContactPersonEGType()
|
|
Me._address = New LocationOfGoodsAddressEGType()
|
|
End Sub
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property TypeOfLocation() As String
|
|
Get
|
|
Return Me._typeOfLocation
|
|
End Get
|
|
Set
|
|
Me._typeOfLocation = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property QualifierOfIdentification() As String
|
|
Get
|
|
Return Me._qualifierOfIdentification
|
|
End Get
|
|
Set
|
|
Me._qualifierOfIdentification = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property AdditionalIdentifier() As String
|
|
Get
|
|
Return Me._additionalIdentifier
|
|
End Get
|
|
Set
|
|
Me._additionalIdentifier = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property AuthorisationNumber() As String
|
|
Get
|
|
Return Me._authorisationNumber
|
|
End Get
|
|
Set
|
|
Me._authorisationNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property UNLocode() As String
|
|
Get
|
|
Return Me._uNLocode
|
|
End Get
|
|
Set
|
|
Me._uNLocode = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Latitude() As String
|
|
Get
|
|
Return Me._latitude
|
|
End Get
|
|
Set
|
|
Me._latitude = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Longitude() As String
|
|
Get
|
|
Return Me._longitude
|
|
End Get
|
|
Set
|
|
Me._longitude = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Address() As LocationOfGoodsAddressEGType
|
|
Get
|
|
Return Me._address
|
|
End Get
|
|
Set
|
|
Me._address = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ContactPerson() As ContactPersonEGType
|
|
Get
|
|
Return Me._contactPerson
|
|
End Get
|
|
Set
|
|
Me._contactPerson = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(LocationOfGoodsEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize LocationOfGoodsEGType 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 LocationOfGoodsEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output LocationOfGoodsEGType 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 LocationOfGoodsEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, LocationOfGoodsEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As LocationOfGoodsEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As LocationOfGoodsEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), LocationOfGoodsEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As LocationOfGoodsEGType
|
|
Return CType(SerializerXml.Deserialize(s), LocationOfGoodsEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current LocationOfGoodsEGType 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 LocationOfGoodsEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output LocationOfGoodsEGType 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 LocationOfGoodsEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, LocationOfGoodsEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As LocationOfGoodsEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As LocationOfGoodsEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class ActiveBorderTransportMeansEGType
|
|
|
|
#Region "Private fields"
|
|
Private _typeOfIdentification As String
|
|
|
|
Private _identificationNumber As String
|
|
|
|
Private _nationality As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property TypeOfIdentification() As String
|
|
Get
|
|
Return Me._typeOfIdentification
|
|
End Get
|
|
Set
|
|
Me._typeOfIdentification = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property IdentificationNumber() As String
|
|
Get
|
|
Return Me._identificationNumber
|
|
End Get
|
|
Set
|
|
Me._identificationNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Nationality() As String
|
|
Get
|
|
Return Me._nationality
|
|
End Get
|
|
Set
|
|
Me._nationality = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ActiveBorderTransportMeansEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize ActiveBorderTransportMeansEGType 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 ActiveBorderTransportMeansEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output ActiveBorderTransportMeansEGType 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 ActiveBorderTransportMeansEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, ActiveBorderTransportMeansEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ActiveBorderTransportMeansEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As ActiveBorderTransportMeansEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ActiveBorderTransportMeansEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As ActiveBorderTransportMeansEGType
|
|
Return CType(SerializerXml.Deserialize(s), ActiveBorderTransportMeansEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current ActiveBorderTransportMeansEGType 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 ActiveBorderTransportMeansEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output ActiveBorderTransportMeansEGType 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 ActiveBorderTransportMeansEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, ActiveBorderTransportMeansEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ActiveBorderTransportMeansEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ActiveBorderTransportMeansEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class DepartureTransportMeansEGType
|
|
|
|
#Region "Private fields"
|
|
Private _typeOfIdentification As String
|
|
|
|
Private _identificationNumber As String
|
|
|
|
Private _nationality As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property TypeOfIdentification() As String
|
|
Get
|
|
Return Me._typeOfIdentification
|
|
End Get
|
|
Set
|
|
Me._typeOfIdentification = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property IdentificationNumber() As String
|
|
Get
|
|
Return Me._identificationNumber
|
|
End Get
|
|
Set
|
|
Me._identificationNumber = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Nationality() As String
|
|
Get
|
|
Return Me._nationality
|
|
End Get
|
|
Set
|
|
Me._nationality = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DepartureTransportMeansEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize DepartureTransportMeansEGType 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 DepartureTransportMeansEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DepartureTransportMeansEGType 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 DepartureTransportMeansEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, DepartureTransportMeansEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DepartureTransportMeansEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As DepartureTransportMeansEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DepartureTransportMeansEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As DepartureTransportMeansEGType
|
|
Return CType(SerializerXml.Deserialize(s), DepartureTransportMeansEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current DepartureTransportMeansEGType 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 DepartureTransportMeansEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DepartureTransportMeansEGType 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 DepartureTransportMeansEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, DepartureTransportMeansEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DepartureTransportMeansEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DepartureTransportMeansEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class ExportOperationEGType
|
|
|
|
#Region "Private fields"
|
|
Private _declarationType As String
|
|
|
|
Private _exportDeclarationType As String
|
|
|
|
Private _security As String
|
|
|
|
Private _countryOfExport As String
|
|
|
|
Private _countryOfDestination As String
|
|
|
|
Private _additionalSupplyChainActor As List(Of AdditionalSupplyChainActorEGType)
|
|
|
|
Private _declarationSubmissionDateAndTime As Date
|
|
|
|
Private _exitDate As Date
|
|
|
|
Private _decisiveDate As Date
|
|
|
|
Private _specificCircumstanceIndicator As String
|
|
|
|
Private _transportCharges As String
|
|
|
|
Private _containerIndicator As String
|
|
|
|
Private _partyConstellation As String
|
|
|
|
Private _grossMass As String
|
|
|
|
Private _registrationNumberExternal As String
|
|
|
|
Private _referenceNumberUCR As String
|
|
|
|
Private _authorisation As List(Of AuthorisationEGType)
|
|
|
|
Private _inlandModeOfTransport As String
|
|
|
|
Private _departureTransportMeans As List(Of DepartureTransportMeansEGType)
|
|
|
|
Private _modeOfTransportAtTheBorder As String
|
|
|
|
Private _activeBorderTransportMeans As ActiveBorderTransportMeansEGType
|
|
|
|
Private _locationOfGoods As LocationOfGoodsEGType
|
|
|
|
Private _customsOfficeOfExport As String
|
|
|
|
Private _customsOfficeOfExitDeclared As String
|
|
|
|
Private _customsOfficeOfSupplement As String
|
|
|
|
Private _customsOfficeOfPresentation As String
|
|
|
|
Private _customsOfficeOfExitActual As String
|
|
|
|
Private _natureOfTransaction As String
|
|
|
|
Private _totalAmountInvoiced As String
|
|
|
|
Private _invoiceCurrency As String
|
|
|
|
Private _additionalInformation As List(Of AdditionalInformationEGType)
|
|
|
|
Private _transportEquipment As List(Of TransportEquipmentEGType)
|
|
|
|
Private _presentationStartDateAndTime As Date
|
|
|
|
Private _loadingEndDateAndTime As Date
|
|
|
|
Private _exporter As AddressEGType
|
|
|
|
Private _consignee As AddressEGType
|
|
|
|
Private _declarant As DeclarantEGType
|
|
|
|
Private _representative As RepresentativeEGType
|
|
|
|
Private _subContractor As AddressEGType
|
|
|
|
Private _contractualPartner As AddressEGType
|
|
|
|
Private _carrier As CarrierEGType
|
|
|
|
Private _consignor As AddressEGType
|
|
|
|
Private _countryOfRoutingOfConsignment As List(Of String)
|
|
|
|
Private _outwardProcessing As OutwardProcessingEGType
|
|
|
|
Private _aBDEmailAddress As String
|
|
|
|
Private _aVMEmailAddress As String
|
|
|
|
Private _deliveryTerms As DeliveryTermsEGType
|
|
|
|
Private _transportDocument As List(Of TransportDocumentEGType)
|
|
|
|
Private _previousDocument As List(Of PreviousDocumentEGType)
|
|
|
|
Private _supportingDocument As List(Of SupportingDocumentEGType)
|
|
|
|
Private _additionalReference As List(Of AdditionalReferenceEGType)
|
|
|
|
Private _applicationInternalData As ApplicationInternalDataType
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me._applicationInternalData = New ApplicationInternalDataType()
|
|
Me._additionalReference = New List(Of AdditionalReferenceEGType)()
|
|
Me._supportingDocument = New List(Of SupportingDocumentEGType)()
|
|
Me._previousDocument = New List(Of PreviousDocumentEGType)()
|
|
Me._transportDocument = New List(Of TransportDocumentEGType)()
|
|
Me._deliveryTerms = New DeliveryTermsEGType()
|
|
Me._outwardProcessing = New OutwardProcessingEGType()
|
|
Me._countryOfRoutingOfConsignment = New List(Of String)()
|
|
Me._consignor = New AddressEGType()
|
|
Me._carrier = New CarrierEGType()
|
|
Me._contractualPartner = New AddressEGType()
|
|
Me._subContractor = New AddressEGType()
|
|
Me._representative = New RepresentativeEGType()
|
|
Me._declarant = New DeclarantEGType()
|
|
Me._consignee = New AddressEGType()
|
|
Me._exporter = New AddressEGType()
|
|
Me._transportEquipment = New List(Of TransportEquipmentEGType)()
|
|
Me._additionalInformation = New List(Of AdditionalInformationEGType)()
|
|
Me._locationOfGoods = New LocationOfGoodsEGType()
|
|
Me._activeBorderTransportMeans = New ActiveBorderTransportMeansEGType()
|
|
Me._departureTransportMeans = New List(Of DepartureTransportMeansEGType)()
|
|
Me._authorisation = New List(Of AuthorisationEGType)()
|
|
Me._additionalSupplyChainActor = New List(Of AdditionalSupplyChainActorEGType)()
|
|
End Sub
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property DeclarationType() As String
|
|
Get
|
|
Return Me._declarationType
|
|
End Get
|
|
Set
|
|
Me._declarationType = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ExportDeclarationType() As String
|
|
Get
|
|
Return Me._exportDeclarationType
|
|
End Get
|
|
Set
|
|
Me._exportDeclarationType = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Security() As String
|
|
Get
|
|
Return Me._security
|
|
End Get
|
|
Set
|
|
Me._security = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property CountryOfExport() As String
|
|
Get
|
|
Return Me._countryOfExport
|
|
End Get
|
|
Set
|
|
Me._countryOfExport = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property CountryOfDestination() As String
|
|
Get
|
|
Return Me._countryOfDestination
|
|
End Get
|
|
Set
|
|
Me._countryOfDestination = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("AdditionalSupplyChainActor", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property AdditionalSupplyChainActor() As List(Of AdditionalSupplyChainActorEGType)
|
|
Get
|
|
Return Me._additionalSupplyChainActor
|
|
End Get
|
|
Set
|
|
Me._additionalSupplyChainActor = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property DeclarationSubmissionDateAndTime() As Date
|
|
Get
|
|
Return Me._declarationSubmissionDateAndTime
|
|
End Get
|
|
Set
|
|
Me._declarationSubmissionDateAndTime = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="date")>
|
|
Public Property ExitDate() As Date
|
|
Get
|
|
Return Me._exitDate
|
|
End Get
|
|
Set
|
|
Me._exitDate = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="date")>
|
|
Public Property DecisiveDate() As Date
|
|
Get
|
|
Return Me._decisiveDate
|
|
End Get
|
|
Set
|
|
Me._decisiveDate = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property SpecificCircumstanceIndicator() As String
|
|
Get
|
|
Return Me._specificCircumstanceIndicator
|
|
End Get
|
|
Set
|
|
Me._specificCircumstanceIndicator = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property TransportCharges() As String
|
|
Get
|
|
Return Me._transportCharges
|
|
End Get
|
|
Set
|
|
Me._transportCharges = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ContainerIndicator() As String
|
|
Get
|
|
Return Me._containerIndicator
|
|
End Get
|
|
Set
|
|
Me._containerIndicator = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property PartyConstellation() As String
|
|
Get
|
|
Return Me._partyConstellation
|
|
End Get
|
|
Set
|
|
Me._partyConstellation = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property GrossMass() As String
|
|
Get
|
|
Return Me._grossMass
|
|
End Get
|
|
Set
|
|
Me._grossMass = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property RegistrationNumberExternal() As String
|
|
Get
|
|
Return Me._registrationNumberExternal
|
|
End Get
|
|
Set
|
|
Me._registrationNumberExternal = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ReferenceNumberUCR() As String
|
|
Get
|
|
Return Me._referenceNumberUCR
|
|
End Get
|
|
Set
|
|
Me._referenceNumberUCR = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("Authorisation", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Authorisation() As List(Of AuthorisationEGType)
|
|
Get
|
|
Return Me._authorisation
|
|
End Get
|
|
Set
|
|
Me._authorisation = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property InlandModeOfTransport() As String
|
|
Get
|
|
Return Me._inlandModeOfTransport
|
|
End Get
|
|
Set
|
|
Me._inlandModeOfTransport = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("DepartureTransportMeans", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property DepartureTransportMeans() As List(Of DepartureTransportMeansEGType)
|
|
Get
|
|
Return Me._departureTransportMeans
|
|
End Get
|
|
Set
|
|
Me._departureTransportMeans = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ModeOfTransportAtTheBorder() As String
|
|
Get
|
|
Return Me._modeOfTransportAtTheBorder
|
|
End Get
|
|
Set
|
|
Me._modeOfTransportAtTheBorder = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ActiveBorderTransportMeans() As ActiveBorderTransportMeansEGType
|
|
Get
|
|
Return Me._activeBorderTransportMeans
|
|
End Get
|
|
Set
|
|
Me._activeBorderTransportMeans = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property LocationOfGoods() As LocationOfGoodsEGType
|
|
Get
|
|
Return Me._locationOfGoods
|
|
End Get
|
|
Set
|
|
Me._locationOfGoods = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property CustomsOfficeOfExport() As String
|
|
Get
|
|
Return Me._customsOfficeOfExport
|
|
End Get
|
|
Set
|
|
Me._customsOfficeOfExport = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property CustomsOfficeOfExitDeclared() As String
|
|
Get
|
|
Return Me._customsOfficeOfExitDeclared
|
|
End Get
|
|
Set
|
|
Me._customsOfficeOfExitDeclared = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property CustomsOfficeOfSupplement() As String
|
|
Get
|
|
Return Me._customsOfficeOfSupplement
|
|
End Get
|
|
Set
|
|
Me._customsOfficeOfSupplement = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property CustomsOfficeOfPresentation() As String
|
|
Get
|
|
Return Me._customsOfficeOfPresentation
|
|
End Get
|
|
Set
|
|
Me._customsOfficeOfPresentation = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property CustomsOfficeOfExitActual() As String
|
|
Get
|
|
Return Me._customsOfficeOfExitActual
|
|
End Get
|
|
Set
|
|
Me._customsOfficeOfExitActual = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property NatureOfTransaction() As String
|
|
Get
|
|
Return Me._natureOfTransaction
|
|
End Get
|
|
Set
|
|
Me._natureOfTransaction = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property TotalAmountInvoiced() As String
|
|
Get
|
|
Return Me._totalAmountInvoiced
|
|
End Get
|
|
Set
|
|
Me._totalAmountInvoiced = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property InvoiceCurrency() As String
|
|
Get
|
|
Return Me._invoiceCurrency
|
|
End Get
|
|
Set
|
|
Me._invoiceCurrency = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("AdditionalInformation", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property AdditionalInformation() As List(Of AdditionalInformationEGType)
|
|
Get
|
|
Return Me._additionalInformation
|
|
End Get
|
|
Set
|
|
Me._additionalInformation = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("TransportEquipment", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property TransportEquipment() As List(Of TransportEquipmentEGType)
|
|
Get
|
|
Return Me._transportEquipment
|
|
End Get
|
|
Set
|
|
Me._transportEquipment = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property PresentationStartDateAndTime() As Date
|
|
Get
|
|
Return Me._presentationStartDateAndTime
|
|
End Get
|
|
Set
|
|
Me._presentationStartDateAndTime = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property LoadingEndDateAndTime() As Date
|
|
Get
|
|
Return Me._loadingEndDateAndTime
|
|
End Get
|
|
Set
|
|
Me._loadingEndDateAndTime = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Exporter() As AddressEGType
|
|
Get
|
|
Return Me._exporter
|
|
End Get
|
|
Set
|
|
Me._exporter = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Consignee() As AddressEGType
|
|
Get
|
|
Return Me._consignee
|
|
End Get
|
|
Set
|
|
Me._consignee = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Declarant() As DeclarantEGType
|
|
Get
|
|
Return Me._declarant
|
|
End Get
|
|
Set
|
|
Me._declarant = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Representative() As RepresentativeEGType
|
|
Get
|
|
Return Me._representative
|
|
End Get
|
|
Set
|
|
Me._representative = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property SubContractor() As AddressEGType
|
|
Get
|
|
Return Me._subContractor
|
|
End Get
|
|
Set
|
|
Me._subContractor = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ContractualPartner() As AddressEGType
|
|
Get
|
|
Return Me._contractualPartner
|
|
End Get
|
|
Set
|
|
Me._contractualPartner = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Carrier() As CarrierEGType
|
|
Get
|
|
Return Me._carrier
|
|
End Get
|
|
Set
|
|
Me._carrier = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Consignor() As AddressEGType
|
|
Get
|
|
Return Me._consignor
|
|
End Get
|
|
Set
|
|
Me._consignor = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("CountryOfRoutingOfConsignment", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property CountryOfRoutingOfConsignment() As List(Of String)
|
|
Get
|
|
Return Me._countryOfRoutingOfConsignment
|
|
End Get
|
|
Set
|
|
Me._countryOfRoutingOfConsignment = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property OutwardProcessing() As OutwardProcessingEGType
|
|
Get
|
|
Return Me._outwardProcessing
|
|
End Get
|
|
Set
|
|
Me._outwardProcessing = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ABDEmailAddress() As String
|
|
Get
|
|
Return Me._aBDEmailAddress
|
|
End Get
|
|
Set
|
|
Me._aBDEmailAddress = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property AVMEmailAddress() As String
|
|
Get
|
|
Return Me._aVMEmailAddress
|
|
End Get
|
|
Set
|
|
Me._aVMEmailAddress = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property DeliveryTerms() As DeliveryTermsEGType
|
|
Get
|
|
Return Me._deliveryTerms
|
|
End Get
|
|
Set
|
|
Me._deliveryTerms = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("TransportDocument", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property TransportDocument() As List(Of TransportDocumentEGType)
|
|
Get
|
|
Return Me._transportDocument
|
|
End Get
|
|
Set
|
|
Me._transportDocument = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("PreviousDocument", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property PreviousDocument() As List(Of PreviousDocumentEGType)
|
|
Get
|
|
Return Me._previousDocument
|
|
End Get
|
|
Set
|
|
Me._previousDocument = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("SupportingDocument", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property SupportingDocument() As List(Of SupportingDocumentEGType)
|
|
Get
|
|
Return Me._supportingDocument
|
|
End Get
|
|
Set
|
|
Me._supportingDocument = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement("AdditionalReference", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property AdditionalReference() As List(Of AdditionalReferenceEGType)
|
|
Get
|
|
Return Me._additionalReference
|
|
End Get
|
|
Set
|
|
Me._additionalReference = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property ApplicationInternalData() As ApplicationInternalDataType
|
|
Get
|
|
Return Me._applicationInternalData
|
|
End Get
|
|
Set
|
|
Me._applicationInternalData = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ExportOperationEGType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize ExportOperationEGType 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 ExportOperationEGType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output ExportOperationEGType 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 ExportOperationEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, ExportOperationEGType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ExportOperationEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As ExportOperationEGType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ExportOperationEGType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As ExportOperationEGType
|
|
Return CType(SerializerXml.Deserialize(s), ExportOperationEGType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current ExportOperationEGType 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 ExportOperationEGType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output ExportOperationEGType 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 ExportOperationEGType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, ExportOperationEGType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ExportOperationEGType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ExportOperationEGType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class TransaktionExportTyp
|
|
|
|
#Region "Private fields"
|
|
Private _iOPartner As String
|
|
|
|
Private _iODivision1 As String
|
|
|
|
Private _iODivision2 As String
|
|
|
|
Private _iODivision3 As String
|
|
|
|
Private _iOReferenz As String
|
|
|
|
Private _iODatumZeit As Date
|
|
|
|
Private _version As String
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property IOPartner() As String
|
|
Get
|
|
Return Me._iOPartner
|
|
End Get
|
|
Set
|
|
Me._iOPartner = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property IODivision1() As String
|
|
Get
|
|
Return Me._iODivision1
|
|
End Get
|
|
Set
|
|
Me._iODivision1 = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property IODivision2() As String
|
|
Get
|
|
Return Me._iODivision2
|
|
End Get
|
|
Set
|
|
Me._iODivision2 = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property IODivision3() As String
|
|
Get
|
|
Return Me._iODivision3
|
|
End Get
|
|
Set
|
|
Me._iODivision3 = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property IOReferenz() As String
|
|
Get
|
|
Return Me._iOReferenz
|
|
End Get
|
|
Set
|
|
Me._iOReferenz = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property IODatumZeit() As Date
|
|
Get
|
|
Return Me._iODatumZeit
|
|
End Get
|
|
Set
|
|
Me._iODatumZeit = Value
|
|
End Set
|
|
End Property
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, DataType:="nonNegativeInteger")>
|
|
Public Property Version() As String
|
|
Get
|
|
Return Me._version
|
|
End Get
|
|
Set
|
|
Me._version = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(TransaktionExportTyp))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize TransaktionExportTyp 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 TransaktionExportTyp object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output TransaktionExportTyp 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 TransaktionExportTyp, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, TransaktionExportTyp)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As TransaktionExportTyp) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As TransaktionExportTyp
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), TransaktionExportTyp)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As TransaktionExportTyp
|
|
Return CType(SerializerXml.Deserialize(s), TransaktionExportTyp)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current TransaktionExportTyp 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 TransaktionExportTyp object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output TransaktionExportTyp 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 TransaktionExportTyp, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, TransaktionExportTyp)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As TransaktionExportTyp) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As TransaktionExportTyp
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<XmlIncludeAttribute(GetType(AusfuhrAnmeldungEGTyp)),
|
|
System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code")>
|
|
Partial Public Class DatenaustauschExportTyp
|
|
|
|
#Region "Private fields"
|
|
Private _transaktion As TransaktionExportTyp
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me._transaktion = New TransaktionExportTyp()
|
|
End Sub
|
|
|
|
<XmlElement(Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Transaktion() As TransaktionExportTyp
|
|
Get
|
|
Return Me._transaktion
|
|
End Get
|
|
Set
|
|
Me._transaktion = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(DatenaustauschExportTyp))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize DatenaustauschExportTyp 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 DatenaustauschExportTyp object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output DatenaustauschExportTyp 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 DatenaustauschExportTyp, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, DatenaustauschExportTyp)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As DatenaustauschExportTyp) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As DatenaustauschExportTyp
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), DatenaustauschExportTyp)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As DatenaustauschExportTyp
|
|
Return CType(SerializerXml.Deserialize(s), DatenaustauschExportTyp)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current DatenaustauschExportTyp 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 DatenaustauschExportTyp object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output DatenaustauschExportTyp 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 DatenaustauschExportTyp, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, DatenaustauschExportTyp)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As DatenaustauschExportTyp) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As DatenaustauschExportTyp
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
|
|
<System.CodeDom.Compiler.GeneratedCode("System.Xml", "4.8.9037.0"),
|
|
System.Serializable,
|
|
DebuggerStepThrough,
|
|
DesignerCategoryAttribute("code"),
|
|
XmlRoot([Namespace]:="", IsNullable:=True)>
|
|
Partial Public Class ApplicationInternalDataAdditionalDetailsType
|
|
|
|
#Region "Private fields"
|
|
Private _data As List(Of ApplicationInternalDataAdditionalDetailsDataType)
|
|
|
|
Private Shared _serializerXml As XmlSerializer
|
|
#End Region
|
|
|
|
Public Sub New()
|
|
MyBase.New
|
|
Me._data = New List(Of ApplicationInternalDataAdditionalDetailsDataType)()
|
|
End Sub
|
|
|
|
<XmlElement("Data", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)>
|
|
Public Property Data() As List(Of ApplicationInternalDataAdditionalDetailsDataType)
|
|
Get
|
|
Return Me._data
|
|
End Get
|
|
Set
|
|
Me._data = Value
|
|
End Set
|
|
End Property
|
|
|
|
Private Shared ReadOnly Property SerializerXml() As XmlSerializer
|
|
Get
|
|
If (_serializerXml Is Nothing) Then
|
|
_serializerXml = New XmlSerializerFactory().CreateSerializer(GetType(ApplicationInternalDataAdditionalDetailsType))
|
|
End If
|
|
Return _serializerXml
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Serialize/Deserialize"
|
|
''' <summary>
|
|
''' Serialize ApplicationInternalDataAdditionalDetailsType 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 ApplicationInternalDataAdditionalDetailsType object
|
|
''' </summary>
|
|
''' <param name="input">string to deserialize</param>
|
|
''' <param name="obj">Output ApplicationInternalDataAdditionalDetailsType 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 ApplicationInternalDataAdditionalDetailsType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsType)
|
|
Try
|
|
obj = Deserialize(input)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String, ByRef obj As ApplicationInternalDataAdditionalDetailsType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return Deserialize(input, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal input As String) As ApplicationInternalDataAdditionalDetailsType
|
|
Dim stringReader As StringReader = Nothing
|
|
Try
|
|
stringReader = New StringReader(input)
|
|
Return CType(SerializerXml.Deserialize(XmlReader.Create(stringReader)), ApplicationInternalDataAdditionalDetailsType)
|
|
Finally
|
|
If (Not (stringReader) Is Nothing) Then
|
|
stringReader.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function Deserialize(ByVal s As Stream) As ApplicationInternalDataAdditionalDetailsType
|
|
Return CType(SerializerXml.Deserialize(s), ApplicationInternalDataAdditionalDetailsType)
|
|
End Function
|
|
#End Region
|
|
|
|
''' <summary>
|
|
''' Serializes current ApplicationInternalDataAdditionalDetailsType 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 ApplicationInternalDataAdditionalDetailsType object
|
|
''' </summary>
|
|
''' <param name="fileName">File to load and deserialize</param>
|
|
''' <param name="obj">Output ApplicationInternalDataAdditionalDetailsType 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 ApplicationInternalDataAdditionalDetailsType, ByRef exception As System.Exception) As Boolean
|
|
exception = Nothing
|
|
obj = CType(Nothing, ApplicationInternalDataAdditionalDetailsType)
|
|
Try
|
|
obj = LoadFromFile(fileName)
|
|
Return True
|
|
Catch ex As System.Exception
|
|
exception = ex
|
|
Return False
|
|
End Try
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String, ByRef obj As ApplicationInternalDataAdditionalDetailsType) As Boolean
|
|
Dim exception As System.Exception = Nothing
|
|
Return LoadFromFile(fileName, obj, exception)
|
|
End Function
|
|
|
|
Public Overloads Shared Function LoadFromFile(ByVal fileName As String) As ApplicationInternalDataAdditionalDetailsType
|
|
Dim file As FileStream = Nothing
|
|
Dim sr As StreamReader = Nothing
|
|
Try
|
|
file = New FileStream(fileName, FileMode.Open, FileAccess.Read)
|
|
sr = New StreamReader(file)
|
|
Dim dataString As String = sr.ReadToEnd
|
|
sr.Close()
|
|
file.Close()
|
|
Return Deserialize(dataString)
|
|
Finally
|
|
If (Not (file) Is Nothing) Then
|
|
file.Dispose()
|
|
End If
|
|
If (Not (sr) Is Nothing) Then
|
|
sr.Dispose()
|
|
End If
|
|
End Try
|
|
End Function
|
|
End Class
|
|
End Namespace
|
|
#Enable Warning
|